create boilerplate code for settings command

This commit is contained in:
Marius Begby committed 2023-12-25 14:52:50 +01:00
1 parent 72eb148ac8
commit 1b4cef808b
2 files changed
+30

No files matched your search

+6
View File
@@ -290,6 +290,12 @@
"durationLongerThanTrackDuration": "{{icon}} **Oops!**\nYou entered **`{{wrongDuration}}`**, which is a timestamp longer than the duration of the current track.\n\nPlease try a timestamp that is less than the duration of the track (**{{trackDuration}}**).",
"seekingToTimestamp": "{{icon}} **Seeking to timestamp**\nSeeking to **`{{duration}}`** in current track."
},
"settings": {
"metadata": {
"name": "settings",
"description": "Configure various options for bot behavior in this server."
}
},
"shards": {
"metadata": {
"name": "shards",
@@ -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();