mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
fix(SelectMenuInteraction): set values to empty array if not provided (#6045)
This commit is contained in:
@@ -14,7 +14,7 @@ class SelectMenuInteraction extends MessageComponentInteraction {
|
|||||||
* The values selected, if the component which was interacted with was a select menu
|
* The values selected, if the component which was interacted with was a select menu
|
||||||
* @type {string[]}
|
* @type {string[]}
|
||||||
*/
|
*/
|
||||||
this.values = this.componentType === 'SELECT_MENU' ? data.data.values : null;
|
this.values = data.data.values ?? [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -1367,7 +1367,7 @@ export class Role extends Base {
|
|||||||
|
|
||||||
export class SelectMenuInteraction extends MessageComponentInteraction {
|
export class SelectMenuInteraction extends MessageComponentInteraction {
|
||||||
public componentType: 'SELECT_MENU';
|
public componentType: 'SELECT_MENU';
|
||||||
public values: string[] | null;
|
public values: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Shard extends EventEmitter {
|
export class Shard extends EventEmitter {
|
||||||
|
|||||||
Reference in New Issue
Block a user