Fix #67: errors from privacy settings are now ignored with greetings

master
Dragory 2018-04-21 14:31:58 +03:00
parent 4305609f0b
commit 1fc32f71d0
1 changed files with 6 additions and 1 deletions

View File

@ -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;
});
});
}