Fix #67: errors from privacy settings are now ignored with greetings
parent
4305609f0b
commit
1fc32f71d0
|
@ -13,7 +13,12 @@ module.exports = bot => {
|
||||||
function sendGreeting(file) {
|
function sendGreeting(file) {
|
||||||
bot.getDMChannel(member.id).then(channel => {
|
bot.getDMChannel(member.id).then(channel => {
|
||||||
if (! channel) return;
|
if (! channel) return;
|
||||||
channel.createMessage(config.greetingMessage || '', file);
|
|
||||||
|
channel.createMessage(config.greetingMessage || '', file)
|
||||||
|
.catch(e => {
|
||||||
|
if (e.code === 50007) return;
|
||||||
|
throw e;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue