xyter/src/commands/profile/index.js
2022-03-12 23:19:10 +01:00

25 lines
650 B
JavaScript

const { SlashCommandBuilder } = require('@discordjs/builders');
const view = require('./addons/view');
module.exports = {
data: new SlashCommandBuilder()
.setName('profile')
.setDescription('Your profile.')
.addSubcommand((subcommand) =>
subcommand
.setName('view')
.setDescription('View a profile.')
.addUserOption((option) =>
option
.setName('target')
.setDescription('The profile you wish to view')
)
),
async execute(interaction) {
if (interaction.options.getSubcommand() === 'view') {
await view(interaction);
}
return true;
},
};