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 { 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}*`); } }