mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-09-06 18:49:47 +00:00
fix checks
This commit is contained in:
parent
5fb14d97a8
commit
9dea8384fc
1 changed files with 10 additions and 6 deletions
16
bot/bot.js
16
bot/bot.js
|
@ -76,13 +76,17 @@ function checkMessageForCommand(msg, isEdit) {
|
||||||
//check if user is Online
|
//check if user is Online
|
||||||
if (!msg.author.presence.status || msg.author.presence.status == 'offline' || msg.author.presence.status == 'invisible') {
|
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!')
|
msg.author.send('Please set your Discord Presence to Online to talk to the bot!')
|
||||||
.catch(msg.channel.send(msg.author +
|
.catch(function(error) {
|
||||||
', Please enable Direct Messages from server members to communicate fully with our bot, ' +
|
msg.channel.send(msg.author +
|
||||||
'it is located in the user setting area under Privacy & Safety tab, ' +
|
', Please enable Direct Messages from server members to communicate fully with our bot, ' +
|
||||||
'select the option allow direct messages from server members')
|
'it is located in the user setting area under Privacy & Safety tab, ' +
|
||||||
.then(msg.channel.send('Please set your Discord Presence to Online to talk to the Bot!'))
|
'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;
|
return;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
console.log('treating ' + msg.content + ' from UserID:' + msg.author + ' || UserName: ' + msg.author.username + ' as command');
|
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);
|
var cmdTxt = msg.content.split(' ')[0].substring(config.prefix.length);
|
||||||
|
|
Loading…
Add table
Reference in a new issue