Haha-Yes/commands/fun/clap.js
2018-10-15 20:23:45 +02:00

27 lines
No EOL
836 B
JavaScript

const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json')
module.exports = class clapCommand extends Command {
constructor(client) {
super(client, {
name: 'clap',
group: 'fun',
memberName: 'clap',
description: `Repeat the text you send with clap`,
args: [
{
key: 'text',
prompt: 'What do you want me to say',
type: 'string',
}
]
});
}
async run(message, { text }) {
if(blacklist[message.author.id])
return message.channel.send("You are blacklisted")
let clap = text.replace(/ /g, ' 👏 ');
message.delete();
message.say(`${clap} 👏`);
}};