mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 08:20:08 +00:00
fix: add component.value Closes Component transform doesn't set value #2110
This commit is contained in:
@@ -6,11 +6,9 @@ Discord API library for [Deno](https://deno.land)
|
||||
|
||||
Discordeno follows [semantic versioning](https://semver.org/)
|
||||
|
||||
<!-- TODO: add coverage back when it is stable -->
|
||||
[](https://discord.com/invite/5vBgXk3UcZ)
|
||||

|
||||
|
||||
|
||||
<!-- TODO: add coverage back when it is stable -->
|
||||
[](https://codecov.io/gh/discordeno/discordeno)
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ export function transformComponent(bot: Bot, payload: DiscordComponent): Compone
|
||||
placeholder: payload.placeholder,
|
||||
minValues: payload.min_values,
|
||||
maxValues: payload.max_values,
|
||||
value: payload.value,
|
||||
components: payload.components?.map((component) => bot.transformers.component(bot, component)),
|
||||
};
|
||||
}
|
||||
@@ -50,6 +51,8 @@ export interface Component {
|
||||
style?: ButtonStyles | TextStyles;
|
||||
/** text that appears on the button (max 80 characters) */
|
||||
label?: string;
|
||||
/** the dev-define value of the option, max 100 characters for select or 4000 for input. */
|
||||
value?: string;
|
||||
/** Emoji object that includes fields of name, id, and animated supporting unicode and custom emojis. */
|
||||
emoji?: {
|
||||
/** Emoji id */
|
||||
|
||||
@@ -1835,6 +1835,8 @@ export interface DiscordComponent {
|
||||
style?: ButtonStyles | TextStyles;
|
||||
/** text that appears on the button (max 80 characters) */
|
||||
label?: string;
|
||||
/** the dev-define value of the option, max 100 characters for select or 4000 for input. */
|
||||
value?: string;
|
||||
/** Emoji object that includes fields of name, id, and animated supporting unicode and custom emojis. */
|
||||
emoji?: {
|
||||
/** Emoji id */
|
||||
|
||||
Reference in New Issue
Block a user