@guildedts/framework
Version:
A framework for creating a Guilded bot.
76 lines • 2.52 kB
TypeScript
import { Collection } from '@discordjs/collection';
import BaseClient, { ClientOptions as BaseClientOptions } from 'guilded.ts';
import { Command } from './Command';
import joi from 'joi';
/**
* The main hub for interacting with the Guilded API.
* @example
* // Start the client
* new Client();
* // Start the client in development mode
* new Client({ dev: true });
*/
export declare class Client extends BaseClient {
readonly options: ClientOptions;
/** The commands that belong to the client. */
readonly commands: Collection<string, Command>;
/** The prefixes per server. */
readonly prefixes: Collection<string, string>;
/** The config for the client. */
config: ClientConfig;
/** The glob pattern for configs. */
private readonly configGlob;
/** The glob pattern for command directories. */
private readonly commandDirGlob;
/** The glob pattern for event directories. */
private readonly eventDirGlob;
/** The glob pattern for command files. */
private readonly commandGlob;
/** The glob pattern for event files. */
private readonly eventGlob;
/** The options for glob. */
private readonly globOptions;
/** @param options The options for the client. */
constructor(options?: ClientOptions);
/** Initialize the client. */
init(): Promise<void>;
/** Handle dev mode. */
private devMode;
/** Load config. */
private loadConfig;
/** Load commands. */
private loadCommands;
/** Load events. */
private loadEvents;
/**
* Import a module.
* @param path The path to the module.
* @returns The module.
* @example client.import('./path/to/module');
*/
private import;
/**
* Create a structure from a file.
* @param path The path to the file.
* @returns The structure.
* @example client.createStructure('./path/to/file');
*/
private createStructure;
}
/** The options for the client. */
export interface ClientOptions extends BaseClientOptions {
/** Whether to run the client in dev mode. */
dev?: boolean;
}
/** The config for the client. */
export interface ClientConfig {
/** The token for the client. */
token: string;
/** The default cooldown for commands. */
commandCooldown?: number;
/** The default prefix for commands. */
prefix: string;
}
/** The schema for the client config. */
export declare const ClientConfigSchema: joi.ObjectSchema<ClientConfig>;
//# sourceMappingURL=Client.d.ts.map