fix: Ensure promise is returned where applicable

This commit is contained in:
Marius Begby committed 2023-08-28 15:31:54 +02:00
1 parent f231c53fe8
commit 14cb6b4936
23 files changed
+86 -125

No files matched your search

+2 -7
View File
@@ -28,19 +28,14 @@ const command: CustomSlashCommandInteraction = {
});
if (await notValidGuildId({ interaction, executionId })) {
return;
return Promise.resolve();
}
let shardGuilds: Guild[] = [];
let totalGuildCount = 0;
if (!client || !client.shard) {
logger.error('Client is undefined or does not have shard property.');
return;
}
logger.debug('Fetching guilds from all shards.');
await client.shard
await client!.shard!
.broadcastEval((c) => {
return c.guilds.cache.map((guild) => {
return guild;