1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 16:30:59 -04:00
Daggerbot-TS/src/events/inviteCreate.ts
toast-ts e92229b327 Major bot improvements
Half of them is untested on development bot so I wouldn't be surprised if I broke it in production.
2023-07-07 23:49:24 +10:00

9 lines
348 B
TypeScript

import Discord from 'discord.js';
import TClient from '../client.js';
export default {
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}))
}
}