Compare commits

..

2 Commits

Author SHA1 Message Date
Sarah Deaton
92d061553f Drop tab-complete check, keep just /reload-plugins line 2026-03-21 20:18:35 -07:00
Sarah Deaton
b4f0bdd93a Restore /reload-plugins step in telegram/discord READMEs
Partially reverts #758. The reload step is not redundant: the configure
skill runs before the restart step, so it is not loaded yet when the user
types /telegram:configure. CLI prints 'Run /reload-plugins to activate.'
after install (pluginInstallationHelpers.ts:529). Mintlify reports
confirm users hit 'Unknown skill: discord:configure' at step 3.
2026-03-21 20:17:33 -07:00
3 changed files with 15 additions and 19 deletions

View File

@@ -47,6 +47,7 @@ These are Claude Code commands — run `claude` to start a session first.
Install the plugin:
```
/plugin install discord@claude-plugins-official
/reload-plugins
```
**5. Give the server the token.**

View File

@@ -27,6 +27,7 @@ These are Claude Code commands — run `claude` to start a session first.
Install the plugin:
```
/plugin install telegram@claude-plugins-official
/reload-plugins
```
**3. Give the server the token.**

View File

@@ -261,19 +261,6 @@ function gate(ctx: Context): GateResult {
return { action: 'drop' }
}
// Like gate() but for bot commands: no pairing side effects, just allow/drop.
function dmCommandGate(ctx: Context): { access: Access; senderId: string } | null {
if (ctx.chat?.type !== 'private') return null
if (!ctx.from) return null
const senderId = String(ctx.from.id)
const access = loadAccess()
const pruned = pruneExpired(access)
if (pruned) saveAccess(access)
if (access.dmPolicy === 'disabled') return null
if (access.dmPolicy === 'allowlist' && !access.allowFrom.includes(senderId)) return null
return { access, senderId }
}
function isMentioned(ctx: Context, extraPatterns?: string[]): boolean {
const entities = ctx.message?.entities ?? ctx.message?.caption_entities ?? []
const text = ctx.message?.text ?? ctx.message?.caption ?? ''
@@ -598,7 +585,12 @@ process.on('SIGINT', shutdown)
// the gate's behavior for unrecognized groups.
bot.command('start', async ctx => {
if (!dmCommandGate(ctx)) return
if (ctx.chat?.type !== 'private') return
const access = loadAccess()
if (access.dmPolicy === 'disabled') {
await ctx.reply(`This bot isn't accepting new connections.`)
return
}
await ctx.reply(
`This bot bridges Telegram to a Claude Code session.\n\n` +
`To pair:\n` +
@@ -609,7 +601,7 @@ bot.command('start', async ctx => {
})
bot.command('help', async ctx => {
if (!dmCommandGate(ctx)) return
if (ctx.chat?.type !== 'private') return
await ctx.reply(
`Messages you send here route to a paired Claude Code session. ` +
`Text and photos are forwarded; replies and reactions come back.\n\n` +
@@ -619,12 +611,14 @@ bot.command('help', async ctx => {
})
bot.command('status', async ctx => {
const gated = dmCommandGate(ctx)
if (!gated) return
const { access, senderId } = gated
if (ctx.chat?.type !== 'private') return
const from = ctx.from
if (!from) return
const senderId = String(from.id)
const access = loadAccess()
if (access.allowFrom.includes(senderId)) {
const name = ctx.from!.username ? `@${ctx.from!.username}` : senderId
const name = from.username ? `@${from.username}` : senderId
await ctx.reply(`Paired as ${name}.`)
return
}