2018-12-30 01:20:24 +01:00
|
|
|
const { Command } = require('discord-akairo');
|
2019-02-08 19:08:17 +01:00
|
|
|
const rand = require('../../rand.js');
|
2018-12-30 01:20:24 +01:00
|
|
|
class ClapCommand extends Command {
|
2019-01-02 08:09:45 +01:00
|
|
|
constructor() {
|
|
|
|
super('clap', {
|
|
|
|
aliases: ['clap'],
|
|
|
|
category: 'general',
|
|
|
|
args: [
|
|
|
|
{
|
|
|
|
id: 'text',
|
2019-01-10 20:45:29 +01:00
|
|
|
type: 'string',
|
2019-06-23 03:41:59 +02:00
|
|
|
prompt: {
|
|
|
|
start: 'Write something so i can replace the space with 👏',
|
|
|
|
},
|
2019-01-10 20:45:29 +01:00
|
|
|
match: 'rest'
|
2019-01-02 08:09:45 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
description: {
|
2018-12-30 01:20:24 +01:00
|
|
|
content: 'replace 👏 the 👏 spaces 👏 with 👏 clap 👏',
|
|
|
|
usage: '[text]',
|
|
|
|
examples: ['replace the spaces with clap']
|
|
|
|
}
|
2019-01-02 08:09:45 +01:00
|
|
|
});
|
|
|
|
}
|
2018-12-30 01:20:24 +01:00
|
|
|
|
2019-01-02 08:09:45 +01:00
|
|
|
async exec(message, args) {
|
2019-01-02 18:59:32 +01:00
|
|
|
if (!args.text)
|
|
|
|
return;
|
2019-02-08 19:08:17 +01:00
|
|
|
args.text = rand.random(args.text, message);
|
|
|
|
|
2019-01-02 08:09:45 +01:00
|
|
|
let clap = args.text.replace(/ /g, ' 👏 ');
|
|
|
|
message.delete();
|
|
|
|
message.channel.send(`${clap} 👏`);
|
|
|
|
}
|
2018-12-30 01:20:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = ClapCommand;
|