fix checks

This commit is contained in:
MSFTserver 2018-03-31 15:46:34 -07:00 committed by GitHub
parent 5fb14d97a8
commit 9dea8384fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,13 +76,17 @@ function checkMessageForCommand(msg, isEdit) {
//check if user is Online
if (!msg.author.presence.status || msg.author.presence.status == 'offline' || msg.author.presence.status == 'invisible') {
msg.author.send('Please set your Discord Presence to Online to talk to the bot!')
.catch(msg.channel.send(msg.author +
', Please enable Direct Messages from server members to communicate fully with our bot, ' +
'it is located in the user setting area under Privacy & Safety tab, ' +
'select the option allow direct messages from server members')
.then(msg.channel.send('Please set your Discord Presence to Online to talk to the Bot!'))
);
.catch(function(error) {
msg.channel.send(msg.author +
', Please enable Direct Messages from server members to communicate fully with our bot, ' +
'it is located in the user setting area under Privacy & Safety tab, ' +
'select the option allow direct messages from server members'
).then(msg.channel.send(
'Please set your Discord Presence to Online to talk to the Bot!'
);
);
return;
});
}
console.log('treating ' + msg.content + ' from UserID:' + msg.author + ' || UserName: ' + msg.author.username + ' as command');
var cmdTxt = msg.content.split(' ')[0].substring(config.prefix.length);