discord: expose EventQueue listenerTimeout as configurable option (fixes #24458)

This commit is contained in:
Glucksberg
2026-02-27 05:28:43 +00:00
committed by Peter Steinberger
parent 8629b996a1
commit a25a73e707
4 changed files with 79 additions and 1 deletions

View File

@@ -517,6 +517,12 @@ export async function monitorDiscordProvider(opts: MonitorDiscordOpts = {}) {
if (voiceEnabled) {
clientPlugins.push(new VoicePlugin());
}
// Pass eventQueue config to Carbon so the listener timeout can be tuned.
// Default listenerTimeout is 120s (Carbon defaults to 30s which is too short for LLM calls).
const eventQueueOpts = {
listenerTimeout: 120_000,
...discordCfg.eventQueue,
};
const client = new Client(
{
baseUrl: "http://localhost",
@@ -525,6 +531,7 @@ export async function monitorDiscordProvider(opts: MonitorDiscordOpts = {}) {
publicKey: "a",
token,
autoDeploy: false,
eventQueue: eventQueueOpts,
},
{
commands,