@hoverlover/cc-discord 0.5.0 → 0.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoverlover/cc-discord",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Discord <-> Claude Code relay: use your Claude subscription to power per-channel AI bots",
5
5
  "type": "module",
6
6
  "bin": {
package/server/index.ts CHANGED
@@ -40,12 +40,7 @@ setInterval(cleanupOldAttachments, 10 * 60 * 1000);
40
40
  cleanupOldAttachments();
41
41
 
42
42
  const client = new Client({
43
- intents: [
44
- GatewayIntentBits.Guilds,
45
- GatewayIntentBits.GuildMessages,
46
- GatewayIntentBits.MessageContent,
47
- GatewayIntentBits.GuildMessageThreads,
48
- ],
43
+ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
49
44
  });
50
45
 
51
46
  function requireAuth(req: Request, res: Response): boolean {
@@ -253,6 +253,11 @@ async function flushTraceEvents(client: Client) {
253
253
  const byChannel = new Map<string, TraceEvent[]>();
254
254
  for (const evt of events) {
255
255
  const ch = evt.channel_id || "unknown";
256
+ // Skip non-snowflake channel IDs (e.g. "claude" from legacy agent routing)
257
+ if (ch !== "unknown" && !/^\d{15,22}$/.test(ch)) {
258
+ postedIds.push(evt.id);
259
+ continue;
260
+ }
256
261
  const arr = byChannel.get(ch) || [];
257
262
  arr.push(evt);
258
263
  byChannel.set(ch, arr);