mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types(StringSelectMenuComponentData): options is required (#9515)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -5857,7 +5857,7 @@ export interface BaseSelectMenuComponentData extends BaseComponentData {
|
||||
|
||||
export interface StringSelectMenuComponentData extends BaseSelectMenuComponentData {
|
||||
type: ComponentType.StringSelect;
|
||||
options?: SelectMenuComponentOptionData[];
|
||||
options: SelectMenuComponentOptionData[];
|
||||
}
|
||||
|
||||
export interface UserSelectMenuComponentData extends BaseSelectMenuComponentData {
|
||||
|
||||
@@ -1160,7 +1160,7 @@ client.on('guildCreate', async g => {
|
||||
new ButtonBuilder(),
|
||||
{ type: ComponentType.Button, style: ButtonStyle.Primary, label: 'string', customId: 'foo' },
|
||||
{ type: ComponentType.Button, style: ButtonStyle.Link, label: 'test', url: 'test' },
|
||||
{ type: ComponentType.StringSelect, customId: 'foo' },
|
||||
{ type: ComponentType.StringSelect, customId: 'foo', options: [{ label: 'label', value: 'value' }] },
|
||||
new StringSelectMenuBuilder(),
|
||||
// @ts-expect-error
|
||||
{ type: ComponentType.TextInput, style: TextInputStyle.Paragraph, customId: 'foo', label: 'test' },
|
||||
@@ -1174,7 +1174,7 @@ client.on('guildCreate', async g => {
|
||||
components: [
|
||||
{ type: ComponentType.Button, style: ButtonStyle.Primary, label: 'string', customId: 'foo' },
|
||||
{ type: ComponentType.Button, style: ButtonStyle.Link, label: 'test', url: 'test' },
|
||||
{ type: ComponentType.StringSelect, customId: 'foo' },
|
||||
{ type: ComponentType.StringSelect, customId: 'foo', options: [{ label: 'label', value: 'value' }] },
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user