Files
xiao/commands/response/ship.js
T
Daniel Odendahl Jr bc7153ec91 Remove Help Examples
2017-04-23 17:03:17 +00:00

30 lines
922 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class ShipCommand extends Command {
constructor(client) {
super(client, {
name: 'ship',
aliases: [
'rate'
],
group: 'response',
memberName: 'ship',
description: 'Ships things/people together.',
args: [{
key: 'things',
prompt: 'What do you want to ship together?',
type: 'string'
}]
});
}
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
const { things } = args;
const percentage = Math.floor(Math.random() * 100) + 1;
return message.say(`I'd give ${things} a ${percentage}%!`);
}
};