Send a message to warn about not being able to dm the user

akairo
loicbersier 4 years ago
parent 05c3cf5f76
commit 699c78ce75

@ -38,8 +38,13 @@ class InviteCommand extends Command {
if (args.here) {
message.channel.send(invMessage);
} else {
message.channel.send('Check your dm');
return message.author.send(invMessage);
return message.author.send(invMessage)
.catch(() => {
return message.channel.send('I could not dm you! Do you have dm enabled or haven\'t blocked me?');
})
.then(() => {
return message.channel.send('Check your dm');
});
}
}
}

Loading…
Cancel
Save