@averagehelper/corde
Version:
A simple library for Discord bot tests. (Republished fork to demonstrate a bugfix)
45 lines (44 loc) • 1.21 kB
TypeScript
import ConfigOptions, { testFunctionType } from "../types";
import { Config } from "./config";
import { CordeBot } from "../core";
declare class Runtime {
private static _instance;
configFilePath: string;
files: string[];
private readonly _configs;
private _bot;
get bot(): CordeBot;
get configs(): Config;
get cordeTestToken(): string;
get botTestId(): string;
get botTestToken(): string;
get channelId(): string;
get guildId(): string;
get timeOut(): number;
get botPrefix(): string;
get testFiles(): string[];
set testFiles(path: string[]);
private constructor();
static getInstance(): Runtime;
setConfigs(_configs: ConfigOptions): void;
/**
* Shortcut for *bot.isLoggedIn*
*/
isBotLoggedIn(): boolean;
/**
* Shortcut for *bot.logout*
*/
logoffBot(): void;
/**
* Shortcut for *bot.onStart*
*/
onBotStart(): import("rxjs").Observable<boolean>;
loginBot(token: string): Promise<string>;
injectBot(fn: testFunctionType): Promise<import("../api").TestReport>;
private loadBot;
}
/**
* Singleton of Runtime.
*/
declare const runtime: Runtime;
export { runtime };