@friendlyrobot/discord-pi-agent 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -777,9 +777,16 @@ async function sendReply(message, text) {
|
|
|
777
777
|
if (!firstChunk) {
|
|
778
778
|
return;
|
|
779
779
|
}
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
780
|
+
try {
|
|
781
|
+
await message.reply(firstChunk);
|
|
782
|
+
for (const chunk of remainingChunks) {
|
|
783
|
+
await channel.send(chunk);
|
|
784
|
+
}
|
|
785
|
+
} catch (error) {
|
|
786
|
+
console.error("[gateway] send reply failed", {
|
|
787
|
+
messageId: message.id,
|
|
788
|
+
error
|
|
789
|
+
});
|
|
783
790
|
}
|
|
784
791
|
}
|
|
785
792
|
async function startGatewayClient(config, agentService, sessionRegistry, authConfig) {
|