(rewrite): Add /about command.

This commit is contained in:
2026-08-11 19:34:04 +08:00
parent 3952014960
commit 0da0349994
+42
View File
@@ -0,0 +1,42 @@
// External Imports
import { Command, CommandBuilder, CommandClient, CommandInteraction, Constants, SlashCommand } from 'athena-prime';
// Internal Imports
import { CreateDefaultEmbed } from '../../utils';
// ---------------
@SlashCommand(
new CommandBuilder('about', 'View information about Hexerade!')
.setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall)
.setContexts(Constants.InteractionContextType.Guild)
.setCommandType(Constants.ApplicationCommandType.ChatInput)
)
class AboutCommand extends Command<CommandClient> {
cooldown = 60;
async handleCommand(context: CommandClient<any, any>, interaction: CommandInteraction, data: any) {
if (!interaction.inGuild()) return;
await interaction.createMessage({
embeds: [{
...CreateDefaultEmbed(context),
description: "I'm the very cool bot for the e621 Discord.",
fields: [
{ name: 'Members', value: `${interaction.guild.memberCount}`, inline: true },
{ name: 'Boosts (Tier)', value: `${interaction.guild.premiumSubscriptionCount} (${interaction.guild.premiumTier})`, inline: true },
{ name: 'Developer', value: 'tarrgon.', inline: false },
{ name: 'Contributor', value: 'nxbat', inline: false },
{ name: 'Terms of Use', value: 'https://e621.net/terms_of_use', inline: false },
{ name: 'Privacy Policy', value: 'https://e621.net/static/privacy/discordbot', inline: false },
]
}]
});
}
}
export default new AboutCommand('about');