mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 20:30:58 -05:00
10 lines
403 B
TypeScript
10 lines
403 B
TypeScript
|
import Discord from 'discord.js';
|
||
|
import { TClient } from '../client';
|
||
|
export default {
|
||
|
name: 'inviteCreate',
|
||
|
execute: async(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}))
|
||
|
}
|
||
|
}
|