mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
refactor: make public builder props getters (#7422)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
@@ -10,6 +10,9 @@ import {
|
||||
} from '../Assertions';
|
||||
import { UnsafeButtonComponent } from './UnsafeButton';
|
||||
|
||||
/**
|
||||
* Represents a validated button component
|
||||
*/
|
||||
export class ButtonComponent extends UnsafeButtonComponent {
|
||||
public override setStyle(style: ButtonStyle) {
|
||||
return super.setStyle(buttonStyleValidator.parse(style));
|
||||
@@ -36,7 +39,7 @@ export class ButtonComponent extends UnsafeButtonComponent {
|
||||
}
|
||||
|
||||
public override toJSON(): APIButtonComponent {
|
||||
validateRequiredButtonParameters(this.style, this.label, this.emoji, this.custom_id, this.url);
|
||||
validateRequiredButtonParameters(this.style, this.label, this.emoji, this.customId, this.url);
|
||||
return super.toJSON();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user