From 065cdd5ea84384f31764f3566eb337de2e1964e7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 7 Oct 2018 10:05:26 +0200 Subject: [PATCH] You have been despacitoad --- commands/fun/despacito.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index a8f9bfa9..47ec033f 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -7,12 +7,23 @@ module.exports = class DespacitoCommand extends Command { group: 'fun', memberName: 'despacito', description: `despacito`, + args: [ + { + key: 'user', + prompt: 'What do you want me to say', + type: 'member', + default: '' + } + ] }); } - async run(message) { + async run(message, { user }) { + if (!user) { const number = Object.keys(responseObject).length; const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send({files: [responseObject[despacitoNumber]]}); - } + } else + message.say(`${user}, you have been despacitoad`) + } }; \ No newline at end of file