import { Awaitable, Client, ClientOptions, Message, Snowflake } from 'discord.js'; /** * A valid prefix for GCommands. * * `string`: for single prefix, like `'?'`. * * `string[]`: an array of prefixes, like `['?', '!']`. * * `null`: disabled prefix, only mention works. */ export type GClientMessagePrefix = string | string[] | null; /** * Enum for the auto defer feature. * * Automatically defers interaction if application doesn't respond in 3s * * EPHEMERAL * * NORMAL * * UPDATE */ export declare enum AutoDeferType { /** * Automatically deferReply interaction (+ ephemeral) if application doesn't respond in 3s * @example interaction.deferReply({ ephemeral: true }) * @type {number} */ 'EPHEMERAL' = 1, /** * Automatically deferReply interaction if application doesn't respond in 3s * @example interaction.deferReply() * @type {number} */ 'NORMAL' = 2, /** * Automatically deferUpdate interaction if application doesn't respond in 3s * @example interaction.deferUpdate() * @type {number} */ 'UPDATE' = 3 } /** * Options for the GClient. * @extends {ClientOptions} */ export interface GClientOptions extends ClientOptions { /** * Support for message commands. * @type {boolean} */ messageSupport?: boolean; /** * Prefix for message commands * @requires {@link GClientOptions.messageSupport} to be enabled */ messagePrefix?: ((message: Message) => Awaitable) | GClientMessagePrefix; /** * Whether to send a message for an unknown message command. * @type {boolean} */ unknownCommandMessage?: boolean; /** * Array of all folders to be loaded by GCommands. * * GCommands will check all the files in each folder for these classes: * * Command * * Listener * * Component * * @type {string[]} * @example * ```typescript * new GClient({ * dirs: [ * join(__dirname, 'commands'), * join(__dirname, 'events'), * join(__dirname, 'components'), * ] * }) * ``` */ dirs?: Array; /** * The database to be used in the project. * * This option is only for easier access and is not used by GCommands. * * @type {any} */ database?: any; /** * The guild id that will serve as the development server for your application. * * If this option is present, all slash commands will be registered only for the specified guild id. * However, if the command contains the `guildId` option, it is used instead of this option. * * @type {Snowflake} */ devGuildId?: Snowflake; } /** * The base {@link Client} that GCommands uses. * * @see {@link GClientOptions} for all available options for GClient. * * @extends {Client} */ export declare class GClient extends Client { /** * Object of the default responses that GCommands uses for auto responding in the case of something happening. * * You can customize these messages using the * [@gcommands/plugin-language](https://github.com/Garlic-Team/gcommands-addons/tree/master/packages/plugin-language) * plugin. * * @see {@link Responses} */ responses: Record; /** * Object of all provided options. * @see {@link GClientOptions} */ options: GClientOptions; constructor(options: GClientOptions); /** * The method that returns the database option provided in {@link GClientOptions} * @param {any} _ Used for typings * @returns {Database} * @example TypeScript example * ```typescript * import { MongoDBProvider } from 'gcommands/dist/providers/MongoDBProvider'; * * const client = new GClient({ * ..settings, * database: new MongoDBProvider('mongodb://localhost:27017/database') * }) * * const db = client.getDatabase(MongoDBProvider.prototype); * // returns * ``` * @example JavaScript example * ```javascript * const { MongoDBProvider } = require('gcommands/dist/providers/MongoDBProvider'); * * const client = new GClient({ * ..settings, * database: new MongoDBProvider('mongodb://localhost:27017/database') * }) * * const db = client.getDatabase(MongoDBProvider.prototype); * // returns * ``` */ getDatabase(_?: Database): Database; } //# sourceMappingURL=GClient.d.ts.map