UNPKG

@ayanaware/bentocord

Version:

Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.

22 lines (21 loc) 1.19 kB
import { ButtonContext } from '../../components/contexts/ButtonContext'; import { SelectContext } from '../../components/contexts/SelectContext'; import { Button } from '../../components/helpers/Button'; import { Select } from '../../components/helpers/Select'; import type { BaseContext } from '../../contexts/BaseContext'; import { PossiblyTranslatable } from '../../interfaces/Translatable'; import { PaginationOptions, PaginationPrompt } from '../PaginationPrompt'; import { AnyPaginator } from '../helpers/AnyPaginator'; import { PaginatorItem } from '../helpers/Paginator'; export declare type ChoicePromptChoice<T> = PaginatorItem<T>; export declare class ChoicePrompt<T = unknown> extends PaginationPrompt<T> { protected sltChoice: Select; protected btnChoice: Button; constructor(ctx: BaseContext, paginator: AnyPaginator<T>, options?: PaginationOptions); start(): Promise<T>; close(reason?: PossiblyTranslatable): Promise<void>; draw(): Promise<void>; protected handleChoiceSelect(slt: SelectContext): Promise<void>; protected handleChoiceButton(btn: ButtonContext): Promise<void>; protected handleText(response: string): Promise<[boolean, T]>; }