add production warning

This commit is contained in:
Ryan Cao 2022-05-22 13:39:59 +08:00
parent ef133512a3
commit 97da087115
No known key found for this signature in database
GPG key ID: 528A2C1B6656B97F

View file

@ -5,7 +5,7 @@ import * as BuildConfig from './constants';
import Filter from 'bad-words';
import { isBad } from './badLinks';
import { green, bold, blue, underline } from 'kleur/colors';
import { green, bold, blue, underline, yellow } from 'kleur/colors';
import urlRegex from 'url-regex';
const client = new Client({
@ -14,6 +14,7 @@ const client = new Client({
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.DIRECT_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_PRESENCES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Intents.FLAGS.GUILD_BANS,
],
@ -22,7 +23,11 @@ const client = new Client({
client.login(process.env.DISCORD_TOKEN);
client.once('ready', async () => {
console.log(green(bold('Discord bot ready!')));
console.log(green('Discord bot ready!'));
if (process.env.NODE_ENV !== 'development')
console.warn(yellow(bold('Running in production mode!')));
console.log(
'Invite link:',
blue(