diff --git a/src/invites/commands/invites/inviteCodes.ts b/src/invites/commands/invites/inviteCodes.ts index 3a484d4c..5d4f1c67 100644 --- a/src/invites/commands/invites/inviteCodes.ts +++ b/src/invites/commands/invites/inviteCodes.ts @@ -54,7 +54,7 @@ export default class extends Command { isWidget: !code.inviter })); - const vanityInv = await guild.getVanity().catch(() => undefined); + const vanityInv = guild.vanityURL || (await guild.getVanity().catch(() => undefined)); if (vanityInv && vanityInv.code) { newDbCodes.push({ code: vanityInv.code, diff --git a/src/invites/services/Tracking.ts b/src/invites/services/Tracking.ts index 20fb406e..3da88cdf 100644 --- a/src/invites/services/Tracking.ts +++ b/src/invites/services/Tracking.ts @@ -312,7 +312,7 @@ export class TrackingService { let isVanity = false; if (inviteCodesUsed.length === 0) { - const vanityInv = await guild.getVanity().catch(() => undefined); + const vanityInv = guild.vanityURL || (await guild.getVanity().catch(() => undefined)); if (vanityInv && vanityInv.code) { isVanity = true; inviteCodesUsed.push(vanityInv.code as string); @@ -749,7 +749,7 @@ export class TrackingService { // Collect concurrent promises const promises: any[] = []; - const vanityInv = await guild.getVanity().catch(() => undefined); + const vanityInv = guild.vanityURL || (await guild.getVanity().catch(() => undefined)); if (vanityInv && vanityInv.code) { newInviteCodes.push({ code: vanityInv.code,