@elizaos/plugin-discord 1.3.0 → 1.3.1

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 CHANGED
@@ -6061,7 +6061,7 @@ var DiscordService = class _DiscordService extends Service {
6061
6061
  return;
6062
6062
  }
6063
6063
  const listenCidsRaw = this.runtime.getSetting("DISCORD_LISTEN_CHANNEL_IDS");
6064
- const listenCids = Array.isArray(listenCidsRaw) ? listenCidsRaw : listenCidsRaw.trim().split(",").map((s) => s.trim()).filter((s) => s.length > 0);
6064
+ const listenCids = Array.isArray(listenCidsRaw) ? listenCidsRaw : listenCidsRaw && typeof listenCidsRaw === "string" && listenCidsRaw.trim() ? listenCidsRaw.trim().split(",").map((s) => s.trim()).filter((s) => s.length > 0) : [];
6065
6065
  const talkCids = this.allowedChannelIds ?? [];
6066
6066
  const allowedCids = [...listenCids, ...talkCids];
6067
6067
  this.client.on("messageCreate", async (message) => {