mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 05:56:09 +00:00

Co-authored-by: Yuzu <yuzuru@programmer.net> Co-authored-by: Nicolás Serna <nicolito128@hotmail.com> * compat: replace the mixer Co-authored-by: Marcos Susaña <66887817+socram03@users.noreply.github.com> Co-authored-by: Nicolás Serna <nicolito128@hotmail.com>
39 lines
833 B
TypeScript
39 lines
833 B
TypeScript
import type { DiscordSelectOption } from "../../../../discordeno/mod.ts";
|
|
import type { ComponentEmoji } from "../../../Util.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 };
|
|
}
|
|
}
|