mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 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
@@ -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}}**).",
|
"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."
|
"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": {
|
"shards": {
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "shards",
|
"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();
|
||||||
Reference in new issue
Block a user