Send message when error occured

This commit is contained in:
loicbersier 2018-10-15 11:23:40 +02:00
parent 536cb5bf41
commit 78d4499912
5 changed files with 15 additions and 5 deletions

View file

@ -32,7 +32,9 @@ module.exports = class godCommand extends Command {
const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png'); const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png');
message.say(attachment); message.say(attachment).catch(error => {
message.say('an error as occured. Check the bot/channel permissions')
})
} }
}; };

View file

@ -32,7 +32,9 @@ module.exports = class humanCommand extends Command {
const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png'); const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png');
message.say(attachment); message.say(attachment).catch(error => {
message.say('an error as occured. Check the bot/channel permissions')
})
} }
}; };

View file

@ -59,7 +59,9 @@ module.exports = class idubbbzCommand extends Command {
const attachment = new Discord.Attachment(canvas.toBuffer(), 'edups.png'); const attachment = new Discord.Attachment(canvas.toBuffer(), 'edups.png');
message.say(attachment); message.say(attachment).catch(error => {
message.say('an error as occured. Check the bot/channel permissions')
})
} }
}; };

View file

@ -59,7 +59,9 @@ module.exports = class idubbbzpaintCommand extends Command {
const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png'); const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png');
message.say(attachment); message.say(attachment).catch(error => {
message.say('an error as occured. Check the bot/channel permissions')
})
} }
}; };

View file

@ -32,7 +32,9 @@ module.exports = class likeCommand extends Command {
const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png'); const attachment = new Discord.Attachment(canvas.toBuffer(), 'edupspaint.png');
message.say(attachment); message.say(attachment).catch(error => {
message.say('an error as occured. Check the bot/channel permissions')
})
} }
}; };