fix: bypass onboarding & verify
This commit is contained in:
parent
4692e5b7d1
commit
088543921d
@ -541,7 +541,7 @@ class Client extends BaseClient {
|
|||||||
// Onboarding
|
// Onboarding
|
||||||
if (onboardingData.enabled) {
|
if (onboardingData.enabled) {
|
||||||
const prompts = onboardingData.prompts.filter(o => o.in_onboarding);
|
const prompts = onboardingData.prompts.filter(o => o.in_onboarding);
|
||||||
|
if (prompts.length) {
|
||||||
const onboarding_prompts_seen = {};
|
const onboarding_prompts_seen = {};
|
||||||
const onboarding_responses = [];
|
const onboarding_responses = [];
|
||||||
const onboarding_responses_seen = {};
|
const onboarding_responses_seen = {};
|
||||||
@ -565,8 +565,18 @@ class Client extends BaseClient {
|
|||||||
});
|
});
|
||||||
this.emit(Events.DEBUG, `[Invite > Guild ${i.guild?.id}] Bypassed onboarding`);
|
this.emit(Events.DEBUG, `[Invite > Guild ${i.guild?.id}] Bypassed onboarding`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Read rule
|
// Read rule
|
||||||
if (data.show_verification_form) {
|
if (data.show_verification_form) {
|
||||||
|
// Check Guild
|
||||||
|
if (i.guild.verificationLevel == 'VERY_HIGH' && !this.user.phone) {
|
||||||
|
this.emit(Events.DEBUG, `[Invite > Guild ${i.guild?.id}] Cannot bypass verify (Phone required)`);
|
||||||
|
return this.guilds.cache.get(i.guild?.id);
|
||||||
|
}
|
||||||
|
if (i.guild.verificationLevel !== 'NONE' && !this.user.email) {
|
||||||
|
this.emit(Events.DEBUG, `[Invite > Guild ${i.guild?.id}] Cannot bypass verify (Email required)`);
|
||||||
|
return this.guilds.cache.get(i.guild?.id);
|
||||||
|
}
|
||||||
const getForm = await this.api
|
const getForm = await this.api
|
||||||
.guilds(i.guild?.id)
|
.guilds(i.guild?.id)
|
||||||
['member-verification'].get({ query: { with_guild: false, invite_code: this.code } })
|
['member-verification'].get({ query: { with_guild: false, invite_code: this.code } })
|
||||||
|
Loading…
Reference in New Issue
Block a user