How to wait that the initialization of the ApplicationCommandRegistry is finished

Hi guys, is their away to wait for the completion of the ApplicationCommand registration?
2024-12-22 20:26:53 - INFO - Successfully logged in into Discord
Connected to Redis for subscribing
2024-12-22 20:26:53 - INFO - Successfully connected to RedisServer...
2024-12-22 20:26:53 - INFO - Registering 1 Redis event(s)...
2024-12-22 20:26:53 - INFO - ApplicationCommandRegistries: Initializing...
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 5 commands
2024-12-22 20:26:53 - INFO - Registered Redis event: bot:setup (Handler: BotSetupEvent)
2024-12-22 20:26:53 - INFO - All Redis events registered successfully.
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[add.command] Registering id "1229888458634297458" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[clearchannels.command] Registering id "1227673202701111396" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[forceconfigure.command] Registering id "1233398935675207760" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[generatecreation.command] Registering id "1227673202701111397" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[remove.command] Registering id "1230245827038019675" to internal chat input map
2024-12-22 20:26:53 - INFO - ApplicationCommandRegistries(BulkOverwrite) Successfully overwrote global application commands. The application now has 5 global commands
2024-12-22 20:26:53 - INFO - ApplicationCommandRegistries: Took 334ms to initialize
2024-12-22 20:26:53 - INFO - Successfully logged in into Discord
Connected to Redis for subscribing
2024-12-22 20:26:53 - INFO - Successfully connected to RedisServer...
2024-12-22 20:26:53 - INFO - Registering 1 Redis event(s)...
2024-12-22 20:26:53 - INFO - ApplicationCommandRegistries: Initializing...
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 5 commands
2024-12-22 20:26:53 - INFO - Registered Redis event: bot:setup (Handler: BotSetupEvent)
2024-12-22 20:26:53 - INFO - All Redis events registered successfully.
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[add.command] Registering id "1229888458634297458" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[clearchannels.command] Registering id "1227673202701111396" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[forceconfigure.command] Registering id "1233398935675207760" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[generatecreation.command] Registering id "1227673202701111397" to internal chat input map
2024-12-22 20:26:53 - DEBUG - ApplicationCommandRegistry[remove.command] Registering id "1230245827038019675" to internal chat input map
2024-12-22 20:26:53 - INFO - ApplicationCommandRegistries(BulkOverwrite) Successfully overwrote global application commands. The application now has 5 global commands
2024-12-22 20:26:53 - INFO - ApplicationCommandRegistries: Took 334ms to initialize
3 Replies
f1fty
f1ftyOP2w ago
const main = async () => {
try {
client.logger.info('Start login of client to Discord...');
await client.login(process.env.DISCORD_BOT_TOKEN);
client.logger.info('Successfully logged in into Discord');

const redisServer = new RedisServer({ host: process.env.REDIS_HOST, port: process.env.REDIS_PORT });
await redisServer.connect().then(async () => {
client.logger.info('Successfully connected to RedisServer...');
});
await registerRedisEvents(redisServer, client.logger, join(getRootData().root, './handlers/redis'));
} catch (error) {
client.logger.fatal(error);
await client.destroy();
process.exit(1);
}
};

void main();
const main = async () => {
try {
client.logger.info('Start login of client to Discord...');
await client.login(process.env.DISCORD_BOT_TOKEN);
client.logger.info('Successfully logged in into Discord');

const redisServer = new RedisServer({ host: process.env.REDIS_HOST, port: process.env.REDIS_PORT });
await redisServer.connect().then(async () => {
client.logger.info('Successfully connected to RedisServer...');
});
await registerRedisEvents(redisServer, client.logger, join(getRootData().root, './handlers/redis'));
} catch (error) {
client.logger.fatal(error);
await client.destroy();
process.exit(1);
}
};

void main();
MRDGH2821
MRDGH28212w ago
This seems like "how can I use X to do Y?" What is the "Y" you want to do?
Spinel
Spinel2w ago
When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stack traces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards. - For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. - For an excellent video that shows how not to ask technical questions, watch this YouTube video by LiveOverflow. - Asking technical questions (Clarkson) - How to ask questions the smart way (Raymond)

Did you find this page helpful?