(commands): more commands.

This commit is contained in:
2026-08-26 13:55:54 +08:00
parent eb5754d60a
commit 13dd614f13
7 changed files with 89 additions and 9 deletions
+46
View File
@@ -0,0 +1,46 @@
import { Command, CommandBuilder, CommandClient, CommandInteraction, Constants, SlashCommand } from "athena-prime";
import { getUser } from "../utils";
// ----------
@SlashCommand(
new CommandBuilder('profile', 'View your profile.')
.setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall)
.setContexts(Constants.InteractionContextType.Guild)
.setCommandType(Constants.ApplicationCommandType.ChatInput)
)
class ProfileCommand extends Command<CommandClient> {
cooldown = 5;
async handleCommand(context: CommandClient<any, any>, interaction: CommandInteraction) {
await interaction.defer();
const _user = await getUser(interaction.user.id);
await interaction.createMessage({
embeds: [{
author: {
name: interaction.user.username,
icon_url: interaction.user.avatarURL
},
color: 0xe77ed1,
// TODO: Add Rankings.
title: `Pet the Pond | Your Profile`,
fields: [
{ name: 'Points', value: `${_user.xp.current}`, inline: true },
{ name: 'Rank', value: 'N/A', inline: true },
{ name: 'Participating', value: _user.privacy.optin ? 'Yes' : 'No', inline: false }
],
footer: {
text: `Made by nxbat @ Archwing`,
icon_url: 'https://femboytrain.ing/nxbat-archwing'
}
}]
});
}
}
export default new ProfileCommand('profile');