UNPKG

@ayanaware/bentocord

Version:

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

61 lines (60 loc) 2.19 kB
import { ComponentAPI } from '@ayanaware/bento'; import { ActivityPartial, BotActivityType, Shard } from 'eris'; import { Discord } from '../../discord/Discord'; import { AnyCommandContext } from '../CommandContext'; import { CommandManager } from '../CommandManager'; import { CommandDefinition } from '../interfaces/CommandDefinition'; import { CommandEntity } from '../interfaces/entity/CommandEntity'; export declare class SetGameCommand implements CommandEntity { name: string; api: ComponentAPI; parent: typeof CommandManager; replaceable: boolean; protected readonly discord: Discord; protected readonly defaultType: string; protected readonly defaultName: string; protected activity: ActivityPartial<BotActivityType>; definition: CommandDefinition; execute(ctx: AnyCommandContext, options: { playing?: { activity: string; }; streaming?: { activity: string; url: string; }; listening?: { activity: string; }; watching?: { activity: string; }; competing?: { activity: string; }; custom?: { type: number; activity: string; }; reset?: Record<string, never>; }): Promise<unknown>; /** * Store the activity for the bot, and apply it to all ready shards. * @param activity The activity to set the bot to. */ protected setActivity(activity: ActivityPartial<BotActivityType>): Promise<void>; /** * Fetch activity for the bot * @returns The activity for the bot. */ protected getActivity(): Promise<ActivityPartial<BotActivityType>>; protected resetActivity(): Promise<void>; /** * Transform the activity before setting, useful for replacements * @param activity The activity to transform * @param shard The shard to transform the activity for * @returns The transformed activity */ protected formatActivity(activity: ActivityPartial<BotActivityType>, shard: Shard): Promise<ActivityPartial<BotActivityType>>; protected restoreActivity(id: number): Promise<void>; }