mirror of
https://github.com/nx-bat/pet-the-pond.git
synced 2026-09-22 10:29:11 -04:00
(commands): more commands.
This commit is contained in:
@@ -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');
|
||||
Reference in New Issue
Block a user