forked from Supositware/Haha-Yes
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
972 B
JavaScript
29 lines
972 B
JavaScript
const { Command } = require('discord.js-commando');
|
|
const SelfReloadJSON = require('self-reload-json');
|
|
const blacklist = require('blacklist');
|
|
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 }) {
|
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
|
if(blacklistJson[message.author.id])
|
|
return blacklist(blacklistJson[message.author.id] , message)
|
|
|
|
let clap = text.replace(/ /g, ' 👏 ');
|
|
message.delete();
|
|
message.say(`${clap} 👏`);
|
|
}}; |