(rewrite): Add /about command.
This commit is contained in:
@@ -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');
|
||||||
Reference in New Issue
Block a user