Skip to content

Commit

Permalink
fix: Unknown Message
Browse files Browse the repository at this point in the history
This is the `n`th time I've tried to fix this and luckily it worked
Fix: #1194 #1177 #1168 #1108 #1045

Co-Authored-By: The DT <[email protected]>
  • Loading branch information
aiko-chan-ai and thedtvn committed Jul 6, 2024
1 parent 9b2b2ff commit 558189b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
8 changes: 0 additions & 8 deletions src/client/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,18 +561,10 @@ class Client extends BaseClient {
* @param {InviteResolvable} invite Invite code or URL
* @param {AcceptInviteOptions} [options] Options
* @returns {Promise<Guild|DMChannel|GroupDMChannel>}
* @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);
Expand Down
4 changes: 2 additions & 2 deletions src/rest/APIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(':'),
});
}
Expand Down
1 change: 0 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,6 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
/** @deprecated Use {@link Sweepers#sweepMessages} instead */
public sweepMessages(lifetime?: number): number;
public toJSON(): unknown;
/** @deprecated */
public acceptInvite(
invite: InviteResolvable,
options?: AcceptInviteOptions,
Expand Down

0 comments on commit 558189b

Please sign in to comment.