32 lines
No EOL
623 B
JavaScript
32 lines
No EOL
623 B
JavaScript
const { Command } = require('discord-akairo');
|
|
|
|
class ClapCommand extends Command {
|
|
constructor() {
|
|
super('clap', {
|
|
aliases: ['clap'],
|
|
category: 'general',
|
|
args: [
|
|
{
|
|
id: 'text',
|
|
type: 'string',
|
|
match: 'rest'
|
|
}
|
|
],
|
|
description: {
|
|
content: 'replace 👏 the 👏 spaces 👏 with 👏 clap 👏',
|
|
usage: '[text]',
|
|
examples: ['replace the spaces with clap']
|
|
}
|
|
});
|
|
}
|
|
|
|
async exec(message, args) {
|
|
if (!args.text)
|
|
return;
|
|
let clap = args.text.replace(/ /g, ' 👏 ');
|
|
message.delete();
|
|
message.channel.send(`${clap} 👏`);
|
|
}
|
|
}
|
|
|
|
module.exports = ClapCommand; |