add production warning
This commit is contained in:
parent
ef133512a3
commit
97da087115
1 changed files with 7 additions and 2 deletions
9
index.ts
9
index.ts
|
@ -5,7 +5,7 @@ import * as BuildConfig from './constants';
|
||||||
import Filter from 'bad-words';
|
import Filter from 'bad-words';
|
||||||
import { isBad } from './badLinks';
|
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';
|
import urlRegex from 'url-regex';
|
||||||
|
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
|
@ -14,6 +14,7 @@ const client = new Client({
|
||||||
Intents.FLAGS.GUILD_MESSAGES,
|
Intents.FLAGS.GUILD_MESSAGES,
|
||||||
Intents.FLAGS.DIRECT_MESSAGES,
|
Intents.FLAGS.DIRECT_MESSAGES,
|
||||||
Intents.FLAGS.GUILD_MEMBERS,
|
Intents.FLAGS.GUILD_MEMBERS,
|
||||||
|
Intents.FLAGS.GUILD_PRESENCES,
|
||||||
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
|
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
|
||||||
Intents.FLAGS.GUILD_BANS,
|
Intents.FLAGS.GUILD_BANS,
|
||||||
],
|
],
|
||||||
|
@ -22,7 +23,11 @@ const client = new Client({
|
||||||
client.login(process.env.DISCORD_TOKEN);
|
client.login(process.env.DISCORD_TOKEN);
|
||||||
|
|
||||||
client.once('ready', async () => {
|
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(
|
console.log(
|
||||||
'Invite link:',
|
'Invite link:',
|
||||||
blue(
|
blue(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue