bugfix to invite filter not checking origin server properly
This commit is contained in:
parent
8cd43df415
commit
12da2b390d
@ -571,9 +571,9 @@ module.exports = class AutoModeration extends Observer {
|
|||||||
const match = content.match(this.regex.invite);
|
const match = content.match(this.regex.invite);
|
||||||
if (!match) return;
|
if (!match) return;
|
||||||
|
|
||||||
const result = await wrapper.checkInvite(match.groups.code);
|
|
||||||
const invite = await this.client.fetchInvite(match.groups.code).catch(() => null);
|
const invite = await this.client.fetchInvite(match.groups.code).catch(() => null);
|
||||||
if (whitelist.includes(invite?.guild?.id)) return;
|
const result = await wrapper.checkInvite(match.groups.code) || invite?.guild?.id === wrapper.id;
|
||||||
|
if (whitelist.includes(invite?.guild?.id) || result) return;
|
||||||
|
|
||||||
if (!result) { // Doesn't resolve to the origin server
|
if (!result) { // Doesn't resolve to the origin server
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user