mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
feat(website): show descriptions for @typeParam blocks (#8523)
This commit is contained in:
@@ -116,6 +116,9 @@ export class SelectMenuBuilder extends ComponentBuilder<APISelectMenuComponent>
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc JSONEncodable.toJSON}
|
||||
*/
|
||||
public toJSON(): APISelectMenuComponent {
|
||||
validateRequiredSelectMenuParameters(this.options, this.data.custom_id);
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';
|
||||
import type { JSONEncodable } from '../../util/jsonEncodable';
|
||||
|
||||
import {
|
||||
defaultValidator,
|
||||
@@ -10,7 +11,7 @@ import {
|
||||
/**
|
||||
* Represents a option within a select menu component
|
||||
*/
|
||||
export class SelectMenuOptionBuilder {
|
||||
export class SelectMenuOptionBuilder implements JSONEncodable<APISelectMenuOption> {
|
||||
public constructor(public data: Partial<APISelectMenuOption> = {}) {}
|
||||
|
||||
/**
|
||||
@@ -63,6 +64,9 @@ export class SelectMenuOptionBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc JSONEncodable.toJSON}
|
||||
*/
|
||||
public toJSON(): APISelectMenuOption {
|
||||
validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
|
||||
Reference in New Issue
Block a user