1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 08:20:58 -05:00
Daggerbot-TS/src/events/inviteCreate.ts

9 lines
366 B
TypeScript
Raw Normal View History

import Discord from 'discord.js';
2023-01-27 21:33:55 -05:00
import TClient from '../client';
export default {
async run(client:TClient, invite: Discord.Invite){
if (!invite.guild) return;
const newInvites = await (invite.guild as Discord.Guild).invites.fetch();
newInvites.forEach(inv=>client.invites.set(inv.code,{uses: inv.code, creator: inv.inviterId}))
}
}