Haha-Yes/commands/fun/clap.js

27 lines
836 B
JavaScript
Raw Normal View History

const { Command } = require('discord.js-commando');
2018-10-15 20:23:45 +02:00
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 }) {
2018-10-15 20:23:45 +02:00
if(blacklist[message.author.id])
return message.channel.send("You are blacklisted")
let clap = text.replace(/ /g, ' 👏 ');
message.delete();
2018-10-09 15:08:58 +02:00
message.say(`${clap} 👏`);
}};