+
Skip to content

fix(types): overload AkairoClient constructor #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2021

Conversation

kyranet
Copy link
Contributor

@kyranet kyranet commented Jun 6, 2021

AkairoClient's constructor accepts two overloads:

constructor(options = {}, clientOptions) {
super(clientOptions || options);

Which are:

  • AkairoOptions as first argument, and d.js's ClientOptions as second.
  • AkairoOptions and ClientOptions merged, when a second option is not passed.

The latter is achieved as clientOptions becomes akairoOptions when it's undefined.

ℹ️ As a side note, those options will need to be revisited again when v13 releases, namely, removing ?: from the first overload.

@1Computer1 1Computer1 merged commit c5c7447 into discord-akairo:master Jun 6, 2021
@kyranet kyranet deleted the patch-1 branch June 7, 2021 05:48
@ShockTr ShockTr mentioned this pull request Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载