mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
25 lines
918 B
JavaScript
25 lines
918 B
JavaScript
const commando = require('discord.js-commando');
|
|
|
|
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, args) {
|
|
if(message.channel.type !== 'dm') {
|
|
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
|
|
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
|
}
|
|
console.log("[Command] " + message.content);
|
|
let username = message.content.split(" ").slice(1).join(" ");
|
|
message.channel.sendMessage(message.author + ' *high fives* ' + username);
|
|
}
|
|
}
|
|
|
|
module.exports = HighFivesCommand; |