detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
34 lines (33 loc) • 1.43 kB
TypeScript
import { RequestTypes } from 'detritus-client-rest';
import { BaseSet } from '../../collections/baseset';
import { MessageComponentTypes } from '../../constants';
import { Structure } from '../../structures/basestructure';
import { ComponentActionData } from './actionbase';
import { ComponentButton } from './button';
import { ComponentSelectMenu } from './selectmenu';
export interface ComponentActionRowData {
components?: Array<ComponentActionData | ComponentButton | ComponentSelectMenu>;
type?: number;
}
/**
* Utils Component Action Row Structure
* @category Utils
*/
export declare class ComponentActionRow extends Structure {
readonly _keys: BaseSet<string>;
components: Array<ComponentButton | ComponentSelectMenu>;
type: MessageComponentTypes;
constructor(data?: ComponentActionRowData);
get hasButton(): boolean;
get hasRun(): boolean;
get hasSelectMenu(): boolean;
get isEmpty(): boolean;
get isFull(): boolean;
addButton(data?: ComponentButton | ComponentActionData): this;
addComponent(component: ComponentButton | ComponentSelectMenu): this;
addSelectMenu(data?: ComponentSelectMenu | ComponentActionData): this;
createButton(data?: ComponentActionData): ComponentButton;
createSelectMenu(data?: ComponentActionData): ComponentSelectMenu;
mergeValue(key: string, value: any): void;
toJSON(): RequestTypes.RawChannelMessageComponent;
}