UNPKG

@ayanaware/bentocord

Version:

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

23 lines (22 loc) 1.16 kB
import { AnyCommandContext } from '../CommandContext'; import { OptionType } from '../constants/OptionType'; import type { CommandOptionChoiceCallable, CommandOptionValue } from '../interfaces/CommandOption'; import { Resolver } from '../interfaces/Resolver'; export declare type IntegerOption = IntegerOptionWithChoices | IntegerOptionWithMinMax | IntegerOptionWithAutocomplete; export interface IntegerOptionWithChoices extends CommandOptionValue<OptionType.INTEGER, number> { /** Array of Integer choices */ choices?: CommandOptionChoiceCallable<number>; } export interface IntegerOptionWithMinMax extends CommandOptionValue<OptionType.INTEGER, number> { min?: number; max?: number; } export interface IntegerOptionWithAutocomplete extends CommandOptionValue<OptionType.INTEGER, number> { autocomplete?: true; } export declare class IntegerOptionResolver implements Resolver<number> { option: OptionType; convert: 4; resolve(ctx: AnyCommandContext, option: IntegerOption, text: string): Promise<number>; help(ctx: AnyCommandContext, option: IntegerOption, data: Map<string, string>): Promise<Map<string, string>>; }