From e80e4f484374c136a29d1de0b41e1e118b779c37 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:18:19 +0700 Subject: [PATCH] fix: disable `autoVerify` option --- src/structures/Invite.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/structures/Invite.js b/src/structures/Invite.js index 34af7cf..b0026b6 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -320,14 +320,14 @@ class Invite extends Base { /** * Join this Guild using this invite. - * @param {boolean} autoVerify Whether to automatically verify member + * @param {boolean} [autoVerify] Whether to automatically verify member * @returns {Promise} * @example * await client.fetchInvite('code').then(async invite => { * await invite.acceptInvite(); * }); */ - async acceptInvite(autoVerify = true) { + async acceptInvite(autoVerify = false) { if (!this.guild) throw new Error('INVITE_NO_GUILD'); if (this.client.guilds.cache.get(this.guild.id)) return this.guild; const dataHeader = { @@ -343,6 +343,10 @@ class Invite extends Base { }, }); const guild = this.client.guilds.cache.get(this.guild.id); + if (autoVerify) { + console.warn('Feature is under maintenance - Invite#acceptInvite(true)'); + } + /* Disabled if (autoVerify) { const getForm = await this.client.api .guilds(this.guild.id) @@ -354,6 +358,7 @@ class Invite extends Base { // https://discord.com/api/v9/guilds/:id/requests/@me await this.client.api.guilds(this.guild.id).requests['@me'].put({ data: { form_fields: [form] } }); } + */ return guild; } }