/[sudobot]/trunk/src/utils/Help.ts
ViewVC logotype

Diff of /trunk/src/utils/Help.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/commands/help.js revision 11 by rakin, Mon Jul 29 17:28:13 2024 UTC trunk/src/utils/Help.ts revision 107 by rakin, Mon Jul 29 17:28:37 2024 UTC
# Line 1  Line 1 
1  const { MessageActionRow, MessageButton } = require("discord.js");  import { CommandHelpData } from "../types/CommandHelpData";
 const MessageEmbed = require("../src/MessageEmbed");  
 const { escapeRegex } = require("../src/util");  
2    
3  module.exports = {  export default <CommandHelpData[]> [
4      version: "1.0.0-beta",      {
5      commands: [          name: 'about',
6          {          shortBrief: "Show information about the bot.",
7              name: 'addsnippet',          description: null,
8              shortBrief: "Adds a snippet.",          structure: "",
9              description: null,          example: "`%%about`",
10              structure: "<Name> <Content>",          notes: null,
11              example: "`%%addsnippet roles There are 2 roles`\n`%%addsnippet roles There are 2 roles\nAdmin - Administrator\nMod - Moderator`",          slashCommand: true,
12              notes: null          legacyCommand: true
13          },      },
14          {      {
15              name: 'announce',          name: 'addqueue',
16              shortBrief: "Announce something in the given channel.",          shortBrief: "Add a queue job.",
17              description: "Announce something in the given channel. The channel should be set in the configuration.",          description: 'Adds a queued command to the bot\'s memory and after the given amount of time it gets executed.',
18              structure: "<Content>",          structure: "<time> <command>",
19              example: "`%%announce Hello there!\nWe've just finished our job!\n@everyone`",          example: "`%%addqueue 15m echo Hello world`\n`%%addqueue 12h kick 875275828247255`",
20              notes: null          notes: null,
21          },          slashCommand: false,
22          {          legacyCommand: true
23              name: 'ban',      },
24              shortBrief: "Ban someone in this server.",      {
25              description: null,          name: 'addsnippet',
26              structure: "<UserID|Mention> [Reason]",          shortBrief: "Adds a snippet.",
27              example: "`%%ban 385753607325075320`\n`%%ban @Someone You are spamming a lot`",          description: null,
28              notes: null          structure: "<Name> <Content>",
29          },          example: "`%%addsnippet roles There are 2 roles`\n`%%addsnippet roles There are 2 roles\nAdmin - Administrator\nMod - Moderator`",
30          {          notes: null,
31              name: 'bean',          slashCommand: true,
32              shortBrief: "Bean someone in this server.",          legacyCommand: true
33              description: "Bean someone. It doesn't do anything except pretending.",      },
34              structure: "<UserID|Mention> [Reason]",      {
35              example: "`%%bean 385753607325075320`\n`%%bean @Someone You are spamming a lot`",          name: 'afk',
36              notes: null          shortBrief: "Keeps track of your mentions and tells other users that you're AFK.",
37          },          description: null,
38          {          structure: "[Reason]",
39              name: 'cat',          example: "`%%afk`\n`%%afk Having dinner`",
40              shortBrief: "Get a random kitty picture.",          notes: null,
41              description: "Fetches a random cat picture from `thecatapi.com` API.",          slashCommand: true,
42              structure: "",          legacyCommand: true
43              example: "`%%cat`",      },
44              notes: null      {
45          },          name: 'announce',
46          {          shortBrief: "Announce something in the given channel.",
47              name: 'delsnippet',          description: "Announce something in the given channel. The channel should be set in the configuration.",
48              shortBrief: "Deletes a snippet.",          structure: "<Content>",
49              description: null,          example: "`%%announce Hello there!\nWe've just finished our job!\n@everyone`",
50              structure: "<Name>",          notes: null,
51              example: "`%%delsnippet roles`",          slashCommand: true,
52              notes: null          legacyCommand: true
53          },      },
54          {      {
55              name: 'dog',          name: 'appeal',
56              shortBrief: "Get a random doggy picture.",          shortBrief: "Send a message to staff members about a punishment appeal.",
57              description: "Fetches a random cat picture from `thedogapi.com` API.",          description: null,
58              structure: "",          structure: "",
59              example: "`%%dog`",          example: "`%%appeal`",
60              notes: null          notes: null,
61          },          slashCommand: true,
62          {          legacyCommand: false
63              name: 'echo',      },
64              shortBrief: "Echo (re-send) a message.",      {
65              description: "Re-send a message from the bot.",          name: 'avatar',
66              structure: "<content> [channelMention]",          shortBrief: "Show someone's avatar.",
67              example: "`%%echo Something\nVery Cool`\n`%%echo Something\nVery Cool #general`",          description: null,
68              notes: null          structure: "[UserID|UserTag|Mention]=CURRENT_USER",
69          },          example: "`%%avatar 385753607325075320`\n`%%avatar`",
70          {          notes: null,
71              name: 'general-role',          slashCommand: true,
72              shortBrief: "Set the general role.",          legacyCommand: true
73              description: null,      },
74              structure: "<RoleID|RoleMention>",      {
75              example: "`%%general-role 937923625698638`\n`%%general-role @General`",          name: 'ban',
76              notes: null          shortBrief: "Ban someone in this server.",
77          },          description: "Ban a user in this server.",
78          {          structure: "<UserID|UserTag|Mention> [-d=DAYS] [Reason]",
79              name: 'help',          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`",
80              shortBrief: "Show this help and exit.",          notes: null,
81              description: null,          options: {
82              structure: "[command]",              "-d": "The number of days old messages to delete. It must be in range 0-7. An argument is required.",
             example: "`%%help`\n`%%help mute`",  
             notes: null  
         },  
         {  
             name: 'httpcat',  
             shortBrief: "Get some funny cat memes related to HTTP.",  
             description: "Get some funny cat memes related to HTTP status codes, using http.cat API.",  
             structure: "<status>",  
             example: "`%%httpcat 403`",  
             notes: null  
         },  
         {  
             name: 'httpdog',  
             shortBrief: "Get some funny dog memes related to HTTP.",  
             description: "Get some funny dog memes related to HTTP status codes, using http.dog API.",  
             structure: "<status>",  
             example: "`%%httpdog 403`",  
             notes: null  
         },  
         {  
             name: 'kick',  
             shortBrief: "Kick someone from this server.",  
             description: null,  
             structure: "<UserID|Mention> [Reason]",  
             example: "`%%kick 385753607325075320`\n`%%kick @Someone You are spamming a lot`",  
             notes: null  
         },  
         {  
             name: 'lock',  
             shortBrief: "Lock a specific channel.",  
             description: "Makes the given channel read-only for the general members. If no channel is present, the current channel will be locked.",  
             structure: "[ChannelID|ChannelMention] [...options]",  
             example: "`%%lock 385753607325075320`\n`%%lock #general`\n`%%lock`",  
             notes: null,  
             options: {  
                 "--no-send": "Do not send a confirmation message to the locked channel",  
                 "--everyone": "Lock the channels for @everyone rather than the general role",  
             }  
         },  
         {  
             name: 'lockall',  
             shortBrief: "Lock all the channels given in the configuration.",  
             description: "Makes the given channels read-only for the general members.",  
             structure: "[...options]",  
             example: "`%%lockall --no-send\n`%%lockall`\n`%%lockall --everyone`",  
             notes: null,  
             options: {  
                 "--no-send": "Do not send a confirmation message to the locked channel",  
                 "--everyone": "Lock the channels for @everyone rather than the general role",  
             }  
         },  
         {  
             name: 'mod-role',  
             shortBrief: "Set the moderator role.",  
             description: null,  
             structure: "<RoleID|RoleMention>",  
             example: "`%%mod-role 937923625698638`\n`%%mod-role @Moderator`",  
             notes: null  
         },  
         {  
             name: 'mute',  
             shortBrief: "Mute someone in this server.",  
             description: null,  
             structure: "<UserID|Mention> [-t=DURATION] [Reason]",  
             example: "`%%mute 385753607325075320`\n`%%mute @Someone You are spamming a lot`\n`%%mute @Someone -t 10m You are spamming a lot`",  
             options: {  
                 "-t": "Set the mute duration"  
             },  
             notes: null  
         },  
         {  
             name: 'muted-role',  
             shortBrief: "Set the muted role.",  
             description: null,  
             structure: "<RoleID|RoleMention>",  
             example: "`%%muted-role 937923625698638`\n`%%muted-role @Muted`",  
             notes: null  
         },  
         {  
             name: 'mvsnippet',  
             shortBrief: "Rename a snippet.",  
             description: null,  
             structure: "<oldName> <newName>",  
             example: "`%%mvsnippet abc bca`",  
             notes: null  
         },  
         {  
             name: 'note',  
             shortBrief: "Take a note about an user.",  
             description: null,  
             structure: "<UserID|UserMention> <note>",  
             example: "`%%note @Someone Simple note.`",  
             notes: null  
         },  
         {  
             name: 'note',  
             shortBrief: "Take a note about an user.",  
             description: null,  
             structure: "<UserID|UserMention> <note>",  
             example: "`%%note @Someone Simple note.`",  
             notes: null  
         },  
         {  
             name: 'notedel',  
             shortBrief: "Delete a note.",  
             description: null,  
             structure: "<NoteID>",  
             example: "`%%notedel 922`",  
             notes: null  
         },  
         {  
             name: 'noteget',  
             shortBrief: "Get a note.",  
             description: null,  
             structure: "<NoteID>",  
             example: "`%%noteget 922`",  
             notes: null  
         },  
         {  
             name: 'notes',  
             shortBrief: "Get all notes for a specific user.",  
             description: null,  
             structure: "<UserID|UserMention>",  
             example: "`%%notes @Someone`",  
             notes: null  
         },  
         {  
             name: 'pixabay',  
             shortBrief: "Fetch images from Pixabay.",  
             description: "Search & fetch images from Pixabay API.\n\nAvailable Subcommands:\n\tphoto - Fetch photos only.\n\tvector - Fetch vectors only.\n\tillustration - Fetch illustrations only\n\timage - Fetch any image.",  
             structure: "<subcommand> [query]",  
             example: "`%%pixabay image`\n`%%pixabay photo birds`",  
             notes: null  
         },  
         {  
             name: 'prefix',  
             shortBrief: "Change the bot prefix.",  
             description: null,  
             structure: "<NewPrefix>",  
             example: "`%%prefix -`",  
             notes: null  
         },  
         {  
             name: 'setconfig',  
             shortBrief: "Change the bot configuration keys.",  
             description: null,  
             structure: "<key> <value>",  
             example: "`%%setconfig debug true`",  
             notes: null  
         },  
         {  
             name: 'spamfilter',  
             shortBrief: "Change the spam filter configuration keys.",  
             description: null,  
             structure: "<key> <value>",  
             example: "`%%spamfilter include #general`",  
             notes: null  
         },  
         {  
             name: 'unban',  
             shortBrief: "Unban a user from this server.",  
             description: null,  
             structure: "<UserID>",  
             example: "`%%unban 2946255269594753792`",  
             notes: null  
         },  
         {  
             name: 'unlock',  
             shortBrief: "Unock a specific channel.",  
             description: "Makes the given channel writable for the general members. If no channel is present, the current channel is unlocked.",  
             structure: "[ChannelID|ChannelMention] [...options]",  
             example: "`%%unlock 385753607325075320`\n`%%unlock #general`\n`%%unlock`",  
             notes: null,  
             options: {  
                 "--no-send": "Do not send a confirmation message to the locked channel",  
                 "--everyone": "Unock the channels for @everyone rather than the general role",  
             }  
         },  
         {  
             name: 'unlockall',  
             shortBrief: "Unlock all the channels given in the configuration.",  
             description: "Makes the given channels writable for the general members.",  
             structure: "[...options]",  
             example: "`%%unlockall --no-send\n`%%unlockall`\n`%%unlockall --everyone`",  
             notes: null,  
             options: {  
                 "--no-send": "Do not send a confirmation message to the locked channel",  
                 "--everyone": "Lock the channels for @everyone rather than the general role",  
             }  
         },  
         {  
             name: 'unmute',  
             shortBrief: "Unute someone in this server.",  
             description: null,  
             structure: "<UserID|Mention>",  
             example: "`%%unmute 385753607325075320`\n`%%unmute @Someone You are spamming a lot`",  
             notes: null  
83          },          },
84          {          slashCommand: true,
85              name: 'warn',          legacyCommand: true
86              shortBrief: "Warn someone in this server.",      },
87              description: null,      {
88              structure: "<UserID|Mention> [Reason]",          name: 'ballot',
89              example: "`%%warn 385753607325075320`\n`%%warn @Someone You are spamming a lot`",          shortBrief: "Create/view a ballot (poll) message.",
90              notes: null          description: null,
91            subcommands: {
92                "create": "Create a ballot message. Argument 1 should be the ballot message content.",
93                "view": "View a ballot message stats. Argument 1 should be the ballot ID."
94            },
95            structure: "<subcommand> <subcommand-arguments>",
96            example: "`%%ballot create What do you think guys?`\n`%%ballot view 15`",
97            notes: null,
98            slashCommand: true,
99            legacyCommand: true
100        },
101        {
102            name: 'bean',
103            shortBrief: "Bean someone in this server.",
104            description: "Bean someone. It doesn't do anything except pretending.",
105            structure: "<UserID|UserTag|Mention> [Reason]",
106            example: "`%%bean 385753607325075320`\n`%%bean @Someone You are spamming a lot`",
107            notes: null,
108            slashCommand: true,
109            legacyCommand: true
110        },
111        {
112            name: 'cat',
113            shortBrief: "Get a random kitty picture.",
114            description: "Fetches a random cat picture from `thecatapi.com` API.",
115            structure: "",
116            example: "`%%cat`",
117            notes: null,
118            slashCommand: true,
119            legacyCommand: true
120        },
121        {
122            name: 'clear',
123            shortBrief: "Clear all messages from a user.",
124            description: "Clear all messages from a user, in the current channel. This might take a while.",
125            structure: "<UserID|UserTag|UserMention>",
126            example: "`%%clear 83474924191884727`\n`%%clear @Someone`",
127            notes: null,
128            slashCommand: true,
129            legacyCommand: true
130        },
131        {
132            name: 'delqueue',
133            shortBrief: "Delete a queue job.",
134            description: "Delete a queued command by its ID.",
135            structure: "<QueueID>",
136            example: "`%%delqueue 80`",
137            notes: null,
138            slashCommand: false,
139            legacyCommand: true
140        },
141        {
142            name: 'delsnippet',
143            shortBrief: "Deletes a snippet.",
144            description: null,
145            structure: "<Name>",
146            example: "`%%delsnippet roles`",
147            notes: null,
148            slashCommand: true,
149            legacyCommand: true
150        },
151        {
152            name: 'dog',
153            shortBrief: "Get a random doggy picture.",
154            description: "Fetches a random cat picture from `thedogapi.com` API.",
155            structure: "",
156            example: "`%%dog`",
157            notes: null,
158            slashCommand: true,
159            legacyCommand: true
160        },
161        {
162            name: 'echo',
163            shortBrief: "Echo (re-send) a message.",
164            description: "Re-send a message from the bot.",
165            structure: "<content> [channelMention]",
166            example: "`%%echo Something\nVery Cool`\n`%%echo Something\nVery Cool #general`",
167            notes: null,
168            slashCommand: true,
169            legacyCommand: true
170        },
171        {
172            name: 'emoji',
173            shortBrief: "Get info about an emoji. Must be guild (server) specific emoji.",
174            description: null,
175            structure: "<GuildEmoji|GuildEmojiName>",
176            example: "`%%emoji check`\n`%%emoji error`",
177            notes: null,
178            slashCommand: false,
179            legacyCommand: true
180        },
181        {
182            name: 'expire',
183            shortBrief: "Echo (re-send) a message and delete it after the given time.",
184            description: "Re-send a message from the bot and delete it automatically after the given time interval.",
185            structure: "<timeInterval> <content> [channelMention]",
186            example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`",
187            notes: null,
188            slashCommand: true,
189            legacyCommand: true
190        },
191        {
192            name: 'expiresc',
193            shortBrief: "Schedule a message and delete it after the given time.",
194            description: "Schedule a message from the bot and delete it automatically after the given time interval.",
195            structure: "<scheduleTimeInterval> <expireTimeInterval> <content> [channelMention]",
196            example: "`%%echo 25m 5h Something\nVery Cool`\n`%%echo 1h 7d Something\nVery Cool #general`",
197            notes: null,
198            slashCommand: true,
199            legacyCommand: true
200        },
201        {
202            name: 'help',
203            shortBrief: "Show this help and exit.",
204            description: null,
205            structure: "[command]",
206            example: "`%%help`\n`%%help mute`",
207            notes: null,
208            slashCommand: true,
209            legacyCommand: true
210        },
211        {
212            name: 'history',
213            shortBrief: "Show moderation history for a user.",
214            description: null,
215            structure: "<UserMention|UserID>",
216            example: "`%%history 27372628277272625`\n`%%history @Someone`",
217            notes: null,
218            slashCommand: true,
219            legacyCommand: true
220        },
221        {
222            name: 'httpcat',
223            shortBrief: "Get some funny cat memes related to HTTP.",
224            description: "Get some funny cat memes related to HTTP status codes, using http.cat API.",
225            structure: "<status>",
226            example: "`%%httpcat 403`",
227            notes: null,
228            slashCommand: true,
229            legacyCommand: true
230        },
231        {
232            name: 'httpdog',
233            shortBrief: "Get some funny dog memes related to HTTP.",
234            description: "Get some funny dog memes related to HTTP status codes, using http.dog API.",
235            structure: "<status>",
236            example: "`%%httpdog 403`",
237            notes: null,
238            slashCommand: true,
239            legacyCommand: true
240        },
241        {
242            name: 'joke',
243            shortBrief: "Fetch a random joke from The Joke API.",
244            description: null,
245            structure: "",
246            example: "`%%joke`",
247            notes: null,
248            slashCommand: true,
249            legacyCommand: true
250        },
251        {
252            name: 'kick',
253            shortBrief: "Kick someone from this server.",
254            description: null,
255            structure: "<UserID|UserTag|Mention> [Reason]",
256            example: "`%%kick 385753607325075320`\n`%%kick @Someone You are spamming a lot`",
257            notes: null,
258            slashCommand: true,
259            legacyCommand: true
260        },
261        {
262            name: 'lock',
263            shortBrief: "Lock a specific channel.",
264            description: "Makes the given channel read-only for the general members. If no channel is present, the current channel will be locked.",
265            structure: "[ChannelID|ChannelMention] [...options]",
266            example: "`%%lock 385753607325075320`\n`%%lock #general`\n`%%lock`",
267            notes: null,
268            options: {
269                "--no-send": "Do not send a confirmation message to the locked channel",
270          },          },
271          {          slashCommand: true,
272              name: 'warndel',          legacyCommand: true
273              shortBrief: "Delete a warning.",      },
274              description: null,      {
275              structure: "<ID>",          name: 'lockall',
276              example: "`%%warndel 39`",          shortBrief: "Lock all the channels given in the configuration.",
277              notes: null          description: "Makes the given channels read-only for the general members.",
278            structure: "<...ChannelMention|ChannelIDs> [--raid] [-r=ROLEMENTION|ROLEID]",
279            example: "`%%lockall 2572562578247841786\n`%%lockall 2572562578247841786 2572562578247841782 2572562578247841783`\n`%%lockall 2572562578247841786 2572562578247841785 -r @General`",
280            notes: null,
281            options: {
282                "--raid": "Lock all raid protected channels",
283          },          },
284          {          slashCommand: true,
285              name: 'warning',          legacyCommand: true
286              shortBrief: "Show a warning.",      },
287              description: null,      {
288              structure: "<ID>",          name: 'massban',
289              example: "`%%warning 39`",          shortBrief: 'Mass ban (multiple) users',
290              notes: null          description: null,
291            structure: '<...UserIDs|UserMentions> [Reason]',
292            example: '`%%massban 8247282727258725258 @someone Mass Banning`',
293            notes: null,
294            slashCommand: true,
295            legacyCommand: true
296        },
297        {
298            name: 'mute',
299            shortBrief: "Mute someone in this server.",
300            description: null,
301            structure: "<UserID|UserTag|Mention> [-t=DURATION] [Reason]",
302            example: "`%%mute 385753607325075320`\n`%%mute @Someone You are spamming a lot`\n`%%mute @Someone -t 10m You are spamming a lot`",
303            options: {
304                "-t": "Set the mute duration"
305            },
306            notes: null,
307            slashCommand: true,
308            legacyCommand: true
309        },
310        {
311            name: 'mvsnippet',
312            shortBrief: "Rename a snippet.",
313            description: null,
314            structure: "<oldName> <newName>",
315            example: "`%%mvsnippet abc bca`",
316            notes: null,
317            slashCommand: true,
318            legacyCommand: true
319        },
320        {
321            name: 'note',
322            shortBrief: "Take a note about an user.",
323            description: null,
324            structure: "<UserID|UserTag|UserMention> <note>",
325            example: "`%%note @Someone Simple note.`",
326            notes: null,
327            slashCommand: true,
328            legacyCommand: true
329        },
330        {
331            name: 'notedel',
332            shortBrief: "Delete a note.",
333            description: null,
334            structure: "<NoteID>",
335            example: "`%%notedel 922`",
336            notes: null,
337            slashCommand: true,
338            legacyCommand: true
339        },
340        {
341            name: 'noteget',
342            shortBrief: "Get a note.",
343            description: null,
344            structure: "<NoteID>",
345            example: "`%%noteget 922`",
346            notes: null,
347            slashCommand: true,
348            legacyCommand: true
349        },
350        {
351            name: 'notes',
352            shortBrief: "Get all notes for a specific user.",
353            description: null,
354            structure: "<UserID|UserTag|UserMention>",
355            example: "`%%notes @Someone`",
356            notes: null,
357            slashCommand: true,
358            legacyCommand: true
359        },
360        {
361            name: 'pixabay',
362            shortBrief: "Fetch images from Pixabay.",
363            description: "Search & fetch images from Pixabay API.\n\nAvailable Subcommands:\n\tphoto - Fetch photos only.\n\tvector - Fetch vectors only.\n\tillustration - Fetch illustrations only\n\timage - Fetch any image.",
364            structure: "<subcommand> [query]",
365            example: "`%%pixabay image`\n`%%pixabay photo birds`",
366            notes: null,
367            slashCommand: true,
368            legacyCommand: true
369        },
370        {
371            name: 'profile',
372            shortBrief: 'Show server profile',
373            description: null,
374            structure: '[UserID|UserTag|UserMention]',
375            example: '`%%profile`\n`%%profile @Someone`',
376            notes: null,
377            slashCommand: true,
378            legacyCommand: true
379        },
380        {
381            name: 'queues',
382            shortBrief: "Show a list of all queue jobs.",
383            description: null,
384            structure: "",
385            example: "`%%queues`",
386            notes: null,
387            slashCommand: true,
388            legacyCommand: true
389        },
390        {
391            name: 'rolelist',
392            shortBrief: 'List all roles in the server',
393            description: null,
394            structure: "[Page] [Role]",
395            example: "`%%rolelist`",
396            notes: null,
397            slashCommand: true,
398            legacyCommand: false
399        },
400        {
401            name: 'schedule',
402            shortBrief: "Echo (re-send) a message after the given time.",
403            description: "Re-send a message from the bot automatically after the given time interval.",
404            structure: "<timeInterval> <content> [channelMention]",
405            example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`",
406            notes: null,
407            slashCommand: true,
408            legacyCommand: true
409        },
410        {
411            name: 'send',
412            shortBrief: "Send a DM to a user.",
413            description: null,
414            structure: "<UserID|UserTag|Mention> <content>",
415            example: "`%%send 278358918549759428 Hello world`\n`%%send @Someone Hello world`",
416            notes: null,
417            slashCommand: true,
418            legacyCommand: true
419        },
420        {
421            name: 'setchperms',
422            shortBrief: "Set channel permissions in bulk.",
423            description: null,
424            structure: "<...ChannelIDs|ChannelMentions> <Role> <PermissionKey> <null|true|false>",
425            example: "`%%setchperms 827483719415287387 24872512882472142 #general @everyone SEND_MESSAGES false`",
426            notes: null,
427            slashCommand: true,
428            legacyCommand: true
429        },
430        {
431            name: 'softban',
432            shortBrief: "Softban a user.",
433            description: "A softban means banning and unbanning a user immediately so that their messages gets deleted.",
434            structure: "<UserID|UserTag|UserMention> [-d=DAYS] [Reason]",
435            example: "`%%softban @Someone`\n`%%softban 44347362235774742 Hello world`",
436            notes: null,
437            slashCommand: true,
438            legacyCommand: true
439        },
440        {
441            name: 'stats',
442            shortBrief: "Show the server stats.",
443            description: null,
444            structure: "",
445            example: "`%%stats",
446            notes: null,
447            slashCommand: true,
448            legacyCommand: true
449        },
450        {
451            name: 'system',
452            shortBrief: "Show the system status.",
453            description: null,
454            structure: "",
455            example: "`%%system",
456            notes: null,
457            slashCommand: true,
458            legacyCommand: true
459        },
460        {
461            name: 'tempban',
462            shortBrief: "Temporarily ban a user.",
463            description: null,
464            structure: "<UserID|UserTag|UserMention> <Time> [-d=DAYS] [Reason]",
465            example: "`%%softban @Someone 20m`\n`%%softban 44347362235774742 50m Hello world`",
466            notes: null,
467            slashCommand: true,
468            legacyCommand: true
469        },
470        {
471            name: 'unban',
472            shortBrief: "Unban a user from this server.",
473            description: null,
474            structure: "<UserID>",
475            example: "`%%unban 2946255269594753792`",
476            notes: null,
477            slashCommand: true,
478            legacyCommand: true
479        },
480        {
481            name: 'unlock',
482            shortBrief: "Unlock a specific channel.",
483            description: "Makes the given channel writable for the general members. If no channel is present, the current channel is unlocked.",
484            structure: "[ChannelID|ChannelMention] [...options]",
485            example: "`%%unlock 385753607325075320`\n`%%unlock #general`\n`%%unlock`",
486            notes: null,
487            options: {
488                "--no-send": "Do not send a confirmation message to the locked channel",
489          },          },
490          {          slashCommand: true,
491              name: 'warnings',          legacyCommand: true
492              shortBrief: "Show all warnings.",      },
493              description: "Show all warnings in this server. Passing an user will only show their warnings.",      {
494              structure: "[UserId|Mention]",          name: 'unlockall',
495              example: "`%%warnings`\n`%%warnings 948489127957979253978538`",          shortBrief: "Unlock all the channels given in the configuration.",
496              notes: null          description: "<...ChannelMention|ChannelIDs> [--raid] [-r=ROLEMENTION|ROLEID]",
497            structure: "[...options]",
498            example: "`%%unlockall --raid\n`%%unlockall 348764381911364631 634894637314679163795`",
499            notes: null,
500            options: {
501                "--raid": "Unlock all Raid-protected channels"
502          },          },
503      ],          slashCommand: true,
504      async render() {          legacyCommand: true
         let string = '';  
   
         for (let cmd of this.commands) {  
             string += `\n\n**${cmd.name}**\n${cmd.shortBrief}`;  
         }  
   
         return string;  
505      },      },
506      async handle(msg, cm) {      {
507          if (typeof cm.args[0] === 'undefined') {          name: 'unmute',
508              // await msg.reply({          shortBrief: "Unmute someone in this server.",
509              //     embeds: [          description: null,
510              //         new MessageEmbed()          structure: "<UserID|UserTag|Mention>",
511              //         .setColor('#f14a60')          example: "`%%unmute 385753607325075320`\n`%%unmute @Someone You are spamming a lot`",
512              //         .setDescription(`This command requires at least one argument.`)          notes: null,
513              //     ]          slashCommand: true,
514              // });          legacyCommand: true
515        },
516              await msg.reply({      {
517                  embeds: [          name: 'warn',
518                      new MessageEmbed()          shortBrief: "Warn someone in this server.",
519                      .setDescription("The command list. Run `" + app.config.get('prefix') + "help <commandName>` for more information about a specific command.\n" + await this.render())          description: null,
520                      .setTitle('Help')          structure: "<UserID|UserTag|Mention> [Reason]",
521                  ],          example: "`%%warn 385753607325075320`\n`%%warn @Someone You are spamming a lot`",
522              });          notes: null,
523            slashCommand: true,
524              return;          legacyCommand: true
525          }      },
526        {
527          const cmd = this.commands.find(c => c.name === cm.args[0]);          name: 'warning',
528            shortBrief: "Operations with warnings.",
529          if (!cmd) {          description: null,
530              await msg.reply({          structure: "<ID>",
531                  embeds: [          example: "`%%warning list @Someone`\n`%%warning clear @Someone`\n`%%warning remove 24`\n`%%warning view 35`",
532                      new MessageEmbed()          notes: null,
533                      .setColor('#f14a60')          slashCommand: true,
534                      .setDescription(`Invalid command \`${cm.args[0]}\`.`)          legacyCommand: true,
535                  ]          subcommands: {
536              });              "list": "List all warnings for a user",
537                "clear": "Clear all warnings for a user",
538              return;              "remove": "Remove a warning by ID",
539          }              "view": "View information about a warning by ID"
   
         let fields = [  
             {  
                 name: "Usage",  
                 value: `\`${app.config.get('prefix')}${cmd.name}\`` + (cmd.structure.trim() !== '' ? ` \`${cmd.structure}\`` : '')  
             },  
             {  
                 name: 'Examples',  
                 value: cmd.example.replace(/\%\%/g, app.config.get('prefix'))  
             }  
         ];  
   
         if (cmd.options !== undefined) {  
             let str = '';  
   
             for (let opt in cmd.options)  
                 str += `\`${opt}\` - ${cmd.options[opt]}\n`;  
   
             str = str.substring(0, str.length - 1);  
   
             fields.push({  
                 name: 'Options',  
                 value: str  
             });  
         }  
   
         if (cmd.notes !== null) {  
             fields.push({  
                 name: "Notes",  
                 value: cmd.notes  
             });  
540          }          }
   
         await msg.reply({  
             embeds: [  
                 new MessageEmbed()  
                 .setTitle(`${app.config.get('prefix')}${cmd.name}`)  
                 .setDescription(cmd.description !== null ? cmd.description : cmd.shortBrief)  
                 .addFields(fields)  
             ]  
         });  
     }  
 };  
541        },
542    ]

Legend:
Removed from v.11  
changed lines
  Added in v.107

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26