From 127dd8ad058ecfaefbdd1d0fc14e31f6ed9c4a00 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Mon, 15 Jan 2024 00:03:05 +1100 Subject: [PATCH] Correct the "uses" property, been there since the start of V2 apparently. --- src/events/inviteCreate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/inviteCreate.ts b/src/events/inviteCreate.ts index 1aa5a80..7fc7889 100644 --- a/src/events/inviteCreate.ts +++ b/src/events/inviteCreate.ts @@ -3,6 +3,6 @@ import TClient from '../client.js'; export default class InviteCreate { static async run(client:TClient, invite:Discord.Invite){ if (!invite.guild) return; - (await (invite.guild as Discord.Guild).invites.fetch()).forEach(inv=>client.invites.set(inv.code,{uses: inv.code, creator: inv.inviterId, channel: inv.channel.name})) + (await (invite.guild as Discord.Guild).invites.fetch()).forEach(inv=>client.invites.set(inv.code,{uses: inv.uses, creator: inv.inviterId, channel: inv.channel.name})) } }