Files
xiao/commands/roleplay/punch.js
T
Daniel Odendahl Jr 76907549df The Power of const
2017-04-03 22:31:19 +00:00

28 lines
921 B
JavaScript

const commando = require('discord.js-commando');
module.exports = class PunchCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'punch',
group: 'roleplay',
memberName: 'punch',
description: 'Punches someone. (;punch @User)',
examples: [';punch @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;
}
console.log(`[Command] ${message.content}`);
const thingToRoleplay = args.thing;
return message.say(`${message.author} *punches* ${thingToRoleplay}`);
}
};