mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
WIP working example
This commit is contained in:
1 parent
6ebf7b9bd3
commit
3be362f096
4 files changed
+17
-40
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import { EmbedBuilder, Message, SlashCommandBuilder } from 'discord.js';
|
||||
import { BaseCommandInteraction, BaseSlashCommandParams } from '../../../types/interactionTypes';
|
||||
|
||||
export class TestCommandInteraction extends BaseCommandInteraction {
|
||||
@@ -7,16 +7,18 @@ export class TestCommandInteraction extends BaseCommandInteraction {
|
||||
super(data);
|
||||
}
|
||||
|
||||
async execute(params: BaseSlashCommandParams): Promise<void> {
|
||||
async execute(params: BaseSlashCommandParams): Promise<Message<boolean> | void> {
|
||||
const { executionId, interaction } = params;
|
||||
const logger = this.getLogger('test.ts', 'test', executionId, interaction);
|
||||
const logger = this.getLogger('test.js', executionId, interaction);
|
||||
|
||||
logger.info('test command executed');
|
||||
logger.info(`${interaction.user.tag} executed test command`);
|
||||
logger.info(`Execution ID: ${executionId}`);
|
||||
|
||||
logger.info(this.embedOptions.icons.success + ' Icon success from config.');
|
||||
return;
|
||||
return await interaction.editReply({
|
||||
embeds: [new EmbedBuilder().setDescription('It works!').setColor(this.embedOptions.colors.success)]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user