diff --git a/src/clientfactory.ts b/src/clientfactory.ts index ff1f086eeedad703b7881cfa2a8ccf2824df7cd4..bd76fe528bcc8c5b4208c5ab5e7f1224ffc514af 100644 --- a/src/clientfactory.ts +++ b/src/clientfactory.ts @@ -65,11 +65,9 @@ export class DiscordClientFactory { await client.login(token); const id = client.user.id; - try { - await client.destroy(); - } catch (err) { - log.warn("Failed to destroy client ", id); - } + + // This can be done asynchronously, because we don't need to block to return the id. + client.destroy().catch((err) => { log.warn("Failed to destroy client ", id); }); return id;