UNPKG

seyfert

Version:

The most advanced framework for discord bots

57 lines (56 loc) 2.11 kB
import { type RestOrArray } from '../common'; import { type APIRadioGroupComponent, type APIRadioGroupOption } from '../types'; import { BaseComponentBuilder } from './Base'; export declare class RadioGroup extends BaseComponentBuilder<APIRadioGroupComponent> { #private; constructor(data?: Partial<APIRadioGroupComponent>); /** * Sets the ID for the radio group. * @param id - The ID for the radio group. * @returns The current RadioGroup instance. */ setId(id: number): this; /** * Sets the custom ID for the radio group. * @param customId - The custom ID for the radio group. * @returns The current RadioGroup instance. */ setCustomId(customId: string): this; setOptions(options: RestOrArray<RadioGroupOption>): this; addOptions(...options: RestOrArray<RadioGroupOption>): this; /** * Sets whether the radio group is required. * @param required - Whether the radio group is required (true by discord side). * @returns The current RadioGroup instance. */ setRequired(required: boolean): this; toJSON(): APIRadioGroupComponent; } export declare class RadioGroupOption { data: Partial<APIRadioGroupOption>; constructor(data?: Partial<APIRadioGroupOption>); /** * Sets the label for the option. * label - The label for the option. * @returns The current RadioGroupOption instance. */ setLabel(label: string): this; /** * Sets the value for the option. * value - The value for the option. * @returns The current RadioGroupOption instance. */ setValue(value: string): this; /** * Sets the description for the option. * description - The description for the option. * @returns The current RadioGroupOption instance. */ setDescription(description: string): this; /** * Sets whether the option is the default. * [value=true] - Indicates whether the option is the default (true by discord side). * @returns The current RadioGroupOption instance. */ setDefault(value?: boolean): this; }