diff --git a/packages/bot/src/transformers/component.ts b/packages/bot/src/transformers/component.ts index e03feff19..85b1a9fbb 100644 --- a/packages/bot/src/transformers/component.ts +++ b/packages/bot/src/transformers/component.ts @@ -171,6 +171,7 @@ function transformButtonComponent(bot: Bot, payload: DiscordButtonComponent) { if (props.label && payload.label) button.label = payload.label; if (props.customId && payload.custom_id) button.customId = payload.custom_id; if (props.style && payload.style) button.style = payload.style; + // @ts-expect-error TODO: Deal with partials if (props.emoji && payload.emoji) button.emoji = bot.transformers.emoji(bot, payload.emoji); if (props.url && payload.url) button.url = payload.url; if (props.disabled && payload.disabled) button.disabled = payload.disabled; diff --git a/packages/types/src/discord/components.ts b/packages/types/src/discord/components.ts index a8f885594..b7c339eeb 100644 --- a/packages/types/src/discord/components.ts +++ b/packages/types/src/discord/components.ts @@ -144,7 +144,7 @@ export interface DiscordButtonComponent extends DiscordBaseComponent { * @remarks * A button of style {@link ButtonStyles.Premium | Premium} cannot have an emoji */ - emoji?: Pick; + emoji?: Partial>; /** * A dev-defined unique string sent on click (max 100 characters). * @@ -231,7 +231,7 @@ export interface DiscordSelectOption { /** An additional description of the option. Maximum 50 characters. */ description?: string; /** The id, name, and animated properties of an emoji. */ - emoji?: Pick; + emoji?: Partial>; /** Will render this option as already-selected by default. */ default?: boolean; }