mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
fix discord ploblem
This commit is contained in:
parent
8403eec8cd
commit
a23abfb5af
1 changed files with 10 additions and 2 deletions
|
@ -131,7 +131,15 @@ async function list(bot, discord, channeldc, prefix, selector, args) {
|
|||
|
||||
bot.tellraw(selector, message);
|
||||
} catch (e) {
|
||||
bot.tellraw(selector, {text: e.toString(), color: 'red'});
|
||||
if (discord) {
|
||||
const Embed = new MessageEmbed()
|
||||
.setColor('#FF0000')
|
||||
.setTitle('Error')
|
||||
.setDescription(`\`\`\`${e.toString()}\`\`\``);
|
||||
channeldc.send({embeds: [Embed]});
|
||||
} else {
|
||||
bot.tellraw(selector, {text: e.toString(), color: 'red'});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -304,7 +312,7 @@ module.exports = {
|
|||
}
|
||||
break;
|
||||
case 'list':
|
||||
list(bot, true, channeldc, prefix);
|
||||
list(bot, true, channeldc, prefix, '@a', args);
|
||||
break;
|
||||
case 'nowplaying':
|
||||
Embed = new MessageEmbed()
|
||||
|
|
Loading…
Reference in a new issue