From 21446dad38175ff9239989fa7dda6e81ade073d3 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 27 Mar 2022 23:56:59 +0700 Subject: [PATCH] Not throw error --- src/structures/Invite.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/structures/Invite.js b/src/structures/Invite.js index c341c9c..8ca3ee9 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -328,7 +328,9 @@ class Invite extends Base { if (autoVerify) { const getForm = await this.client.api .guilds(this.guild.id)['member-verification'] - .get({ query: { with_guild: false, invite_code: this.code } }); + .get({ query: { with_guild: false, invite_code: this.code } }) + .catch(() => {}); + if (!getForm) return void 0; const form = Object.assign(getForm.form_fields[0], { response: true }); // Respond to the form // https://discord.com/api/v9/guilds/:id/requests/@me