diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /server/src/commands/fun/Uwufy.ts | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'server/src/commands/fun/Uwufy.ts')
| -rw-r--r-- | server/src/commands/fun/Uwufy.ts | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/server/src/commands/fun/Uwufy.ts b/server/src/commands/fun/Uwufy.ts new file mode 100644 index 0000000..15aff06 --- /dev/null +++ b/server/src/commands/fun/Uwufy.ts @@ -0,0 +1,48 @@ +import { Command } from 'discord-akairo'; +import { Message } from 'discord.js'; + +export default class UwufyFun extends Command { + public constructor() { + super('uwufy', { + aliases: ['uwufy', 'owofy'], + category: 'fun', + description: { + content: 'Uwufys a specified string.', + usage: '[text]', + examples: [ + 'how are you doing today?' + ] + }, + ratelimit: 3, + args: [ + { + id: 'text', + type: 'string', + prompt: { + start: 'What would you like to uwufy?' + }, + match: 'rest' + }, + { + id: 'deleteinitialmessage', + flag: ['-delete', '-d'], + match: 'flag' + } + ] + }); + } + + public exec(msg: Message, { text, deleteinitialmessage }): Promise<Message> { + if (deleteinitialmessage) msg.delete(); + text.replace(/(?:l|r)/g, 'w'); + text.replace(/(?:L|R)/g, 'W'); + text.replace(/!+/g, ` >w< `); + + const f = (Math.random() < 0.25) + if (f) { + let c = text.charAt(0); + text = c + '-' + text + } + return msg.channel.send(`*${text}*`); + } +}
\ No newline at end of file |