feat: cleaned up startup

This commit is contained in:
TresAbhi committed 2023-06-08 01:11:47 +00:00
1 parent 1b59ca9bb5
commit 1affdce512
2 files changed
+5 -9

No files matched your search

-2
View File
@@ -37,6 +37,4 @@ export function registerErrorHandlers() {
client.on(name, (error) => handleError(error, 'client error')), client.on(name, (error) => handleError(error, 'client error')),
); );
} }
return client;
} }
+5 -7
View File
@@ -7,12 +7,10 @@ import ready from './events/ready.js';
export const client = new Client({ export const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers], intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
}); })
registerErrorHandlers();
client
.on('ready', ready) .on('ready', ready)
.on('guildMemberAdd', guildMemberAdd) .on('guildMemberAdd', guildMemberAdd)
.on('interactionCreate', interactionCreate) .on('interactionCreate', interactionCreate);
.login(discordToken);
registerErrorHandlers();
client.login(discordToken);