/[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 33 by rakin, Mon Jul 29 17:28:17 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.6.1",      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 32  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 62  module.exports = { Line 78  module.exports = {
78              notes: null              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 86  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 142  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 154  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 241  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 289  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 301  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",
                 "--everyone": "Lock the channels for @everyone rather than the general role",  
349                  "--raid": "Unlock all Raid-locked channels"                  "--raid": "Unlock all Raid-locked channels"
350              }              }
351          },          },
# Line 357  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 426  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.33  
changed lines
  Added in v.48

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26