From 33cd8e366bedf9e1d3e210f4a98a8c7afbfefee3 Mon Sep 17 00:00:00 2001 From: Bruno Galego Date: Sat, 23 Nov 2024 06:04:23 +0000 Subject: [PATCH] fix discord voice memory id not unique --- packages/client-discord/src/voice.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/client-discord/src/voice.ts b/packages/client-discord/src/voice.ts index 623f39de4c..c59dafcb28 100644 --- a/packages/client-discord/src/voice.ts +++ b/packages/client-discord/src/voice.ts @@ -485,7 +485,7 @@ export class VoiceManager extends EventEmitter { const memory = { id: stringToUuid( - channelId + "-voice-message-" + Date.now() + roomId + "-voice-message-" + Date.now() ), agentId: this.runtime.agentId, content: { @@ -540,7 +540,11 @@ export class VoiceManager extends EventEmitter { const responseMemory: Memory = { id: stringToUuid( - memory.id + "-voice-response-" + Date.now() + roomId + + "-" + + memory.id + + "-voice-response-" + + Date.now() ), agentId: this.runtime.agentId, userId: this.runtime.agentId,