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

This commit is contained in:
loicbersier 2020-07-16 09:46:08 +02:00
parent 05c3cf5f76
commit 699c78ce75

View file

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