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

Legend:
Removed from v.47  
changed lines
  Added in v.297

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26