claude-telegram-bot 0.2.0 → 0.2.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/README.ko.md CHANGED
@@ -93,6 +93,7 @@ claude-telegram-bot ~/botconfigs/myproj/config.json
93
93
  | `claudeBin` | `which claude` 결과 (절대경로 권장) |
94
94
  | `permissionMode` | `plan`(읽기·계획만) / `acceptEdits`(편집 자동 승인) / `bypassPermissions`(쉘 포함 전부 자동) |
95
95
  | `model` | 비우면 기본 모델. `opus`, `sonnet` 등 |
96
+ | `lang` | (선택) UI 언어. 비우면 사용자별 자동 판별(기본 영어, 텔레그램이 한국어면 한국어). `"en"`/`"ko"`로 고정 가능 |
96
97
  | `name` | (선택) `/help`에 표시되는 봇 이름. 여러 봇 구분용 |
97
98
  | `persona` | (선택) 역할 시스템 프롬프트. 페르소나 봇 정의용 |
98
99
  | `appendSystemPrompt` | (선택) 기본 "간결하게 답하기" 지침을 직접 덮어쓸 때 |
@@ -117,6 +118,7 @@ claude-telegram-bot ~/botconfigs/myproj/config.json
117
118
 
118
119
  - **세션 유지** — 대화는 `--resume`으로 자동으로 이어집니다. 마지막 세션 ID가 `state.json`에 저장되므로 봇을 재시작해도 맥락이 남습니다. 새로 시작하려면 `/new`.
119
120
  - **간결한 답변** — 텔레그램에 맞게 짧게 답하도록 시스템 프롬프트가 기본으로 붙습니다. 바꾸려면 `appendSystemPrompt`에 직접 넣으세요 (빈 문자열이면 끔).
121
+ - **언어** — 봇 자체 문구(`/help`, 명령 메뉴, 상태 메시지)는 **기본 영어**, 텔레그램이 한국어인 사용자에겐 한국어로 나옵니다. `lang`(`"en"`/`"ko"`)으로 고정할 수 있습니다. Claude의 실제 답변은 **사용자가 쓴 언어**를 따라갑니다. `/` 명령 메뉴는 `setMyCommands`로 언어별 등록됩니다.
120
122
  - **서식 변환** — 답변의 마크다운(굵게·코드·표 등)을 텔레그램 HTML로 바꿔 보냅니다. 변환이 깨지는 경우엔 평문으로 다시 보냅니다.
121
123
  - **첨부 파일** — 사진·문서·음성·영상을 보내면 `attachments/`에 내려받고, 그 경로를 Claude에게 전달합니다(캡션도 함께). 이미지는 Read로 열어볼 수 있습니다.
122
124
 
package/README.md CHANGED
@@ -185,6 +185,7 @@ Edit `config.json`:
185
185
  | `claudeBin` | Output of `which claude` (absolute path recommended) |
186
186
  | `permissionMode` | `plan` / `acceptEdits` / `bypassPermissions` — see [Security](#security) |
187
187
  | `model` | Empty = default. Or `opus` / `sonnet`, etc. |
188
+ | `lang` | (optional) UI language. Empty = auto-detect per user (English default, Korean for Korean Telegram clients). Force with `"en"` / `"ko"`. |
188
189
  | `name` | (optional) Bot name shown in `/help` — handy for telling multiple bots apart |
189
190
  | `persona` | (optional) Role system prompt — defines a persona (developer/planner/…). See below |
190
191
  | `appendSystemPrompt` | (optional) Override the default "be concise for Telegram" instruction |
@@ -198,6 +199,10 @@ projects stay isolated.
198
199
 
199
200
  - **Concise mode**: a `--append-system-prompt` is applied by default so replies stay short for
200
201
  Telegram. Override it via `appendSystemPrompt` (empty string disables it).
202
+ - **Language**: the bot's own messages (`/help`, command menu, status text) are English by default
203
+ and switch to Korean for users whose Telegram client is Korean. Force one language with `lang`
204
+ (`"en"`/`"ko"`). Claude's actual replies follow the language you write in, regardless. The `/`
205
+ command menu is registered per-language via `setMyCommands`.
201
206
  - **Formatting**: the reply's Markdown (bold/code/headings/tables) is converted to Telegram-safe
202
207
  HTML. If conversion ever produces invalid HTML, the message is automatically resent as plain text.
203
208
  - **Attachments**: send a photo/document/voice/video and it's downloaded into `attachments/`; the
package/bot.mjs CHANGED
Binary file
@@ -1,15 +1,16 @@
1
1
  {
2
- "name": " 이름 (도움말/구분용, 선택)",
3
- "token": "BOTFATHER_에서_받은_봇_토큰",
2
+ "name": "Bot name (shown in /help, for telling bots apart; optional)",
3
+ "token": "BOT_TOKEN_FROM_BOTFATHER",
4
4
  "allowedChatId": "",
5
5
  "projectDir": "/ABSOLUTE/PATH/TO/PROJECT",
6
- "claudeBin": "/Users/jtchoi/.nvm/versions/node/v23.1.0/bin/claude",
6
+ "claudeBin": "/ABSOLUTE/PATH/TO/claude",
7
7
  "permissionMode": "bypassPermissions",
8
8
  "model": "",
9
- "persona": "이 봇의 역할/말투를 정의하는 시스템 프롬프트 (선택). 멀티 봇(개발자/기획자 등)에서 페르소나 구분에 사용.",
9
+ "lang": "",
10
+ "persona": "System prompt defining this bot's role/voice (optional). Used to differentiate persona bots (developer/planner/...).",
10
11
  "appendSystemPrompt": "",
11
12
  "env": {},
12
13
  "schedule": [
13
- { "cron": "0 9 * * 1-5", "label": "아침 브리핑", "prompt": "오늘 처리할 이슈/할 일을 요약해줘 (선택, 표준 cron 5필드: 월 요일)" }
14
+ { "cron": "0 9 * * 1-5", "label": "Morning brief", "prompt": "Summarize today's open issues and TODOs (optional; standard 5-field cron: min hour day month weekday)" }
14
15
  ]
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-telegram-bot",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Drive Claude Code from Telegram — messages run headless `claude -p` in a project dir and replies come back to the chat. Zero dependencies.",
5
5
  "type": "module",
6
6
  "bin": {