mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01: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:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
4
packages/discord.js/typings/index.d.ts
vendored
4
packages/discord.js/typings/index.d.ts
vendored
@@ -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