diff --git a/src/client/Client.js b/src/client/Client.js index c6a0f348..b689d71a 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -561,18 +561,10 @@ class Client extends BaseClient { * @param {InviteResolvable} invite Invite code or URL * @param {AcceptInviteOptions} [options] Options * @returns {Promise} - * @deprecated I will temporarily disable this feature because it can cause the account to be locked (and I also don't have tokens to test anymore). * @example * await client.acceptInvite('https://discord.gg/genshinimpact', { bypassOnboarding: true, bypassVerify: true }) */ async acceptInvite(invite, options = { bypassOnboarding: true, bypassVerify: true }) { - return new Promise((_, e) => - // eslint-disable-next-line prefer-promise-reject-errors - e({ - success: false, - msg: "I will temporarily disable this feature because it can cause the account to be locked (and I also don't have tokens to test anymore).", - }), - ); const code = DataResolver.resolveInviteCode(invite); if (!code) throw new Error('INVITE_RESOLVE_CODE'); const i = await this.fetchInvite(code); diff --git a/src/rest/APIRequest.js b/src/rest/APIRequest.js index 7f2dc8f6..74fc31bd 100644 --- a/src/rest/APIRequest.js +++ b/src/rest/APIRequest.js @@ -45,7 +45,7 @@ class APIRequest { for (const [k, v] of Object.entries({ keepAlive: true, honorCipherOrder: true, - minVersion: 'TLSv1.2', + secureProtocol: 'TLSv1_2_method', ciphers: ciphers.join(':'), })) { this.client.options.http.agent.options[k] = v; @@ -57,7 +57,7 @@ class APIRequest { ...this.client.options.http.agent, keepAlive: true, honorCipherOrder: true, - minVersion: 'TLSv1.2', + secureProtocol: 'TLSv1_2_method', ciphers: ciphers.join(':'), }); } diff --git a/typings/index.d.ts b/typings/index.d.ts index 015e5eb3..382b0ba4 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -779,7 +779,6 @@ export class Client extends BaseClient { /** @deprecated Use {@link Sweepers#sweepMessages} instead */ public sweepMessages(lifetime?: number): number; public toJSON(): unknown; - /** @deprecated */ public acceptInvite( invite: InviteResolvable, options?: AcceptInviteOptions,