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,
|
||||
loginMessage,
|
||||
loginChannel,
|
||||
enableLoginMessage,
|
||||
owners
|
||||
} = require('./config.json');
|
||||
|
||||
|
@ -17,6 +18,7 @@ reloadCommands(client)
|
|||
client.once('ready', () => {
|
||||
console.log('Ready!');
|
||||
client.user.setActivity(prefix, { type: 'LISTENING' });
|
||||
if (enableLoginMessage === true)
|
||||
try{
|
||||
client.channels.cache.get(loginChannel).send(loginMessage)
|
||||
}catch(err){
|
||||
|
|
Loading…
Add table
Reference in a new issue