/[sudobot]/branches/2.x/src/events/guildMember/GuildMemberAddEvent.ts
ViewVC logotype

Annotation of /branches/2.x/src/events/guildMember/GuildMemberAddEvent.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (hide annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months ago) by rakinar2
File MIME type: application/typescript
File size: 984 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
1 rakinar2 577 import BaseEvent from '../../utils/structures/BaseEvent';
2     import DiscordClient from '../../client/Client';
3     import { GuildMember } from 'discord.js';
4     import autoRole from '../../services/AutoRole';
5    
6     export default class GuildMemberAddEvent extends BaseEvent {
7     constructor() {
8     super('guildMemberAdd');
9     }
10    
11     async run(client: DiscordClient, member: GuildMember) {
12     if (member.user.id === client.user!.id)
13     return;
14    
15     await client.logger.logJoined(member);
16    
17     if (member.user.bot)
18     return;
19    
20     if (await client.antijoin.start(member)) {
21     return;
22     }
23    
24     await client.antiraid.start(member);
25     await autoRole(client, member);
26    
27     await client.welcomer.start(member);
28    
29     if (client.config.props[member.guild.id].verification.enabled) {
30     await client.verification.start(member);
31     }
32    
33     await client.automute.onMemberJoin(member);
34     }
35     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26