3 |
const { escapeRegex } = require("../src/util"); |
const { escapeRegex } = require("../src/util"); |
4 |
|
|
5 |
module.exports = { |
module.exports = { |
6 |
version: "1.4.1", |
version: "1.8.0", |
7 |
commands: [ |
commands: [ |
8 |
{ |
{ |
9 |
name: 'addsnippet', |
name: 'addsnippet', |
32 |
{ |
{ |
33 |
name: 'ban', |
name: 'ban', |
34 |
shortBrief: "Ban someone in this server.", |
shortBrief: "Ban someone in this server.", |
35 |
description: null, |
description: "Ban a user. `-d` is the number days old messages to delete. It must be in range 0-7. If `-d` is passed then an argument after it is required.", |
36 |
structure: "<UserID|Mention> [Reason]", |
structure: "<UserID|Mention> [-d=DAYS] [Reason]", |
37 |
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`", |
38 |
notes: null |
notes: null |
39 |
}, |
}, |
40 |
{ |
{ |
86 |
notes: null |
notes: null |
87 |
}, |
}, |
88 |
{ |
{ |
89 |
|
name: 'expire', |
90 |
|
shortBrief: "Echo (re-send) a message and delete it after the given time.", |
91 |
|
description: "Re-send a message from the bot and delete it automatically after the given time interval.", |
92 |
|
structure: "<timeInterval> <content> [channelMention]", |
93 |
|
example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`", |
94 |
|
notes: null |
95 |
|
}, |
96 |
|
{ |
97 |
|
name: 'expiresc', |
98 |
|
shortBrief: "Schedule a message and delete it after the given time.", |
99 |
|
description: "Schedule a message from the bot and delete it automatically after the given time interval.", |
100 |
|
structure: "<scheduleTimeInterval> <expireTimeInterval> <content> [channelMention]", |
101 |
|
example: "`%%echo 25m 5h Something\nVery Cool`\n`%%echo 1h 7d Something\nVery Cool #general`", |
102 |
|
notes: null |
103 |
|
}, |
104 |
|
{ |
105 |
name: 'general-role', |
name: 'general-role', |
106 |
shortBrief: "Set the general role.", |
shortBrief: "Set the general role.", |
107 |
description: null, |
description: null, |
158 |
notes: null, |
notes: null, |
159 |
options: { |
options: { |
160 |
"--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", |
|
161 |
} |
} |
162 |
}, |
}, |
163 |
{ |
{ |
169 |
notes: null, |
notes: null, |
170 |
options: { |
options: { |
171 |
"--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", |
|
172 |
} |
} |
173 |
}, |
}, |
174 |
{ |
{ |
255 |
notes: null |
notes: null |
256 |
}, |
}, |
257 |
{ |
{ |
258 |
|
name: 'schedule', |
259 |
|
shortBrief: "Echo (re-send) a message after the given time.", |
260 |
|
description: "Re-send a message from the bot automatically after the given time interval.", |
261 |
|
structure: "<timeInterval> <content> [channelMention]", |
262 |
|
example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`", |
263 |
|
notes: null |
264 |
|
}, |
265 |
|
{ |
266 |
name: 'setconfig', |
name: 'setconfig', |
267 |
shortBrief: "Change the bot configuration keys.", |
shortBrief: "Change the bot configuration keys.", |
268 |
description: null, |
description: null, |
287 |
notes: null |
notes: null |
288 |
}, |
}, |
289 |
{ |
{ |
290 |
|
name: 'stats', |
291 |
|
shortBrief: "Show the server stats.", |
292 |
|
description: null, |
293 |
|
structure: "", |
294 |
|
example: "`%%stats", |
295 |
|
notes: null |
296 |
|
}, |
297 |
|
{ |
298 |
name: 'unban', |
name: 'unban', |
299 |
shortBrief: "Unban a user from this server.", |
shortBrief: "Unban a user from this server.", |
300 |
description: null, |
description: null, |
311 |
notes: null, |
notes: null, |
312 |
options: { |
options: { |
313 |
"--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", |
|
314 |
} |
} |
315 |
}, |
}, |
316 |
{ |
{ |
322 |
notes: null, |
notes: null, |
323 |
options: { |
options: { |
324 |
"--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", |
|
325 |
"--raid": "Unlock all Raid-locked channels" |
"--raid": "Unlock all Raid-locked channels" |
326 |
} |
} |
327 |
}, |
}, |
377 |
}, |
}, |
378 |
async handle(msg, cm) { |
async handle(msg, cm) { |
379 |
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.`) |
|
|
// ] |
|
|
// }); |
|
|
|
|
380 |
await msg.reply({ |
await msg.reply({ |
381 |
embeds: [ |
embeds: [ |
382 |
new MessageEmbed() |
new MessageEmbed() |
383 |
.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()) |
384 |
.setTitle('Help') |
.setTitle('Help') |
385 |
], |
], |
386 |
}); |
}); |
438 |
embeds: [ |
embeds: [ |
439 |
new MessageEmbed() |
new MessageEmbed() |
440 |
.setTitle(`${app.config.get('prefix')}${cmd.name}`) |
.setTitle(`${app.config.get('prefix')}${cmd.name}`) |
441 |
.setDescription(cmd.description !== null ? cmd.description : cmd.shortBrief) |
.setDescription("`<...>` means required argument, `[...]` means optional argument.\n\n" + (cmd.description !== null ? cmd.description : cmd.shortBrief)) |
442 |
.addFields(fields) |
.addFields(fields) |
443 |
] |
] |
444 |
}); |
}); |