-
Notifications
You must be signed in to change notification settings - Fork 0
/
systemCalls.js
47 lines (40 loc) · 1.07 KB
/
systemCalls.js
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
var callTree = {"system call": {
"generate": {
"crystalline element": {
"sword shape": (admin, user) => admin.bot.chat(`/give ${user} diamond_sword`),
}
},
"increase fluct quota": (admin, user) =>
{
admin.fluctQuota++;
admin.bot.chat(`Fluct quota increased to ${admin.fluctQuota}`);
},
"decrease fluct quota": (admin, user) =>
{
admin.fluctQuota--;
admin.bot.chat(`Fluct quota decreased to ${admin.fluctQuota}`);
},
//you're welcome Israbelle
"sword now": (admin, user) => admin.bot.chat(`/give ${user} diamond_sword`),
//you're welcome ROM
"sword in five minutes": (admin, user) =>
{
admin.bot.chat(`*yawn*`);
setTimeout(() => admin.bot.chat(`/give ${user} diamond_sword`), 1000 * 60 * 5);
},
}};
var calls = {};
function buildCallList(tree=callTree, prefix)
{
for(var key in tree)
{
var subKey = prefix == null ? key : prefix + " " + key;
if(typeof tree[key] == "function")
{
calls[subKey] = tree[key];
}
buildCallList(tree[key], subKey);
}
}
buildCallList();
module.exports = calls;