Skip to content

Commit

Permalink
feat: jsdocs for GClient
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Apr 30, 2022
1 parent b6b2552 commit 75e958f
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/lib/GClient.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import { setImmediate } from 'node:timers';
import { Awaitable, Client, ClientOptions, Message, Snowflake } from 'discord.js';
import {
Awaitable,
Client,
ClientOptions,
Message,
Snowflake,
} from 'discord.js';
import { Commands } from './managers/CommandManager';
import { Components } from './managers/ComponentManager';
import { Listeners } from './managers/ListenerManager';
import { Plugins } from './managers/PluginManager';
import { registerDirectories } from './util/registerDirectories';
import Responses from '../responses.json';

// TODO: jsdocs
/**
* 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;

/**
Expand Down Expand Up @@ -46,7 +57,6 @@ export interface GClientOptions extends ClientOptions {
/**
* Prefix for message commands
* @requires {@link GClientOptions.messageSupport} to be enabled
* @type {string}
*/
messagePrefix?:
| ((message: Message) => Awaitable<GClientMessagePrefix>)
Expand Down Expand Up @@ -116,6 +126,7 @@ export class GClient<Ready extends boolean = boolean> extends Client<Ready> {

/**
* Object of all provided options.
* @see {@link GClientOptions}
*/
public declare options: GClientOptions;

Expand Down

0 comments on commit 75e958f

Please sign in to comment.