If succesfull delete the author message

This commit is contained in:
Loic Bersier 2018-10-08 18:10:35 +02:00
parent ea7d0f76dc
commit c740459352

View file

@ -24,10 +24,11 @@ module.exports = class DespacitoCommand extends Command {
const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send({files: [responseObject[despacitoNumber]]}); message.channel.send({files: [responseObject[despacitoNumber]]});
} else if (user.id === message.author.id) { } else if (user.id === message.author.id) {
message.say(`Did you just try to despacitoad yourself?`) message.say(`Did you just try to despacitoad yourself?`);
} else if (user.id === this.client.user.id) { } else if (user.id === this.client.user.id) {
message.say('Nice try but you wont get me :^)') message.say('Nice try but you wont get me :^)');
} else } else
message.say(`${user}, you have been despacitoad`) message.delete();
message.say(`${user}, you have been despacitoad`);
} }
}; };