/[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

revision 16 by rakin, Mon Jul 29 17:28:14 2024 UTC revision 48 by rakin, Mon Jul 29 17:28:21 2024 UTC
# Line 3  const MessageEmbed = require("../src/Mes Line 3  const MessageEmbed = require("../src/Mes
3  const { escapeRegex } = require("../src/util");  const { escapeRegex } = require("../src/util");
4    
5  module.exports = {  module.exports = {
6      version: "1.0.0-beta1",      version: "1.9.0",
7      commands: [      commands: [
8          {          {
9                name: 'about',
10                shortBrief: "Show information about the bot.",
11                description: null,
12                structure: "",
13                example: "`%%about`",
14                notes: null
15            },
16            {
17                name: 'addqueue',
18                shortBrief: "Add a queue job.",
19                description: 'Adds a queued command to the bot\'s memory and after the given amount of time it gets executed.',
20                structure: "<time> <command>",
21                example: "`%%addqueue 15m echo Hello world`\n`%%addqueue 12h kick 875275828247255`",
22                notes: null
23            },
24            {
25              name: 'addsnippet',              name: 'addsnippet',
26              shortBrief: "Adds a snippet.",              shortBrief: "Adds a snippet.",
27              description: null,              description: null,
# Line 14  module.exports = { Line 30  module.exports = {
30              notes: null              notes: null
31          },          },
32          {          {
33                name: 'afk',
34                shortBrief: "Keeps track of your mentions and tells other users that you're AFK.",
35                description: null,
36                structure: "[Reason]",
37                example: "`%%afk`\n`%%afk Having dinner`",
38                notes: null
39            },
40            {
41              name: 'announce',              name: 'announce',
42              shortBrief: "Announce something in the given channel.",              shortBrief: "Announce something in the given channel.",
43              description: "Announce something in the given channel. The channel should be set in the configuration.",              description: "Announce something in the given channel. The channel should be set in the configuration.",
# Line 24  module.exports = { Line 48  module.exports = {
48          {          {
49              name: 'ban',              name: 'ban',
50              shortBrief: "Ban someone in this server.",              shortBrief: "Ban someone in this server.",
51              description: null,              description: "Ban a user. `-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.",
52              structure: "<UserID|Mention> [Reason]",              structure: "<UserID|Mention> [-d=DAYS] [Reason]",
53              example: "`%%ban 385753607325075320`\n`%%ban @Someone You are spamming a lot`",              example: "`%%ban 385753607325075320`\n`%%ban @Someone You are spamming a lot`\n`%%ban @Someone -d 5`\n`%%ban 385753607325075320 -d 5 You are spamming a lot`",
54              notes: null              notes: null
55          },          },
56          {          {
# Line 46  module.exports = { Line 70  module.exports = {
70              notes: null              notes: null
71          },          },
72          {          {
73                name: 'clear',
74                shortBrief: "Clear all messages from a user.",
75                description: "Clear all messages from a user, in the current channel. This might take a while.",
76                structure: "<UserID|UserMention>",
77                example: "`%%clear 83474924191884727`\n`%%clear @Someone`",
78                notes: null
79            },
80            {
81                name: 'delqueue',
82                shortBrief: "Delete a queue job.",
83                description: "Delete a queued command by its ID.",
84                structure: "<QueueID>",
85                example: "`%%delqueue 80`",
86                notes: null
87            },
88            {
89              name: 'delsnippet',              name: 'delsnippet',
90              shortBrief: "Deletes a snippet.",              shortBrief: "Deletes a snippet.",
91              description: null,              description: null,
# Line 70  module.exports = { Line 110  module.exports = {
110              notes: null              notes: null
111          },          },
112          {          {
113                name: 'expire',
114                shortBrief: "Echo (re-send) a message and delete it after the given time.",
115                description: "Re-send a message from the bot and delete it automatically after the given time interval.",
116                structure: "<timeInterval> <content> [channelMention]",
117                example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`",
118                notes: null
119            },
120            {
121                name: 'expiresc',
122                shortBrief: "Schedule a message and delete it after the given time.",
123                description: "Schedule a message from the bot and delete it automatically after the given time interval.",
124                structure: "<scheduleTimeInterval> <expireTimeInterval> <content> [channelMention]",
125                example: "`%%echo 25m 5h Something\nVery Cool`\n`%%echo 1h 7d Something\nVery Cool #general`",
126                notes: null
127            },
128            {
129              name: 'general-role',              name: 'general-role',
130              shortBrief: "Set the general role.",              shortBrief: "Set the general role.",
131              description: null,              description: null,
# Line 86  module.exports = { Line 142  module.exports = {
142              notes: null              notes: null
143          },          },
144          {          {
145                name: 'history',
146                shortBrief: "Show moderation history for a user.",
147                description: null,
148                structure: "<UserMention|UserID>",
149                example: "`%%history 27372628277272625`\n`%%history @Someone`",
150                notes: null
151            },
152            {
153              name: 'httpcat',              name: 'httpcat',
154              shortBrief: "Get some funny cat memes related to HTTP.",              shortBrief: "Get some funny cat memes related to HTTP.",
155              description: "Get some funny cat memes related to HTTP status codes, using http.cat API.",              description: "Get some funny cat memes related to HTTP status codes, using http.cat API.",
# Line 118  module.exports = { Line 182  module.exports = {
182              notes: null,              notes: null,
183              options: {              options: {
184                  "--no-send": "Do not send a confirmation message to the locked channel",                  "--no-send": "Do not send a confirmation message to the locked channel",
                 "--everyone": "Lock the channels for @everyone rather than the general role",  
185              }              }
186          },          },
187          {          {
# Line 130  module.exports = { Line 193  module.exports = {
193              notes: null,              notes: null,
194              options: {              options: {
195                  "--no-send": "Do not send a confirmation message to the locked channel",                  "--no-send": "Do not send a confirmation message to the locked channel",
                 "--everyone": "Lock the channels for @everyone rather than the general role",  
196              }              }
197          },          },
198          {          {
# Line 217  module.exports = { Line 279  module.exports = {
279              notes: null              notes: null
280          },          },
281          {          {
282                name: 'schedule',
283                shortBrief: "Echo (re-send) a message after the given time.",
284                description: "Re-send a message from the bot automatically after the given time interval.",
285                structure: "<timeInterval> <content> [channelMention]",
286                example: "`%%echo 25m Something\nVery Cool`\n`%%echo 1h Something\nVery Cool #general`",
287                notes: null
288            },
289            {
290              name: 'setconfig',              name: 'setconfig',
291              shortBrief: "Change the bot configuration keys.",              shortBrief: "Change the bot configuration keys.",
292              description: null,              description: null,
# Line 225  module.exports = { Line 295  module.exports = {
295              notes: null              notes: null
296          },          },
297          {          {
298                name: 'send',
299                shortBrief: "Send a DM to a user.",
300                description: null,
301                structure: "<UserID|Mention> <content>",
302                example: "`%%send 278358918549759428 Hello world`\n`%%send @Someone Hello world`",
303                notes: null
304            },
305            {
306              name: 'spamfilter',              name: 'spamfilter',
307              shortBrief: "Change the spam filter configuration keys.",              shortBrief: "Change the spam filter configuration keys.",
308              description: null,              description: null,
# Line 233  module.exports = { Line 311  module.exports = {
311              notes: null              notes: null
312          },          },
313          {          {
314                name: 'stats',
315                shortBrief: "Show the server stats.",
316                description: null,
317                structure: "",
318                example: "`%%stats",
319                notes: null
320            },
321            {
322              name: 'unban',              name: 'unban',
323              shortBrief: "Unban a user from this server.",              shortBrief: "Unban a user from this server.",
324              description: null,              description: null,
# Line 249  module.exports = { Line 335  module.exports = {
335              notes: null,              notes: null,
336              options: {              options: {
337                  "--no-send": "Do not send a confirmation message to the locked channel",                  "--no-send": "Do not send a confirmation message to the locked channel",
                 "--everyone": "Unlock the channels for @everyone rather than the general role",  
338              }              }
339          },          },
340          {          {
# Line 261  module.exports = { Line 346  module.exports = {
346              notes: null,              notes: null,
347              options: {              options: {
348                  "--no-send": "Do not send a confirmation message to the locked channel",                  "--no-send": "Do not send a confirmation message to the locked channel",
349                  "--everyone": "Lock the channels for @everyone rather than the general role",                  "--raid": "Unlock all Raid-locked channels"
350              }              }
351          },          },
352          {          {
# Line 316  module.exports = { Line 401  module.exports = {
401      },      },
402      async handle(msg, cm) {      async handle(msg, cm) {
403          if (typeof cm.args[0] === 'undefined') {          if (typeof cm.args[0] === 'undefined') {
             // await msg.reply({  
             //     embeds: [  
             //         new MessageEmbed()  
             //         .setColor('#f14a60')  
             //         .setDescription(`This command requires at least one argument.`)  
             //     ]  
             // });  
   
404              await msg.reply({              await msg.reply({
405                  embeds: [                  embeds: [
406                      new MessageEmbed()                      new MessageEmbed()
407                      .setDescription("The command list. Run `" + app.config.get('prefix') + "help <commandName>` for more information about a specific command.\n" + await this.render())                      .setDescription("The command list.\n\n`<...>` means required argument, `[...]` means optional argument.\n\nRun `" + app.config.get('prefix') + "help <commandName>` for more information about a specific command.\n" + await this.render())
408                      .setTitle('Help')                      .setTitle('Help')
409                  ],                  ],
410              });              });
# Line 385  module.exports = { Line 462  module.exports = {
462              embeds: [              embeds: [
463                  new MessageEmbed()                  new MessageEmbed()
464                  .setTitle(`${app.config.get('prefix')}${cmd.name}`)                  .setTitle(`${app.config.get('prefix')}${cmd.name}`)
465                  .setDescription(cmd.description !== null ? cmd.description : cmd.shortBrief)                  .setDescription("`<...>` means required argument, `[...]` means optional argument.\n\n" + (cmd.description !== null ? cmd.description : cmd.shortBrief))
466                  .addFields(fields)                  .addFields(fields)
467              ]              ]
468          });          });

Legend:
Removed from v.16  
changed lines
  Added in v.48

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26