fix: Increase Discord client ready event timeout from 10s to 30s

This commit is contained in:
BarryY 2025-05-15 17:56:44 +08:00
parent 826f17bd68
commit 92116fd82b
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import { Client, GatewayIntentBits } from 'discord.js';
import { createToolContext } from './tools.js';
// Create a function to properly wait for client to be ready
async function waitForReady(client: Client, token: string, timeoutMs = 10000): Promise<Client> {
async function waitForReady(client: Client, token: string, timeoutMs = 30000): Promise<Client> {
return new Promise((resolve, reject) => {
// Set a timeout to prevent hanging if ready event never fires
const timeout = setTimeout(() => {