Files
xiao/commands/roleplay/hug.js
T
Daniel Odendahl Jr cea110ce4b Test await
2017-03-23 12:01:00 +00:00

23 lines
787 B
JavaScript

const commando = require('discord.js-commando');
module.exports = class HugCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'hug',
group: 'roleplay',
memberName: 'hug',
description: 'Hugs someone. (;hug @User)',
examples: [';hug @User']
});
}
async run(message) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
return message.channel.send(`${message.author} *hugs* ${thingToRoleplay}`);
}
};