From 9a410110b34c5b1f28d54b75f3b40c0f9b38cc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sun, 23 Sep 2018 18:06:33 +0200 Subject: [PATCH] =?UTF-8?q?Put=20=F0=9F=91=8F=20clap=20=F0=9F=91=8F=20at?= =?UTF-8?q?=20=F0=9F=91=8F=20every=20=F0=9F=91=8F=20spaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/fun/clap.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 commands/fun/clap.js diff --git a/commands/fun/clap.js b/commands/fun/clap.js new file mode 100644 index 0000000..b184194 --- /dev/null +++ b/commands/fun/clap.js @@ -0,0 +1,23 @@ +const { Command } = require('discord.js-commando'); +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 clap = text.replace(/ /g, ' 👏 '); + message.delete(); + message.say(clap); +}}; \ No newline at end of file