/[sudobot]/trunk/src/commands/settings/AboutCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/settings/AboutCommand.ts

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

revision 386 by rakin, Mon Jul 29 17:29:40 2024 UTC revision 387 by rakin, Mon Jul 29 17:29:55 2024 UTC
# Line 7  import MessageEmbed from '../../client/M Line 7  import MessageEmbed from '../../client/M
7    
8  export default class AboutCommand extends BaseCommand {  export default class AboutCommand extends BaseCommand {
9      supportsInteractions: boolean = true;      supportsInteractions: boolean = true;
10      version: string;      metadata = require('../../../package.json');
11    
12      constructor() {      constructor() {
13          super('about', 'settings', []);          super('about', 'settings', []);
         const { version } = require('../../../package.json');  
         this.version = version;  
14      }      }
15    
16      async run(client: DiscordClient, message: Message | CommandInteraction, options: CommandOptions | InteractionOptions) {      async run(client: DiscordClient, message: Message | CommandInteraction, options: CommandOptions | InteractionOptions) {
17          await message.reply({          await message.reply({
18              embeds: [              embeds: [
19                  new MessageEmbed()                  new MessageEmbed()
20                  .setTitle('SudoBot')                  .setAuthor({ iconURL: client.user?.displayAvatarURL(), name: "SudoBot" })
21                  .setDescription('A free and open source discord moderation bot, specially created for **The Everything Server**.')                  .setDescription(`
22                  .addField('Version', this.version)                      A free and open source Discord moderation bot, specially created for **The Everything Server**.
23                  .addField('Support', '[email protected]')  
24                        Copyright (C) ${new Date().getFullYear()} OSN Inc.
25                        This bot comes with ABSOLUTELY NO WARRANTY.
26                        This is free software, and you are welcome to redistribute it under certain conditions.
27                        See the [GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html) for more detailed information.
28                    `)
29                    .addFields({
30                        name: 'Version',
31                        value: this.metadata.version,
32                        inline: true
33                    }, {
34                        name: 'Source Code',
35                        value: `[GitHub](${this.metadata.repository.url})`,
36                        inline: true,
37                    }, {
38                        name: 'Licensed Under',
39                        value: `[GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html)`,
40                        inline: true
41                    })
42                    .addFields({
43                        name: "Author",
44                        value: `[${this.metadata.author.name}](${this.metadata.author.url})`,
45                        inline: true
46                    }, {
47                        name: 'Support',
48                        value: this.metadata.author.email,
49                        inline: true
50                    })
51                  .setFooter({                  .setFooter({
52                      text: 'Copyright © Ar Rakin 2022, all rights reserved'                      text: `Copyright © OSN Inc 2022. All rights reserved.`
53                  })                  })
54              ]              ]
55          });          });

Legend:
Removed from v.386  
changed lines
  Added in v.387

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26