mirror of
https://github.com/discordjs/discord.js.git
synced 2026-09-18 17:27:29 +00:00
fix: return only boolean for disabled (#8965)
* fix: return only boolean for `disabled` * fix: return only boolean for `disabled` Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
kodiakhq[bot]
parent
153352ad7a
commit
6614603326
@@ -45,11 +45,11 @@ class BaseSelectMenuComponent extends Component {
|
||||
|
||||
/**
|
||||
* Whether this select menu is disabled
|
||||
* @type {?boolean}
|
||||
* @type {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get disabled() {
|
||||
return this.data.disabled ?? null;
|
||||
return this.data.disabled ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@ class ButtonComponent extends Component {
|
||||
|
||||
/**
|
||||
* Whether this button is disabled
|
||||
* @type {?boolean}
|
||||
* @type {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get disabled() {
|
||||
return this.data.disabled ?? null;
|
||||
return this.data.disabled ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -678,7 +678,7 @@ export class ButtonComponent extends Component<APIButtonComponent> {
|
||||
public get style(): ButtonStyle;
|
||||
public get label(): string | null;
|
||||
public get emoji(): APIMessageComponentEmoji | null;
|
||||
public get disabled(): boolean | null;
|
||||
public get disabled(): boolean;
|
||||
public get customId(): string | null;
|
||||
public get url(): string | null;
|
||||
}
|
||||
@@ -759,7 +759,7 @@ export class BaseSelectMenuComponent<Data extends APISelectMenuComponent> extend
|
||||
public get maxValues(): number | null;
|
||||
public get minValues(): number | null;
|
||||
public get customId(): string;
|
||||
public get disabled(): boolean | null;
|
||||
public get disabled(): boolean;
|
||||
}
|
||||
|
||||
export class StringSelectMenuComponent extends BaseSelectMenuComponent<APIStringSelectComponent> {
|
||||
|
||||
Reference in New Issue
Block a user