Kord/src/commands/setup.ts

29 lines
879 B
TypeScript

import {
SlashCommandBuilder,
ChatInputCommandInteraction,
PermissionFlagsBits
} from 'discord.js';
import { SetupWizardRenderer } from '../services/SetupWizardRenderer';
import { SupportedLocale } from '../i18n';
export default {
data: new SlashCommandBuilder()
.setName('setup')
.setDescription('Initial setup wizard for the bot.')
.setDescriptionLocalizations({
ko: '봇의 초기 환경 설정을 위한 마법사를 실행합니다.',
})
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
async execute(interaction: ChatInputCommandInteraction, locale: SupportedLocale) {
if (!interaction.guildId) return;
const { embed, components } = await SetupWizardRenderer.renderStep(0, interaction, locale);
return interaction.reply({
embeds: [embed],
components,
ephemeral: true,
});
},
};