diff --git a/README.md b/README.md index 35d89823e..90a106c46 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,9 @@ Discord API library for [Deno](https://deno.land) Discordeno follows [semantic versioning](https://semver.org/) + [![Discord](https://img.shields.io/discord/785384884197392384?color=7289da&logo=discord&logoColor=dark)](https://discord.com/invite/5vBgXk3UcZ) ![Test](https://github.com/discordeno/discordeno/workflows/Test/badge.svg) - - - [![Coverage](https://img.shields.io/codecov/c/gh/discordeno/discordeno)](https://codecov.io/gh/discordeno/discordeno) diff --git a/transformers/component.ts b/transformers/component.ts index ed7af3698..30110dac2 100644 --- a/transformers/component.ts +++ b/transformers/component.ts @@ -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 */ diff --git a/types/discord.ts b/types/discord.ts index 036dfbdd0..75b747232 100644 --- a/types/discord.ts +++ b/types/discord.ts @@ -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 */