mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-03-21 11:53:08 +00:00
Merge remote-tracking branch 'origin/kenneth/channels-state-dir' into kenneth/channels-rollup
This commit is contained in:
@@ -35,7 +35,9 @@ Install the plugin:
|
||||
/telegram:configure 123456789:AAHfiqksKZ8...
|
||||
```
|
||||
|
||||
Writes `TELEGRAM_BOT_TOKEN=...` to `.claude/channels/telegram/.env` in your project. You can also write that file by hand, or set the variable in your shell environment — shell takes precedence.
|
||||
Writes `TELEGRAM_BOT_TOKEN=...` to `~/.claude/channels/telegram/.env`. You can also write that file by hand, or set the variable in your shell environment — shell takes precedence.
|
||||
|
||||
> To run multiple bots on one machine (different tokens, separate allowlists), point `TELEGRAM_STATE_DIR` at a different directory per instance.
|
||||
|
||||
**4. Relaunch with the channel flag.**
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import { readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync, statSync,
|
||||
import { homedir } from 'os'
|
||||
import { join, extname, sep } from 'path'
|
||||
|
||||
const STATE_DIR = join(homedir(), '.claude', 'channels', 'telegram')
|
||||
const STATE_DIR = process.env.TELEGRAM_STATE_DIR ?? join(homedir(), '.claude', 'channels', 'telegram')
|
||||
const ACCESS_FILE = join(STATE_DIR, 'access.json')
|
||||
const APPROVED_DIR = join(STATE_DIR, 'approved')
|
||||
const ENV_FILE = join(STATE_DIR, '.env')
|
||||
|
||||
Reference in New Issue
Block a user