-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.js
115 lines (114 loc) · 2.46 KB
/
commands.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
const { String, ROLE, USER, Number } = require("./helper/datatypes");
const initCommands = (commands) => {
commands?.create({
name: "user",
description: "Get Basic User Info",
options: [
{
name: "username",
description: "Username of the user",
type: String,
required: true,
},
],
});
commands?.create({
name: "contest",
description: "Get Live and Upcoming Contests",
});
commands?.create({
name: "cspresent",
description: "Get Live Contest info of Codechef",
});
commands?.create({
name: "csupcoming",
description: "Get Future Contest info of Codechef",
});
commands?.create({
name: "roles",
description: "A role can be added to a user",
options: [
{
name: "role",
description: "give the role name",
type: ROLE,
required: true,
},
{
name: "user",
description: "give the user name",
type: USER,
required: true,
},
],
});
commands?.create({
name: "rmrole",
description: "remove a role from a user",
options: [
{
name: "role",
description: "give the role name",
type: ROLE,
required: true,
},
{
name: "user",
description: "give the user name",
type: USER,
required: true,
},
],
});
commands?.create({
name: "poll",
description: "Create a poll",
options: [
{
name: "title",
description: "Title of the poll",
type: String,
required: true,
},
{
name: "options",
description: "Options of the poll",
type: String,
required: true,
},
],
});
commands?.create({
name: 'topusercontest',
description: 'Get top users of a particular contest Default limit is 5',
options: [
{
name: 'contest',
description: 'Code of the contest',
type: String,
required: true,
},
{
name: 'limit',
description: 'Number of users to be displayed',
type: Number,
},
],
});
commands?.create({
name: 'topuser',
description: 'Get top users of all time Default limit is 5',
options: [
{
name: 'limit',
description: 'Number of users to be displayed',
type: Number,
},
],
});
commands?.create({
name: 'help',
description: 'Get help',
});
};
module.exports = initCommands;