mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
create boilerplate code for settings command
This commit is contained in:
1 parent
72eb148ac8
commit
1b4cef808b
2 files changed
+30
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import { BaseSlashCommandInteraction } from '../../../classes/interactions';
|
||||
import { BaseSlashCommandParams, BaseSlashCommandReturnType } from '../../../types/interactionTypes';
|
||||
import { localizeCommand } from '../../../common/localeUtil';
|
||||
|
||||
class SettingsCommand extends BaseSlashCommandInteraction {
|
||||
constructor() {
|
||||
const data = localizeCommand(new SlashCommandBuilder().setName('settings'));
|
||||
super(data);
|
||||
}
|
||||
|
||||
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
|
||||
const { executionId, interaction } = params;
|
||||
const logger = this.getLogger(this.name, executionId, interaction);
|
||||
//const translator = useServerTranslator(interaction);
|
||||
|
||||
logger.debug('Sending embed');
|
||||
return await interaction.editReply({
|
||||
embeds: [new EmbedBuilder().setDescription('Settings').setColor(this.embedOptions.colors.info)]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new SettingsCommand();
|
||||
Reference in new issue
Block a user