You have been despacitoad

This commit is contained in:
loicbersier 2018-10-07 10:05:26 +02:00
parent fd579ae39e
commit 065cdd5ea8

View file

@ -7,12 +7,23 @@ module.exports = class DespacitoCommand extends Command {
group: 'fun', group: 'fun',
memberName: 'despacito', memberName: 'despacito',
description: `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 number = Object.keys(responseObject).length;
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
message.say(`${user}, you have been despacitoad`)
} }
}; };