Skip to content

Commit

Permalink
types(StringSelectMenuComponentData): options is required (#9515)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Jiralite and kodiakhq[bot] committed May 5, 2023
1 parent 166c961 commit d7b18f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/discord.js/typings/index.d.ts
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/discord.js/typings/index.test-d.ts
Expand Up @@ -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' },
Expand All @@ -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' }] },
],
});

Expand Down

0 comments on commit d7b18f0

Please sign in to comment.