diff --git a/commands/Fun/clap.js b/commands/Fun/clap.js index 2efa550..34b66d8 100755 --- a/commands/Fun/clap.js +++ b/commands/Fun/clap.js @@ -4,7 +4,7 @@ class Clap extends Command { constructor(client) { super(client, { name: 'clap', - description: 'Clappify your text', + description: 'Clapify your text', usage: 'clap ', examples: ['clap add emojis to this'], category: 'Fun', diff --git a/commands/Fun/mock.js b/commands/Fun/mock.js new file mode 100644 index 0000000..63c6d66 --- /dev/null +++ b/commands/Fun/mock.js @@ -0,0 +1,31 @@ +const Command = require('../../base/Command.js'); + +class Mock extends Command { + constructor(client) { + super(client, { + name: 'mock', + description: 'Converts your text to a mocking pattern', + usage: 'mock ', + examples: ['mock this is fun'], + category: 'Fun', + requiredArgs: 1, + }); + } + + async run(msg, args) { + // Combine user input into one string + const input = args.join(' '); + const lengthLimited = this.client.util.limitStringLength(input); + const mock = await this.client.util.clean(this.client, lengthLimited); + + // Convert to "mOcKiNg" style + const mockedText = mock + .split('') + .map((char, index) => (index % 2 === 0 ? char.toLowerCase() : char.toUpperCase())) + .join(''); + + return msg.channel.send(mockedText); + } +} + +module.exports = Mock;