-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.js
More file actions
59 lines (58 loc) · 1.76 KB
/
utils.js
File metadata and controls
59 lines (58 loc) · 1.76 KB
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
49
50
51
52
53
54
55
56
57
58
59
let help = '**count**: display number of times people got "FUCK YOU"ed\n**chance**: set chance of getting "FUCK YOU"ed (e.g KEKW chance 20%)\n**switch**: turn off "FUCK YOU" option\n**pic**: post random image from Imgur\n**random**: get random value between two numbers(e.g KEKW random 1 100)\n**help**: show help list\n**mode**: switch "FUCK YOU"\'s mode (**normal**: working on everyone, **spicial**: working on "specified" persons)\n**display**: displays "FUCK YOU"\'s chance\n**react**: change the odds of being reacted (e.g KEKW react 50%)';
let random = (min, max) =>
{
return Math.floor(Math.random() * (+max - +min + 1)) + +min;
}
let getImgurId = (length) =>
{
let result = '';
let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
for (let i = 0; i < length; i++ )
{
result += characters.charAt(Math.floor(Math.random() * characters.length));
}
return result;
}
let emotes =
{
KEKW: "<:KEKW:708697210711310460>",
YEP: "<:YEP:710828915828064287>",
Pepega: "<:Pepega:736925908706787399>",
key: function(n)
{
return this[Object.keys(this)[n]];
},
keys: function()
{
return Object.keys(this).length;
}
}
let reactEmotes =
{
KEKW: "708697210711310460",
YEP: "710828915828064287",
Pepega: "736925908706787399",
key: function(n)
{
return this[Object.keys(this)[n]];
},
keys: function()
{
return Object.keys(this).length;
}
}
let getRandomEmote = () =>
{
return emotes.key(random(0,2));
}
let getRandomReactEmote = () =>
{
return reactEmotes.key(random(0,2));
}
exports.random = random;
exports.getImgurId = getImgurId;
exports.help = help;
exports.emotes = emotes;
exports.getRandomEmote = getRandomEmote;
exports.reactEmotes = reactEmotes;
exports.getRandomReactEmote = getRandomReactEmote;