refactor(economy): enhance type definitions and improve channel message handling

This commit is contained in:
2025-10-05 05:19:16 -05:00
parent 68f629d637
commit c868e3bf80
10 changed files with 32 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
import { Message, MessageFlags, MessageComponentInteraction, ButtonInteraction } from 'discord.js';
import { Message, MessageFlags, MessageComponentInteraction, ButtonInteraction, TextBasedChannel } from 'discord.js';
import { ComponentType, TextInputStyle, ButtonStyle } from 'discord-api-types/v10';
import type { CommandMessage } from '../../../core/types/commands';
import { hasManageGuildOrStaff } from '../../../core/lib/permissions';
@@ -33,7 +33,8 @@ export const command: CommandMessage = {
const state: MobEditorState = { key, stats: { attack: 5 }, drops: {} };
const editorMsg = await message.channel.send({
const channel = message.channel as TextBasedChannel & { send: Function };
const editorMsg = await channel.send({
content: `👾 Editor de Mob: \`${key}\``,
components: [ { type: 1, components: [
{ type: 2, style: ButtonStyle.Primary, label: 'Base', custom_id: 'mb_base' },