Files
xiao/commands/roleplay/hitwithshovel.js
T
Daniel Odendahl Jr bcaa91c367 Destructuring is Nice
2017-04-11 03:51:10 +00:00

27 lines
925 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class HitwithShovelCommand extends Command {
constructor(client) {
super(client, {
name: 'hitwithshovel',
group: 'roleplay',
memberName: 'hitwithsovel',
description: 'Hits someone with a shovel. (;hitwithshovel @User)',
examples: [';hitwithshovel @User'],
args: [{
key: 'thing',
prompt: 'What do you want to roleplay with?',
type: 'string'
}]
});
}
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
const thingToRoleplay = args.thing;
return message.say(`${message.author} *hits* ${thingToRoleplay} *with a shovel*`);
}
};