UNPKG

@ayanaware/bentocord

Version:

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

19 lines (18 loc) 975 B
import { Component, ComponentAPI } from '@ayanaware/bento'; import { Message } from 'eris'; import { PossiblyTranslatable } from '../interfaces/Translatable'; export declare type PromptHandler = (response: string, message?: Message) => Promise<unknown>; declare type CloseHandler = (reason?: PossiblyTranslatable) => Promise<void>; export declare class PromptManager implements Component { name: string; api: ComponentAPI; private readonly prompts; onUnload(): Promise<void>; hasPrompt(channelId: string, userId: string): boolean; addPrompt(channelId: string, userId: string, handler: PromptHandler, close?: CloseHandler): Promise<void>; removePrompt(channelId: string, userId: string): Promise<void>; closePrompt(channelId: string, userId: string, reason?: PossiblyTranslatable): Promise<void>; handleResponse(channelId: string, userId: string, response: string, message?: Message): Promise<void>; private handleMessage; } export {};