/[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 41 by rakin, Mon Jul 29 17:28:19 2024 UTC trunk/src/utils/Help.ts revision 393 by rakin, Mon Jul 29 17:29:59 2024 UTC
# Line 1  Line 1 
1  const { MessageActionRow, MessageButton } = require("discord.js");  /**
2  const MessageEmbed = require("../src/MessageEmbed");  * This file is part of SudoBot.
3  const { escapeRegex } = require("../src/util");  *
4    * Copyright (C) 2021-2022 OSN Inc.
5  module.exports = {  *
6      version: "1.6.4",  * SudoBot is free software; you can redistribute it and/or modify it
7      commands: [  * under the terms of the GNU Affero General Public License as published by
8          {  * the Free Software Foundation, either version 3 of the License, or
9              name: 'addsnippet',  * (at your option) any later version.
10              shortBrief: "Adds a snippet.",  *
11              description: null,  * SudoBot is distributed in the hope that it will be useful, but
12              structure: "<Name> <Content>",  * WITHOUT ANY WARRANTY; without even the implied warranty of
13              example: "`%%addsnippet roles There are 2 roles`\n`%%addsnippet roles There are 2 roles\nAdmin - Administrator\nMod - Moderator`",  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14              notes: null  * GNU Affero General Public License for more details.
15          },  *
16          {  * You should have received a copy of the GNU Affero General Public License
17              name: 'afk',  * along with SudoBot. If not, see <https://www.gnu.org/licenses/>.
18              shortBrief: "Keeps track of your mentions and tells other users that you're AFK.",  */
19              description: null,  
20              structure: "[Reason]",  import { CommandHelpData } from "../types/CommandHelpData";
21              example: "`%%afk`\n`%%afk Having dinner`",  
22              notes: null  export default <CommandHelpData[]> [
23          },      {
24          {          name: 'about',
25              name: 'announce',          shortBrief: "Show information about the bot.",
26              shortBrief: "Announce something in the given channel.",          description: null,
27              description: "Announce something in the given channel. The channel should be set in the configuration.",          structure: "",
28              structure: "<Content>",          example: "`%%about`",
29              example: "`%%announce Hello there!\nWe've just finished our job!\n@everyone`",          notes: null,
30              notes: null          slashCommand: true,
31          },          legacyCommand: true
32          {      },
33              name: 'ban',      {
34              shortBrief: "Ban someone in this server.",          name: 'addqueue',
35              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.",          shortBrief: "Add a queue job.",
36              structure: "<UserID|Mention> [-d=DAYS] [Reason]",          description: 'Adds a queued command to the bot\'s memory and after the given amount of time it gets executed.',
37              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`",          structure: "<time> <command>",
38              notes: null          example: "`%%addqueue 15m echo Hello world`\n`%%addqueue 12h kick 875275828247255`",
39          },          notes: null,
40          {          slashCommand: false,
41              name: 'bean',          legacyCommand: true
42              shortBrief: "Bean someone in this server.",      },
43              description: "Bean someone. It doesn't do anything except pretending.",      {
44              structure: "<UserID|Mention> [Reason]",          name: 'addsnippet',
45              example: "`%%bean 385753607325075320`\n`%%bean @Someone You are spamming a lot`",          shortBrief: "Adds a snippet.",
46              notes: null          description: null,
47          },          structure: "<Name> <Content>",
48          {          example: "`%%addsnippet roles There are 2 roles`\n`%%addsnippet roles There are 2 roles\nAdmin - Administrator\nMod - Moderator`",
49              name: 'cat',          notes: null,
50              shortBrief: "Get a random kitty picture.",          slashCommand: true,
51              description: "Fetches a random cat picture from `thecatapi.com` API.",          legacyCommand: true
52              structure: "",      },
53              example: "`%%cat`",      {
54              notes: null          name: 'afk',
55          },          shortBrief: "Keeps track of your mentions and tells other users that you're AFK.",
56          {          description: null,
57              name: 'clear',          structure: "[Reason]",
58              shortBrief: "Clear all messages from a user.",          example: "`%%afk`\n`%%afk Having dinner`",
59              description: "Clear all messages from a user, in the current channel. This might take a while.",          notes: null,
60              structure: "<UserID|UserMention>",          slashCommand: true,
61              example: "`%%clear 83474924191884727`\n`%%clear @Someone`",          legacyCommand: true
62              notes: null      },
63          },      {
64          {          name: 'announce',
65              name: 'delsnippet',          shortBrief: "Announce something in the given channel.",
66              shortBrief: "Deletes a snippet.",          description: "Announce something in the given channel. The channel should be set in the configuration.",
67              description: null,          structure: "<Content>",
68              structure: "<Name>",          example: "`%%announce Hello there!\nWe've just finished our job!\n@everyone`",
69              example: "`%%delsnippet roles`",          notes: null,
70              notes: null          slashCommand: true,
71          },          legacyCommand: true
72          {      },
73              name: 'dog',      {
74              shortBrief: "Get a random doggy picture.",          name: 'antijoin',
75              description: "Fetches a random cat picture from `thedogapi.com` API.",          shortBrief: "Enable the AntiJoin shield.",
76              structure: "",          description: "Enables the AntiJoin shield.\nWhile AntiJoin is active, users will not be able to join the server (they will be kicked). This is useful when handling a raid.",
77              example: "`%%dog`",          structure: "",
78              notes: null          example: "`%%antijoin",
79          },          notes: null,
80          {          slashCommand: true,
81              name: 'echo',          legacyCommand: true
82              shortBrief: "Echo (re-send) a message.",      },
83              description: "Re-send a message from the bot.",      {
84              structure: "<content> [channelMention]",          name: 'appeal',
85              example: "`%%echo Something\nVery Cool`\n`%%echo Something\nVery Cool #general`",          shortBrief: "Send a message to staff members about a punishment appeal.",
86              notes: null          description: null,
87          },          structure: "",
88          {          example: "`%%appeal`",
89              name: 'general-role',          notes: null,
90              shortBrief: "Set the general role.",          slashCommand: true,
91              description: null,          legacyCommand: false
92              structure: "<RoleID|RoleMention>",      },
93              example: "`%%general-role 937923625698638`\n`%%general-role @General`",      {
94              notes: null          name: 'avatar',
95          },          shortBrief: "Show someone's avatar.",
96          {          description: null,
97              name: 'help',          structure: "[UserID|UserTag|Mention=CURRENT_USER]",
98              shortBrief: "Show this help and exit.",          example: "`%%avatar 385753607325075320`\n`%%avatar`",
99              description: null,          notes: null,
100              structure: "[command]",          slashCommand: true,
101              example: "`%%help`\n`%%help mute`",          legacyCommand: true
102              notes: null      },
103          },      {
104          {          name: 'avatarlookup',
105              name: 'history',          shortBrief: "Lookup someone's avatar!",
106              shortBrief: "Show moderation history for a user.",          description: "Lookup someone's avatar, using Google Image Search.\nThis command is a subcommand of the `/lookup` slash command.",
107              description: null,          structure: "<UserID|Mention>",
108              structure: "<UserMention|UserID>",          example: "`%%avatarlookup 385753607325075320`\n`",
109              example: "`%%history 27372628277272625`\n`%%history @Someone`",          notes: null,
110              notes: null          slashCommand: true,
111          },          legacyCommand: true
112          {      },
113              name: 'httpcat',      {
114              shortBrief: "Get some funny cat memes related to HTTP.",          name: 'ban',
115              description: "Get some funny cat memes related to HTTP status codes, using http.cat API.",          shortBrief: "Ban someone in this server.",
116              structure: "<status>",          description: "Ban a user in this server.",
117              example: "`%%httpcat 403`",          structure: "<UserID|UserTag|Mention> [-d=DAYS] [Reason]",
118              notes: null          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`",
119          },          notes: null,
120          {          options: {
121              name: 'httpdog',              "-d": "The number of days old messages to delete. It must be in range 0-7. An argument is required.",
             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",  
             }  
         },  
         {  
             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",  
             }  
         },  
         {  
             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: '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: 'send',  
             shortBrief: "Send a DM to a user.",  
             description: null,  
             structure: "<UserID|Mention> <content>",  
             example: "`%%send 278358918549759428 Hello world`\n`%%send @Someone Hello world`",  
             notes: null  
         },  
         {  
             name: 'spamfilter',  
             shortBrief: "Change the spam filter configuration keys.",  
             description: null,  
             structure: "<key> <value>",  
             example: "`%%spamfilter include #general`",  
             notes: null  
         },  
         {  
             name: 'stats',  
             shortBrief: "Show the server stats.",  
             description: null,  
             structure: "",  
             example: "`%%stats",  
             notes: null  
         },  
         {  
             name: 'unban',  
             shortBrief: "Unban a user from this server.",  
             description: null,  
             structure: "<UserID>",  
             example: "`%%unban 2946255269594753792`",  
             notes: null  
         },  
         {  
             name: 'unlock',  
             shortBrief: "Unlock 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",  
             }  
         },  
         {  
             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",  
                 "--raid": "Unlock all Raid-locked channels"  
             }  
         },  
         {  
             name: 'unmute',  
             shortBrief: "Unmute someone in this server.",  
             description: null,  
             structure: "<UserID|Mention>",  
             example: "`%%unmute 385753607325075320`\n`%%unmute @Someone You are spamming a lot`",  
             notes: null  
         },  
         {  
             name: 'warn',  
             shortBrief: "Warn someone in this server.",  
             description: null,  
             structure: "<UserID|Mention> [Reason]",  
             example: "`%%warn 385753607325075320`\n`%%warn @Someone You are spamming a lot`",  
             notes: null  
         },  
         {  
             name: 'warndel',  
             shortBrief: "Delete a warning.",  
             description: null,  
             structure: "<ID>",  
             example: "`%%warndel 39`",  
             notes: null  
122          },          },
123          {          slashCommand: true,
124              name: 'warning',          legacyCommand: true
125              shortBrief: "Show a warning.",      },
126              description: null,      {
127              structure: "<ID>",          name: 'ballot',
128              example: "`%%warning 39`",          shortBrief: "Create/view a ballot (poll) message.",
129              notes: null          description: null,
130            subcommands: {
131                "create": "Create a ballot message. Argument 1 should be the ballot message content.",
132                "view": "View a ballot message stats. Argument 1 should be the ballot ID."
133            },
134            structure: "<subcommand> <subcommand-arguments>",
135            example: "`%%ballot create What do you think guys?`\n`%%ballot view 15`",
136            notes: null,
137            slashCommand: true,
138            legacyCommand: true
139        },
140        {
141            name: 'cat',
142            shortBrief: "Get a random kitty picture.",
143            description: "Fetches a random cat picture from `thecatapi.com` API.",
144            structure: "",
145            example: "`%%cat`",
146            notes: null,
147            slashCommand: true,
148            legacyCommand: true
149        },
150        {
151            name: 'clear',
152            shortBrief: "Clear all messages from a user.",
153            description: "Clear all messages from a user, in the current channel. This might take a while.",
154            structure: "<UserID|UserTag|UserMention>",
155            example: "`%%clear 83474924191884727`\n`%%clear @Someone`",
156            notes: null,
157            slashCommand: true,
158            legacyCommand: true
159        },
160        {
161            name: 'config',
162            shortBrief: "View or change the config options.",
163            description: "Configure the bot settings. This command is for advanced users.\nIf the user only gives one argument (setting key), then the value of the setting key will be shown. Otherwise the setting key will be modified with the given parameters.",
164            structure: "<key> [value]",
165            example: "`%%config spam_filter.enabled false`\n`%%config prefix -`",
166            notes: null,
167            slashCommand: true,
168            legacyCommand: true
169        },
170        {
171            name: 'delqueue',
172            shortBrief: "Delete a queue job.",
173            description: "Delete a queued command by its ID.",
174            structure: "<QueueID>",
175            example: "`%%delqueue 80`",
176            notes: null,
177            slashCommand: false,
178            legacyCommand: true
179        },
180        {
181            name: 'delsnippet',
182            shortBrief: "Deletes a snippet.",
183            description: null,
184            structure: "<Name>",
185            example: "`%%delsnippet roles`",
186            notes: null,
187            slashCommand: true,
188            legacyCommand: true
189        },
190        {
191            name: 'dog',
192            shortBrief: "Get a random doggy picture.",
193            description: "Fetches a random cat picture from `thedogapi.com` API.",
194            structure: "",
195            example: "`%%dog`",
196            notes: null,
197            slashCommand: true,
198            legacyCommand: true
199        },
200        {
201            name: 'echo',
202            shortBrief: "Echo (re-send) a message.",
203            description: "Re-send a message from the bot.",
204            structure: "<content> [channelMention]",
205            example: "`%%echo Something\nVery Cool`\n`%%echo Something\nVery Cool #general`",
206            notes: null,
207            slashCommand: true,
208            legacyCommand: true
209        },
210        {
211            name: 'embed',
212            shortBrief: "Build, send and make schemas of embeds!",
213            description: "Build, send and make schemas of embeds. Schemas are special kind of text which can be used in various commands to represent an embed.\n\n**Subcommands**:\n\n`send` - Build and send an embed from the given input.\n`schema` - Builds an embed and returns back the JSON schema of the embed so that you can use it in other places!\n`build` - Builds an embed from a JSON schema.",
214            structure: "<subcommand> <...args>",
215            example: "`/embed send title:Hello world description:This is an embed, awesome!`\n`/embed schema title:Hello world description:This is an embed, awesome!`\n`/embed build json_schema:embed:{\"title\": \"Hello world\", \"description\": \"This is an embed, awesome!\", \"fields\": []}`",
216            notes: null,
217            slashCommand: true,
218            legacyCommand: false
219        },
220        {
221            name: 'emoji',
222            shortBrief: "Get info about an emoji.",
223            description: null,
224            structure: "<GuildEmojiID|GuildEmoji|GuildEmojiName|ExternalEmoji|ExternalEmojiID>",
225            example: "`%%emoji check`\n`%%emoji error`",
226            notes: null,
227            slashCommand: false,
228            legacyCommand: true
229        },
230        {
231            name: 'eval',
232            shortBrief: "Execute raw Javascript code.\n*This command is owner-only*.",
233            description: null,
234            structure: "<code>",
235            example: "`%%eval console.log(\"Hello world!\")`",
236            notes: null,
237            slashCommand: true,
238            legacyCommand: true
239        },
240        {
241            name: 'expire',
242            shortBrief: "Echo (re-send) a message and delete it after the given time.",
243            description: "Re-send a message from the bot and delete it automatically after the given time interval.",
244            structure: "<timeInterval> <content> [channelMention]",
245            example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`",
246            notes: null,
247            slashCommand: true,
248            legacyCommand: true
249        },
250        {
251            name: 'expiresc',
252            shortBrief: "Schedule a message and delete it after the given time.",
253            description: "Schedule a message from the bot and delete it automatically after the given time interval.",
254            structure: "<scheduleTimeInterval> <expireTimeInterval> <content> [channelMention]",
255            example: "`%%echo 25m 5h Something\nVery Cool`\n`%%echo 1h 7d Something\nVery Cool #general`",
256            notes: null,
257            slashCommand: true,
258            legacyCommand: true
259        },
260        {
261            name: 'guildlookup',
262            shortBrief: "Lookup any Public Discord server/guild!",
263            description: "Lookup any Public Discord server/guild!\nThis command is a subcommand of the `/lookup` slash command.",
264            structure: "<UserID|Mention>",
265            example: "`%%guildlookup 385753607325075320`\n`",
266            notes: null,
267            slashCommand: true,
268            legacyCommand: true
269        },
270        {
271            name: 'hash',
272            shortBrief: "Generate a hash of the given text input.",
273            description: null,
274            structure: "<algorithm> <input>",
275            example: "`%%hash sha1 abc`",
276            notes: null,
277            slashCommand: true,
278            legacyCommand: true
279        },
280        {
281            name: 'help',
282            shortBrief: "Show this help and exit.",
283            description: null,
284            structure: "[command]",
285            example: "`%%help`\n`%%help mute`",
286            notes: null,
287            slashCommand: true,
288            legacyCommand: true
289        },
290        {
291            name: 'history',
292            shortBrief: "Show moderation history for a user.",
293            description: null,
294            structure: "<UserMention|UserID>",
295            example: "`%%history 27372628277272625`\n`%%history @Someone`",
296            notes: null,
297            slashCommand: true,
298            legacyCommand: true
299        },
300        {
301            name: 'httpcat',
302            shortBrief: "Get some funny cat memes related to HTTP.",
303            description: "Get some funny cat memes related to HTTP status codes, using http.cat API.",
304            structure: "<status>",
305            example: "`%%httpcat 403`",
306            notes: null,
307            slashCommand: true,
308            legacyCommand: true
309        },
310        {
311            name: 'httpdog',
312            shortBrief: "Get some funny dog memes related to HTTP.",
313            description: "Get some funny dog memes related to HTTP status codes, using http.dog API.",
314            structure: "<status>",
315            example: "`%%httpdog 403`",
316            notes: null,
317            slashCommand: true,
318            legacyCommand: true
319        },
320        {
321            name: 'joke',
322            shortBrief: "Fetch a random joke from The Joke API.",
323            description: null,
324            structure: "",
325            example: "`%%joke`",
326            notes: null,
327            slashCommand: true,
328            legacyCommand: true
329        },
330        {
331            name: 'kick',
332            shortBrief: "Kick someone from this server.",
333            description: null,
334            structure: "<UserID|UserTag|Mention> [Reason]",
335            example: "`%%kick 385753607325075320`\n`%%kick @Someone You are spamming a lot`",
336            notes: null,
337            slashCommand: true,
338            legacyCommand: true
339        },
340        {
341            name: 'lock',
342            shortBrief: "Lock a specific channel.",
343            description: "Makes the given channel read-only for the general members. If no channel is present, the current channel will be locked.",
344            structure: "[ChannelID|ChannelMention]",
345            example: "`%%lock 385753607325075320`\n`%%lock #general`\n`%%lock`",
346            notes: null,
347            slashCommand: true,
348            legacyCommand: true
349        },
350        {
351            name: 'lockall',
352            shortBrief: "Lock all given channels, in-bulk.",
353            description: "Makes the given channels read-only for the general members.",
354            structure: "<...ChannelMention|ChannelIDs> [--raid]",
355            example: "`%%lockall 2572562578247841786\n`%%lockall 2572562578247841786 2572562578247841782 2572562578247841783`\n`%%lockall 2572562578247841786 2572562578247841785`",
356            notes: null,
357            options: {
358                "--raid": "Lock all raid protected channels",
359          },          },
360          {          slashCommand: true,
361              name: 'warnings',          legacyCommand: true
362              shortBrief: "Show all warnings.",      },
363              description: "Show all warnings in this server. Passing an user will only show their warnings.",      {
364              structure: "[UserId|Mention]",          name: 'lookup',
365              example: "`%%warnings`\n`%%warnings 948489127957979253978538`",          shortBrief: "Lookup something.",
366              notes: null          description: null,
367            structure: "[ChannelID|ChannelMention]",
368            subcommands: {
369                "user": "Lookup a user around Discord",
370                "guild": "Lookup a Public Discord Server"
371            },
372            example: "`/lookup user user:384624924565405777`",
373            notes: null,
374            slashCommand: true,
375            legacyCommand: false
376        },
377        {
378            name: 'massban',
379            shortBrief: 'Mass ban (multiple) users',
380            description: null,
381            structure: '<...UserIDs|UserMentions> [Reason]',
382            example: '`%%massban 8247282727258725258 @someone Mass Banning`',
383            notes: null,
384            slashCommand: true,
385            legacyCommand: true
386        },
387        {
388            name: 'mute',
389            shortBrief: "Mute someone in this server.",
390            description: null,
391            structure: "<UserID|UserTag|Mention> [-t=DURATION] [Reason]",
392            example: "`%%mute 385753607325075320`\n`%%mute @Someone You are spamming a lot`\n`%%mute @Someone -t 10m You are spamming a lot`",
393            options: {
394                "-t": "Set the mute duration"
395            },
396            notes: null,
397            slashCommand: true,
398            legacyCommand: true
399        },
400        {
401            name: 'mvsnippet',
402            shortBrief: "Rename a snippet.",
403            description: null,
404            structure: "<oldName> <newName>",
405            example: "`%%mvsnippet abc bca`",
406            notes: null,
407            slashCommand: true,
408            legacyCommand: true
409        },
410        {
411            name: 'note',
412            shortBrief: "Take a note about an user.",
413            description: null,
414            structure: "<UserID|UserTag|UserMention> <note>",
415            example: "`%%note @Someone Simple note.`",
416            notes: null,
417            slashCommand: true,
418            legacyCommand: true
419        },
420        {
421            name: 'notedel',
422            shortBrief: "Delete a note.",
423            description: null,
424            structure: "<NoteID>",
425            example: "`%%notedel 922`",
426            notes: null,
427            slashCommand: true,
428            legacyCommand: true
429        },
430        {
431            name: 'noteget',
432            shortBrief: "Get a note.",
433            description: null,
434            structure: "<NoteID>",
435            example: "`%%noteget 922`",
436            notes: null,
437            slashCommand: true,
438            legacyCommand: true
439        },
440        {
441            name: 'notes',
442            shortBrief: "Get all notes for a specific user.",
443            description: null,
444            structure: "<UserID|UserTag|UserMention>",
445            example: "`%%notes @Someone`",
446            notes: null,
447            slashCommand: true,
448            legacyCommand: true
449        },
450        {
451            name: 'pixabay',
452            shortBrief: "Fetch images from Pixabay.",
453            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.",
454            structure: "<subcommand> [query]",
455            example: "`%%pixabay image`\n`%%pixabay photo birds`",
456            notes: null,
457            slashCommand: true,
458            legacyCommand: true
459        },
460        {
461            name: 'profile',
462            shortBrief: 'Show the server profile.',
463            description: null,
464            structure: '[UserID|UserTag|UserMention]',
465            example: '`%%profile`\n`%%profile @Someone`',
466            notes: null,
467            slashCommand: true,
468            legacyCommand: true
469        },
470        {
471            name: 'queues',
472            shortBrief: "Show a list of all queue jobs.",
473            description: null,
474            structure: "",
475            example: "`%%queues`",
476            notes: null,
477            slashCommand: true,
478            legacyCommand: true
479        },
480        {
481            name: 'rolelist',
482            shortBrief: 'List all roles in the server',
483            description: null,
484            structure: "[Page] [Role]",
485            example: "`%%rolelist`",
486            notes: null,
487            slashCommand: true,
488            legacyCommand: false
489        },
490        {
491            name: 'schedule',
492            shortBrief: "Echo (re-send) a message after the given time.",
493            description: "Re-send a message from the bot automatically after the given time interval.",
494            structure: "<timeInterval> <content> [channelMention]",
495            example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`",
496            notes: null,
497            slashCommand: true,
498            legacyCommand: true
499        },
500        {
501            name: 'send',
502            shortBrief: "Send a DM to a user.",
503            description: null,
504            structure: "<UserID|UserTag|Mention> <content>",
505            example: "`%%send 278358918549759428 Hello world`\n`%%send @Someone Hello world`",
506            notes: null,
507            slashCommand: true,
508            legacyCommand: true
509        },
510        {
511            name: 'setchperms',
512            shortBrief: "Set channel permissions in bulk.",
513            description: null,
514            structure: "<...ChannelIDs|ChannelMentions> <Role> <PermissionKey> <null|true|false>",
515            example: "`%%setchperms 827483719415287387 24872512882472142 #general @everyone SEND_MESSAGES false`",
516            notes: null,
517            slashCommand: true,
518            legacyCommand: true
519        },
520        {
521            name: 'shot',
522            shortBrief: "Give a shot to a user.",
523            description: "Give a shot to a user. This command actually doesn't do anything.",
524            structure: "<UserID|UserTag|Mention> [Reason]",
525            example: "`%%shot 385753607325075320`\n`%%shot @Someone You are spamming a lot`",
526            notes: null,
527            slashCommand: true,
528            legacyCommand: true
529        },
530        {
531            name: 'softban',
532            shortBrief: "Softban a user.",
533            description: "A softban means banning and unbanning a user immediately so that their messages gets deleted.",
534            structure: "<UserID|UserTag|UserMention> [-d=DAYS] [Reason]",
535            example: "`%%softban @Someone`\n`%%softban 44347362235774742 Hello world`",
536            notes: null,
537            slashCommand: true,
538            legacyCommand: true
539        },
540        {
541            name: 'stats',
542            shortBrief: "Show the server stats.",
543            description: null,
544            structure: "",
545            example: "`%%stats",
546            notes: null,
547            slashCommand: true,
548            legacyCommand: true
549        },
550        {
551            name: 'system',
552            shortBrief: "Show the system status.",
553            description: null,
554            structure: "",
555            example: "`%%system",
556            notes: null,
557            slashCommand: true,
558            legacyCommand: true
559        },
560        {
561            name: 'tempban',
562            shortBrief: "Temporarily ban a user.",
563            description: null,
564            structure: "<UserID|UserTag|UserMention> <Time> [-d=DAYS] [Reason]",
565            example: "`%%softban @Someone 20m`\n`%%softban 44347362235774742 50m Hello world`",
566            notes: null,
567            slashCommand: true,
568            legacyCommand: true
569        },
570        {
571            name: 'unban',
572            shortBrief: "Unban a user from this server.",
573            description: null,
574            structure: "<UserID>",
575            example: "`%%unban 2946255269594753792`",
576            notes: null,
577            slashCommand: true,
578            legacyCommand: true
579        },
580        {
581            name: 'unlock',
582            shortBrief: "Unlock a specific channel.",
583            description: "Makes the given channel writable for the general members. If no channel is present, the current channel is unlocked.",
584            structure: "[ChannelID|ChannelMention]",
585            example: "`%%unlock 385753607325075320`\n`%%unlock #general`\n`%%unlock`",
586            notes: null,
587            slashCommand: true,
588            legacyCommand: true
589        },
590        {
591            name: 'unlockall',
592            shortBrief: "Unlock all given channels, in bulk.",
593            description: "<...ChannelMention|ChannelIDs> [--raid]",
594            structure: "[...options]",
595            example: "`%%unlockall --raid\n`%%unlockall 348764381911364631 634894637314679163795`",
596            notes: null,
597            options: {
598                "--raid": "Unlock all Raid-protected channels"
599          },          },
600      ],          slashCommand: true,
601      async render() {          legacyCommand: true
         let string = '';  
   
         for (let cmd of this.commands) {  
             string += `\n\n**${cmd.name}**\n${cmd.shortBrief}`;  
         }  
   
         return string;  
602      },      },
603      async handle(msg, cm) {      {
604          if (typeof cm.args[0] === 'undefined') {          name: 'unmute',
605              await msg.reply({          shortBrief: "Unmute someone in this server.",
606                  embeds: [          description: null,
607                      new MessageEmbed()          structure: "<UserID|UserTag|Mention>",
608                      .setDescription("The command list. Run `" + app.config.get('prefix') + "help <commandName>` for more information about a specific command.\n" + await this.render())          example: "`%%unmute 385753607325075320`\n`%%unmute @Someone You are spamming a lot`",
609                      .setTitle('Help')          notes: null,
610                  ],          slashCommand: true,
611              });          legacyCommand: true
612        },
613              return;      {
614          }          name: 'userlookup',
615            shortBrief: "Lookup any Discord user!",
616          const cmd = this.commands.find(c => c.name === cm.args[0]);          description: "Lookup any Discord user! Doesn't matter if they are in the server or not.\nThis command is a subcommand of the `/lookup` slash command.",
617            structure: "<UserID|Mention>",
618          if (!cmd) {          example: "`%%userlookup 385753607325075320`\n`",
619              await msg.reply({          notes: null,
620                  embeds: [          slashCommand: true,
621                      new MessageEmbed()          legacyCommand: true
622                      .setColor('#f14a60')      },
623                      .setDescription(`Invalid command \`${cm.args[0]}\`.`)      {
624                  ]          name: 'warn',
625              });          shortBrief: "Warn someone in this server.",
626            description: null,
627              return;          structure: "<UserID|UserTag|Mention> [Reason]",
628          }          example: "`%%warn 385753607325075320`\n`%%warn @Someone You are spamming a lot`",
629            notes: null,
630          let fields = [          slashCommand: true,
631              {          legacyCommand: true
632                  name: "Usage",      },
633                  value: `\`${app.config.get('prefix')}${cmd.name}\`` + (cmd.structure.trim() !== '' ? ` \`${cmd.structure}\`` : '')      {
634              },          name: 'warning',
635              {          shortBrief: "Operations with warnings.",
636                  name: 'Examples',          description: null,
637                  value: cmd.example.replace(/\%\%/g, app.config.get('prefix'))          structure: "<ID>",
638              }          example: "`%%warning list @Someone`\n`%%warning clear @Someone`\n`%%warning remove 24`\n`%%warning view 35`",
639          ];          notes: null,
640            slashCommand: true,
641          if (cmd.options !== undefined) {          legacyCommand: true,
642              let str = '';          subcommands: {
643                "list": "List all warnings for a user",
644              for (let opt in cmd.options)              "clear": "Clear all warnings for a user",
645                  str += `\`${opt}\` - ${cmd.options[opt]}\n`;              "remove": "Remove a warning by ID",
646                "view": "View information about a warning by ID"
             str = str.substring(0, str.length - 1);  
   
             fields.push({  
                 name: 'Options',  
                 value: str  
             });  
647          }          }
648        },
649          if (cmd.notes !== null) {      {
650              fields.push({          name: 'welcomer',
651                  name: "Notes",          shortBrief: "Configure the welcomer.",
652                  value: cmd.notes          description: "Change the settings of the welcomer.",
653              });          structure: "<option(s)> [...args]",
654            example: "`%%welcomer --enable`",
655            notes: null,
656            slashCommand: false,
657            legacyCommand: true,
658            options: {
659                "--enable": "Enables the welcomer",
660                "--disable": "Disables the welcomer",
661                "--toggle": "Toggles the welcomer",
662                "--msg, --message, --custom": "Set custom welcome message. The welcome message as an argument is required.",
663                "--rm-msg, --remove-message": "Remove the custom welcome message.",
664                "--rand, --randomize": "Toggle random welcome messages.",
665                "--preview": "Preview the welcome message embed.",
666          }          }
   
         await msg.reply({  
             embeds: [  
                 new MessageEmbed()  
                 .setTitle(`${app.config.get('prefix')}${cmd.name}`)  
                 .setDescription(cmd.description !== null ? cmd.description : cmd.shortBrief)  
                 .addFields(fields)  
             ]  
         });  
     }  
 };  
667        },
668    ]

Legend:
Removed from v.41  
changed lines
  Added in v.393

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26