Add check for login message
Check if enableLoginMessage is set to true before attempting to send a message.
This commit is contained in:
parent
0b5156721d
commit
eefb3cd7f6
1 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ const {
|
||||||
token,
|
token,
|
||||||
loginMessage,
|
loginMessage,
|
||||||
loginChannel,
|
loginChannel,
|
||||||
|
enableLoginMessage,
|
||||||
owners
|
owners
|
||||||
} = require('./config.json');
|
} = require('./config.json');
|
||||||
|
|
||||||
|
@ -17,6 +18,7 @@ reloadCommands(client)
|
||||||
client.once('ready', () => {
|
client.once('ready', () => {
|
||||||
console.log('Ready!');
|
console.log('Ready!');
|
||||||
client.user.setActivity(prefix, { type: 'LISTENING' });
|
client.user.setActivity(prefix, { type: 'LISTENING' });
|
||||||
|
if (enableLoginMessage === true)
|
||||||
try{
|
try{
|
||||||
client.channels.cache.get(loginChannel).send(loginMessage)
|
client.channels.cache.get(loginChannel).send(loginMessage)
|
||||||
}catch(err){
|
}catch(err){
|
||||||
|
|
Loading…
Add table
Reference in a new issue