3 |
const { escapeRegex } = require("../src/util"); |
const { escapeRegex } = require("../src/util"); |
4 |
|
|
5 |
module.exports = { |
module.exports = { |
6 |
version: "1.0.0-beta1", |
version: "1.10.0", |
7 |
commands: [ |
commands: [ |
8 |
{ |
{ |
9 |
|
name: 'about', |
10 |
|
shortBrief: "Show information about the bot.", |
11 |
|
description: null, |
12 |
|
structure: "", |
13 |
|
example: "`%%about`", |
14 |
|
notes: null |
15 |
|
}, |
16 |
|
{ |
17 |
|
name: 'addqueue', |
18 |
|
shortBrief: "Add a queue job.", |
19 |
|
description: 'Adds a queued command to the bot\'s memory and after the given amount of time it gets executed.', |
20 |
|
structure: "<time> <command>", |
21 |
|
example: "`%%addqueue 15m echo Hello world`\n`%%addqueue 12h kick 875275828247255`", |
22 |
|
notes: null |
23 |
|
}, |
24 |
|
{ |
25 |
name: 'addsnippet', |
name: 'addsnippet', |
26 |
shortBrief: "Adds a snippet.", |
shortBrief: "Adds a snippet.", |
27 |
description: null, |
description: null, |
30 |
notes: null |
notes: null |
31 |
}, |
}, |
32 |
{ |
{ |
33 |
|
name: 'afk', |
34 |
|
shortBrief: "Keeps track of your mentions and tells other users that you're AFK.", |
35 |
|
description: null, |
36 |
|
structure: "[Reason]", |
37 |
|
example: "`%%afk`\n`%%afk Having dinner`", |
38 |
|
notes: null |
39 |
|
}, |
40 |
|
{ |
41 |
name: 'announce', |
name: 'announce', |
42 |
shortBrief: "Announce something in the given channel.", |
shortBrief: "Announce something in the given channel.", |
43 |
description: "Announce something in the given channel. The channel should be set in the configuration.", |
description: "Announce something in the given channel. The channel should be set in the configuration.", |
48 |
{ |
{ |
49 |
name: 'ban', |
name: 'ban', |
50 |
shortBrief: "Ban someone in this server.", |
shortBrief: "Ban someone in this server.", |
51 |
description: null, |
description: "Ban a user in this server.", |
52 |
structure: "<UserID|Mention> [Reason]", |
structure: "<UserID|UserTag|Mention> [-d=DAYS] [Reason]", |
53 |
example: "`%%ban 385753607325075320`\n`%%ban @Someone You are spamming a lot`", |
example: "`%%ban 385753607325075320`\n`%%ban @Someone You are spamming a lot`\n`%%ban @Someone -d 5`\n`%%ban 385753607325075320 -d 5 You are spamming a lot`", |
54 |
notes: null |
notes: null, |
55 |
|
options: { |
56 |
|
"-d": "The number of days old messages to delete. It must be in range 0-7. An argument is required.", |
57 |
|
} |
58 |
}, |
}, |
59 |
{ |
{ |
60 |
name: 'bean', |
name: 'bean', |
61 |
shortBrief: "Bean someone in this server.", |
shortBrief: "Bean someone in this server.", |
62 |
description: "Bean someone. It doesn't do anything except pretending.", |
description: "Bean someone. It doesn't do anything except pretending.", |
63 |
structure: "<UserID|Mention> [Reason]", |
structure: "<UserID|UserTag|Mention> [Reason]", |
64 |
example: "`%%bean 385753607325075320`\n`%%bean @Someone You are spamming a lot`", |
example: "`%%bean 385753607325075320`\n`%%bean @Someone You are spamming a lot`", |
65 |
notes: null |
notes: null |
66 |
}, |
}, |
73 |
notes: null |
notes: null |
74 |
}, |
}, |
75 |
{ |
{ |
76 |
|
name: 'clear', |
77 |
|
shortBrief: "Clear all messages from a user.", |
78 |
|
description: "Clear all messages from a user, in the current channel. This might take a while.", |
79 |
|
structure: "<UserID|UserTag|UserMention>", |
80 |
|
example: "`%%clear 83474924191884727`\n`%%clear @Someone`", |
81 |
|
notes: null |
82 |
|
}, |
83 |
|
{ |
84 |
|
name: 'delqueue', |
85 |
|
shortBrief: "Delete a queue job.", |
86 |
|
description: "Delete a queued command by its ID.", |
87 |
|
structure: "<QueueID>", |
88 |
|
example: "`%%delqueue 80`", |
89 |
|
notes: null |
90 |
|
}, |
91 |
|
{ |
92 |
name: 'delsnippet', |
name: 'delsnippet', |
93 |
shortBrief: "Deletes a snippet.", |
shortBrief: "Deletes a snippet.", |
94 |
description: null, |
description: null, |
113 |
notes: null |
notes: null |
114 |
}, |
}, |
115 |
{ |
{ |
116 |
|
name: 'expire', |
117 |
|
shortBrief: "Echo (re-send) a message and delete it after the given time.", |
118 |
|
description: "Re-send a message from the bot and delete it automatically after the given time interval.", |
119 |
|
structure: "<timeInterval> <content> [channelMention]", |
120 |
|
example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`", |
121 |
|
notes: null |
122 |
|
}, |
123 |
|
{ |
124 |
|
name: 'expiresc', |
125 |
|
shortBrief: "Schedule a message and delete it after the given time.", |
126 |
|
description: "Schedule a message from the bot and delete it automatically after the given time interval.", |
127 |
|
structure: "<scheduleTimeInterval> <expireTimeInterval> <content> [channelMention]", |
128 |
|
example: "`%%echo 25m 5h Something\nVery Cool`\n`%%echo 1h 7d Something\nVery Cool #general`", |
129 |
|
notes: null |
130 |
|
}, |
131 |
|
{ |
132 |
name: 'general-role', |
name: 'general-role', |
133 |
shortBrief: "Set the general role.", |
shortBrief: "Set the general role.", |
134 |
description: null, |
description: null, |
145 |
notes: null |
notes: null |
146 |
}, |
}, |
147 |
{ |
{ |
148 |
|
name: 'history', |
149 |
|
shortBrief: "Show moderation history for a user.", |
150 |
|
description: null, |
151 |
|
structure: "<UserMention|UserID>", |
152 |
|
example: "`%%history 27372628277272625`\n`%%history @Someone`", |
153 |
|
notes: null |
154 |
|
}, |
155 |
|
{ |
156 |
name: 'httpcat', |
name: 'httpcat', |
157 |
shortBrief: "Get some funny cat memes related to HTTP.", |
shortBrief: "Get some funny cat memes related to HTTP.", |
158 |
description: "Get some funny cat memes related to HTTP status codes, using http.cat API.", |
description: "Get some funny cat memes related to HTTP status codes, using http.cat API.", |
169 |
notes: null |
notes: null |
170 |
}, |
}, |
171 |
{ |
{ |
172 |
|
name: 'joke', |
173 |
|
shortBrief: "Fetch a random joke from The Joke API.", |
174 |
|
description: null, |
175 |
|
structure: "", |
176 |
|
example: "`%%joke`", |
177 |
|
notes: null |
178 |
|
}, |
179 |
|
{ |
180 |
name: 'kick', |
name: 'kick', |
181 |
shortBrief: "Kick someone from this server.", |
shortBrief: "Kick someone from this server.", |
182 |
description: null, |
description: null, |
183 |
structure: "<UserID|Mention> [Reason]", |
structure: "<UserID|UserTag|Mention> [Reason]", |
184 |
example: "`%%kick 385753607325075320`\n`%%kick @Someone You are spamming a lot`", |
example: "`%%kick 385753607325075320`\n`%%kick @Someone You are spamming a lot`", |
185 |
notes: null |
notes: null |
186 |
}, |
}, |
193 |
notes: null, |
notes: null, |
194 |
options: { |
options: { |
195 |
"--no-send": "Do not send a confirmation message to the locked channel", |
"--no-send": "Do not send a confirmation message to the locked channel", |
|
"--everyone": "Lock the channels for @everyone rather than the general role", |
|
196 |
} |
} |
197 |
}, |
}, |
198 |
{ |
{ |
204 |
notes: null, |
notes: null, |
205 |
options: { |
options: { |
206 |
"--no-send": "Do not send a confirmation message to the locked channel", |
"--no-send": "Do not send a confirmation message to the locked channel", |
|
"--everyone": "Lock the channels for @everyone rather than the general role", |
|
207 |
} |
} |
208 |
}, |
}, |
209 |
{ |
{ |
218 |
name: 'mute', |
name: 'mute', |
219 |
shortBrief: "Mute someone in this server.", |
shortBrief: "Mute someone in this server.", |
220 |
description: null, |
description: null, |
221 |
structure: "<UserID|Mention> [-t=DURATION] [Reason]", |
structure: "<UserID|UserTag|Mention> [-t=DURATION] [Reason]", |
222 |
example: "`%%mute 385753607325075320`\n`%%mute @Someone You are spamming a lot`\n`%%mute @Someone -t 10m You are spamming a lot`", |
example: "`%%mute 385753607325075320`\n`%%mute @Someone You are spamming a lot`\n`%%mute @Someone -t 10m You are spamming a lot`", |
223 |
options: { |
options: { |
224 |
"-t": "Set the mute duration" |
"-t": "Set the mute duration" |
245 |
name: 'note', |
name: 'note', |
246 |
shortBrief: "Take a note about an user.", |
shortBrief: "Take a note about an user.", |
247 |
description: null, |
description: null, |
248 |
structure: "<UserID|UserMention> <note>", |
structure: "<UserID|UserTag|UserMention> <note>", |
249 |
example: "`%%note @Someone Simple note.`", |
example: "`%%note @Someone Simple note.`", |
250 |
notes: null |
notes: null |
251 |
}, |
}, |
269 |
name: 'notes', |
name: 'notes', |
270 |
shortBrief: "Get all notes for a specific user.", |
shortBrief: "Get all notes for a specific user.", |
271 |
description: null, |
description: null, |
272 |
structure: "<UserID|UserMention>", |
structure: "<UserID|UserTag|UserMention>", |
273 |
example: "`%%notes @Someone`", |
example: "`%%notes @Someone`", |
274 |
notes: null |
notes: null |
275 |
}, |
}, |
290 |
notes: null |
notes: null |
291 |
}, |
}, |
292 |
{ |
{ |
293 |
|
name: 'queues', |
294 |
|
shortBrief: "Show a list of all queue jobs.", |
295 |
|
description: null, |
296 |
|
structure: "", |
297 |
|
example: "`%%queues`", |
298 |
|
notes: null |
299 |
|
}, |
300 |
|
{ |
301 |
|
name: 'schedule', |
302 |
|
shortBrief: "Echo (re-send) a message after the given time.", |
303 |
|
description: "Re-send a message from the bot automatically after the given time interval.", |
304 |
|
structure: "<timeInterval> <content> [channelMention]", |
305 |
|
example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`", |
306 |
|
notes: null |
307 |
|
}, |
308 |
|
{ |
309 |
name: 'setconfig', |
name: 'setconfig', |
310 |
shortBrief: "Change the bot configuration keys.", |
shortBrief: "Change the bot configuration keys.", |
311 |
description: null, |
description: null, |
314 |
notes: null |
notes: null |
315 |
}, |
}, |
316 |
{ |
{ |
317 |
|
name: 'send', |
318 |
|
shortBrief: "Send a DM to a user.", |
319 |
|
description: null, |
320 |
|
structure: "<UserID|UserTag|Mention> <content>", |
321 |
|
example: "`%%send 278358918549759428 Hello world`\n`%%send @Someone Hello world`", |
322 |
|
notes: null |
323 |
|
}, |
324 |
|
{ |
325 |
name: 'spamfilter', |
name: 'spamfilter', |
326 |
shortBrief: "Change the spam filter configuration keys.", |
shortBrief: "Change the spam filter configuration keys.", |
327 |
description: null, |
description: null, |
330 |
notes: null |
notes: null |
331 |
}, |
}, |
332 |
{ |
{ |
333 |
|
name: 'stats', |
334 |
|
shortBrief: "Show the server stats.", |
335 |
|
description: null, |
336 |
|
structure: "", |
337 |
|
example: "`%%stats", |
338 |
|
notes: null |
339 |
|
}, |
340 |
|
{ |
341 |
name: 'unban', |
name: 'unban', |
342 |
shortBrief: "Unban a user from this server.", |
shortBrief: "Unban a user from this server.", |
343 |
description: null, |
description: null, |
354 |
notes: null, |
notes: null, |
355 |
options: { |
options: { |
356 |
"--no-send": "Do not send a confirmation message to the locked channel", |
"--no-send": "Do not send a confirmation message to the locked channel", |
|
"--everyone": "Unlock the channels for @everyone rather than the general role", |
|
357 |
} |
} |
358 |
}, |
}, |
359 |
{ |
{ |
365 |
notes: null, |
notes: null, |
366 |
options: { |
options: { |
367 |
"--no-send": "Do not send a confirmation message to the locked channel", |
"--no-send": "Do not send a confirmation message to the locked channel", |
368 |
"--everyone": "Lock the channels for @everyone rather than the general role", |
"--raid": "Unlock all Raid-locked channels" |
369 |
} |
} |
370 |
}, |
}, |
371 |
{ |
{ |
372 |
name: 'unmute', |
name: 'unmute', |
373 |
shortBrief: "Unmute someone in this server.", |
shortBrief: "Unmute someone in this server.", |
374 |
description: null, |
description: null, |
375 |
structure: "<UserID|Mention>", |
structure: "<UserID|UserTag|Mention>", |
376 |
example: "`%%unmute 385753607325075320`\n`%%unmute @Someone You are spamming a lot`", |
example: "`%%unmute 385753607325075320`\n`%%unmute @Someone You are spamming a lot`", |
377 |
notes: null |
notes: null |
378 |
}, |
}, |
380 |
name: 'warn', |
name: 'warn', |
381 |
shortBrief: "Warn someone in this server.", |
shortBrief: "Warn someone in this server.", |
382 |
description: null, |
description: null, |
383 |
structure: "<UserID|Mention> [Reason]", |
structure: "<UserID|UserTag|Mention> [Reason]", |
384 |
example: "`%%warn 385753607325075320`\n`%%warn @Someone You are spamming a lot`", |
example: "`%%warn 385753607325075320`\n`%%warn @Someone You are spamming a lot`", |
385 |
notes: null |
notes: null |
386 |
}, |
}, |
404 |
name: 'warnings', |
name: 'warnings', |
405 |
shortBrief: "Show all warnings.", |
shortBrief: "Show all warnings.", |
406 |
description: "Show all warnings in this server. Passing an user will only show their warnings.", |
description: "Show all warnings in this server. Passing an user will only show their warnings.", |
407 |
structure: "[UserId|Mention]", |
structure: "[UserId|UserTag|Mention]", |
408 |
example: "`%%warnings`\n`%%warnings 948489127957979253978538`", |
example: "`%%warnings`\n`%%warnings 948489127957979253978538`", |
409 |
notes: null |
notes: null |
410 |
}, |
}, |
420 |
}, |
}, |
421 |
async handle(msg, cm) { |
async handle(msg, cm) { |
422 |
if (typeof cm.args[0] === 'undefined') { |
if (typeof cm.args[0] === 'undefined') { |
|
// await msg.reply({ |
|
|
// embeds: [ |
|
|
// new MessageEmbed() |
|
|
// .setColor('#f14a60') |
|
|
// .setDescription(`This command requires at least one argument.`) |
|
|
// ] |
|
|
// }); |
|
|
|
|
423 |
await msg.reply({ |
await msg.reply({ |
424 |
embeds: [ |
embeds: [ |
425 |
new MessageEmbed() |
new MessageEmbed() |
426 |
.setDescription("The command list. Run `" + app.config.get('prefix') + "help <commandName>` for more information about a specific command.\n" + await this.render()) |
.setDescription("The command list.\n\n`<...>` means required argument, `[...]` means optional argument.\n\nRun `" + app.config.get('prefix') + "help <commandName>` for more information about a specific command.\n" + await this.render()) |
427 |
.setTitle('Help') |
.setTitle('Help') |
428 |
], |
], |
429 |
}); |
}); |
481 |
embeds: [ |
embeds: [ |
482 |
new MessageEmbed() |
new MessageEmbed() |
483 |
.setTitle(`${app.config.get('prefix')}${cmd.name}`) |
.setTitle(`${app.config.get('prefix')}${cmd.name}`) |
484 |
.setDescription(cmd.description !== null ? cmd.description : cmd.shortBrief) |
.setDescription("`<...>` means required argument, `[...]` means optional argument.\n\n" + (cmd.description !== null ? cmd.description : cmd.shortBrief)) |
485 |
.addFields(fields) |
.addFields(fields) |
486 |
] |
] |
487 |
}); |
}); |