diff --git a/src/modules/greeting.js b/src/modules/greeting.js index 879310e..4f1f822 100644 --- a/src/modules/greeting.js +++ b/src/modules/greeting.js @@ -13,7 +13,12 @@ module.exports = bot => { function sendGreeting(file) { bot.getDMChannel(member.id).then(channel => { if (! channel) return; - channel.createMessage(config.greetingMessage || '', file); + + channel.createMessage(config.greetingMessage || '', file) + .catch(e => { + if (e.code === 50007) return; + throw e; + }); }); }