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 |
}); |
}); |