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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 494 - (hide annotations)
Mon Jul 29 17:30:30 2024 UTC (8 months, 2 weeks ago) by rakin
File MIME type: application/typescript
File size: 3158 byte(s)
fix: about command
1 rakin 393 /**
2     * This file is part of SudoBot.
3     *
4     * Copyright (C) 2021-2022 OSN Inc.
5     *
6     * SudoBot is free software; you can redistribute it and/or modify it
7     * 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     * (at your option) any later version.
10     *
11     * SudoBot is distributed in the hope that it will be useful, but
12     * WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU Affero General Public License for more details.
15     *
16     * You should have received a copy of the GNU Affero General Public License
17     * along with SudoBot. If not, see <https://www.gnu.org/licenses/>.
18     */
19    
20 rakin 344 import { CommandInteraction, Message } from 'discord.js';
21 rakin 51 import BaseCommand from '../../utils/structures/BaseCommand';
22     import DiscordClient from '../../client/Client';
23     import CommandOptions from '../../types/CommandOptions';
24     import InteractionOptions from '../../types/InteractionOptions';
25     import MessageEmbed from '../../client/MessageEmbed';
26    
27     export default class AboutCommand extends BaseCommand {
28     supportsInteractions: boolean = true;
29 rakin 387 metadata = require('../../../package.json');
30 rakin 51
31     constructor() {
32     super('about', 'settings', []);
33     }
34    
35     async run(client: DiscordClient, message: Message | CommandInteraction, options: CommandOptions | InteractionOptions) {
36     await message.reply({
37     embeds: [
38     new MessageEmbed()
39 rakin 387 .setAuthor({ iconURL: client.user?.displayAvatarURL(), name: "SudoBot" })
40     .setDescription(`
41 rakin 456 __**A free and open source Discord moderation bot, specially created for The Everything Server**__.\n
42     > This bot comes with **ABSOLUTELY NO WARRANTY**.
43     > This is free software, and you are welcome to redistribute it under certain conditions.
44     > See the [GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html) for more detailed information.
45 rakin 387 `)
46     .addFields({
47 rakin 494 name: 'Version',
48 rakin 456 value: (`${this.metadata.version}`),
49 rakin 387 inline: true
50     }, {
51     name: 'Source Code',
52     value: `[GitHub](${this.metadata.repository.url})`,
53     inline: true,
54     }, {
55     name: 'Licensed Under',
56     value: `[GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html)`,
57     inline: true
58     })
59     .addFields({
60     name: "Author",
61     value: `[${this.metadata.author.name}](${this.metadata.author.url})`,
62     inline: true
63     }, {
64     name: 'Support',
65 rakin 456 value: `[email protected]`,
66 rakin 387 inline: true
67     })
68 rakin 51 .setFooter({
69 rakin 387 text: `Copyright © OSN Inc 2022. All rights reserved.`
70 rakin 51 })
71     ]
72     });
73     }
74 rakin 456 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26