mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 22:15:37 +00:00
feat!: Extract logic for autocomplete and component interactions
This commit is contained in:
1 parent
f16a18deb5
commit
1ec1281e98
29 files changed
+694
-442
No files matched your search
+16
-14
@@ -20,17 +20,19 @@ const logger = loggerModule.child({
|
||||
});
|
||||
|
||||
(async () => {
|
||||
const client: ExtendedClient = await createClient({ executionId });
|
||||
const player = await createPlayer({ client, executionId });
|
||||
|
||||
client.on('allShardsReady', async () => {
|
||||
client.registerClientCommands = registerClientCommands;
|
||||
await registerEventListeners({ client, player, executionId });
|
||||
await registerClientCommands({ client, executionId });
|
||||
client.emit('ready', client as Client);
|
||||
});
|
||||
|
||||
client.login(process.env.DISCORD_BOT_TOKEN);
|
||||
})().catch((error) => {
|
||||
logger.error(error);
|
||||
});
|
||||
try {
|
||||
const client: ExtendedClient = await createClient({ executionId });
|
||||
const player = await createPlayer({ client, executionId });
|
||||
|
||||
client.on('allShardsReady', async () => {
|
||||
client.registerClientCommands = registerClientCommands;
|
||||
await registerEventListeners({ client, player, executionId });
|
||||
await registerClientCommands({ client, executionId });
|
||||
client.emit('ready', client as Client);
|
||||
});
|
||||
|
||||
client.login(process.env.DISCORD_BOT_TOKEN);
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user