WIP working example

This commit is contained in:
Marius Begby committed 2023-08-30 22:16:26 +02:00
1 parent 6ebf7b9bd3
commit 3be362f096
4 files changed
+17 -40

No files matched your search

+6 -4
View File
@@ -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)]
});
}
}