Files
xiao/commands/roleplay/highfive.js
T
2017-03-23 03:37:20 +00:00

23 lines
818 B
JavaScript

const commando = require('discord.js-commando');
module.exports = class HighFivesCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'highfive',
group: 'roleplay',
memberName: 'highfive',
description: 'High Fives someone. (;highfive @User)',
examples: [';highfive @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(" ");
message.channel.send(`${message.author} *high-fives* ${thingToRoleplay}`);
}
};