mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: cleanup code (which probably does nothing but I am hopeful anyway)
This commit is contained in:
1 parent
57cc67c8be
commit
91260aed2a
5 files changed
+49
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { Client, GatewayIntentBits } from 'discord.js';
|
||||
import cleanup, { EXIT_EVENT_NAMES } from './behaviors/cleanup.js';
|
||||
import guildMemberAdd from './behaviors/guildMemberAdd.js';
|
||||
import interactionCreate from './behaviors/interactionCreate.js';
|
||||
import ready from './behaviors/ready.js';
|
||||
@@ -15,3 +16,7 @@ client.on('ready', ready);
|
||||
client.on('guildMemberAdd', guildMemberAdd);
|
||||
client.on('interactionCreate', interactionCreate);
|
||||
client.login(process.env.DISCORD_TOKEN);
|
||||
|
||||
EXIT_EVENT_NAMES.forEach((exitEventName) =>
|
||||
process.on(exitEventName, () => cleanup(client)),
|
||||
);
|
||||
Reference in new issue
Block a user