fix: Unknown Message
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 <80153297+thedtvn@users.noreply.github.com>
This commit is contained in:
@@ -561,18 +561,10 @@ class Client extends BaseClient {
|
|||||||
* @param {InviteResolvable} invite Invite code or URL
|
* @param {InviteResolvable} invite Invite code or URL
|
||||||
* @param {AcceptInviteOptions} [options] Options
|
* @param {AcceptInviteOptions} [options] Options
|
||||||
* @returns {Promise<Guild|DMChannel|GroupDMChannel>}
|
* @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
|
* @example
|
||||||
* await client.acceptInvite('https://discord.gg/genshinimpact', { bypassOnboarding: true, bypassVerify: true })
|
* await client.acceptInvite('https://discord.gg/genshinimpact', { bypassOnboarding: true, bypassVerify: true })
|
||||||
*/
|
*/
|
||||||
async acceptInvite(invite, options = { 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);
|
const code = DataResolver.resolveInviteCode(invite);
|
||||||
if (!code) throw new Error('INVITE_RESOLVE_CODE');
|
if (!code) throw new Error('INVITE_RESOLVE_CODE');
|
||||||
const i = await this.fetchInvite(code);
|
const i = await this.fetchInvite(code);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class APIRequest {
|
|||||||
for (const [k, v] of Object.entries({
|
for (const [k, v] of Object.entries({
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
honorCipherOrder: true,
|
honorCipherOrder: true,
|
||||||
minVersion: 'TLSv1.2',
|
secureProtocol: 'TLSv1_2_method',
|
||||||
ciphers: ciphers.join(':'),
|
ciphers: ciphers.join(':'),
|
||||||
})) {
|
})) {
|
||||||
this.client.options.http.agent.options[k] = v;
|
this.client.options.http.agent.options[k] = v;
|
||||||
@@ -57,7 +57,7 @@ class APIRequest {
|
|||||||
...this.client.options.http.agent,
|
...this.client.options.http.agent,
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
honorCipherOrder: true,
|
honorCipherOrder: true,
|
||||||
minVersion: 'TLSv1.2',
|
secureProtocol: 'TLSv1_2_method',
|
||||||
ciphers: ciphers.join(':'),
|
ciphers: ciphers.join(':'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -779,7 +779,6 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|||||||
/** @deprecated Use {@link Sweepers#sweepMessages} instead */
|
/** @deprecated Use {@link Sweepers#sweepMessages} instead */
|
||||||
public sweepMessages(lifetime?: number): number;
|
public sweepMessages(lifetime?: number): number;
|
||||||
public toJSON(): unknown;
|
public toJSON(): unknown;
|
||||||
/** @deprecated */
|
|
||||||
public acceptInvite(
|
public acceptInvite(
|
||||||
invite: InviteResolvable,
|
invite: InviteResolvable,
|
||||||
options?: AcceptInviteOptions,
|
options?: AcceptInviteOptions,
|
||||||
|
|||||||
Reference in New Issue
Block a user