feat: 多平台通知架構(Discord Bot + LINE + Telegram)#13
Merged
Conversation
新增 notifiers/ 抽象層: - types.ts: Notifier 介面 + 共用型別(ReportData, PostSummary) - format.ts: splitMessage + escapeHtml 共用工具 - telegram.ts: 從舊 telegram.ts 重構,實作 Notifier 介面 - discord.ts: Discord Bot REST API(無需 discord.js) - line.ts: LINE Push Message API - index.ts: createNotifiers() dispatcher,讀 env 自動偵測啟用的 channel 重構 index.ts step 7 通知段落,改用 Promise.allSettled 並行發送。 CLI push 指令改用 sendTelegramDirect(從 notifiers re-export)。 零新增 npm 依賴。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- notifiers: 偵測 env var 只填一半(如有 TG_BOT_TOKEN 但缺 TG_CHANNEL_ID)時 console.warn - index.ts: 非 dry run 時預檢 LLM_API_KEY、TRANSCRIBER+GROQ_API_KEY - config.ts: loadConfig() 偵測 telegram botToken/channelId 半配對 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 描述、常駐排程、.env 範例、費用估算均反映 Discord/LINE 支援 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LINE Messaging API Free plan 200 則/月,非完全免費 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/notifiers/模組化通知架構,支援 Telegram / Discord Bot / LINEcreateNotifiers()讀取環境變數,只建立有設定的 channelPromise.allSettled平行發送,單一 channel 失敗不影響其他console.warnfetchCloses #6
Test plan
tsc --noEmit零錯誤🤖 Generated with Claude Code