1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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}*`);
}
}
|