seyfert/structures/builders/SelectMenuOptionBuilder.ts
socram03 35ec425916 feacture: Builders
fix: fmt
2022-07-04 19:34:55 -04:00

39 lines
834 B
TypeScript

import type { DiscordSelectOption } from "../../vendor/external.ts";
import type { ComponentEmoji } from "../../util/builders.ts";
export class SelectMenuOptionBuilder {
constructor() {
this.#data = {} as DiscordSelectOption;
}
#data: DiscordSelectOption;
setLabel(label: string) {
this.#data.label = label;
return this;
}
setValue(value: string) {
this.#data.value = value;
return this;
}
setDescription(description: string) {
this.#data.description = description;
return this;
}
setDefault(Default = true) {
this.#data.default = Default;
return this;
}
setEmoji(emoji: ComponentEmoji) {
this.#data.emoji = emoji;
return this;
}
toJSON() {
return { ...this.#data };
}
}