Oliver0804/dsh-discord-bot ↗★ 2

dsh-discord-bot

将工作区映射到 Discord 频道进行实时监控与控制 适合需要通过 Discord 远程监控、引导 Agent 运行的团队或个人。

包名
dsh-discord-bot
兼容性
待验证
版本
0.4.0
许可证
MIT
最近更新
2026年9月10日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Oliver0804/dsh-discord-bot

Configuration

KeyDefaultMeaning
guildIdrequiredThe one guild this bot serves. Interactions elsewhere are ignored.
token—Bot token inline. Prefer tokenFile.
tokenFile—File whose first non-comment line holds the token.
categoryNamedshCategory that holds the workspace channels.
allowedUserIds[]Discord user ids allowed to query. Empty means the guild owner alone.
manageChannelstrueWhether the bot may create and rename the category and channels.
privateChannelstrueDeny @everyone and grant only the bot and allowedUserIds.
allowRunfalseEnable /dsh run. Grants the allowlist agent execution on this machine.
listenToMessagesoffoff / mention / all — treat channel messages as prompts. Needs allowRun and the Message Content intent.
runVerbosityminimalminimal shows the answer; full streams the whole transcript.
languageautoauto / en / zh-Hant / zh-Hans — the language replies are written in.
mirrorfalsePost every turn the harness runs into its workspace's channel, whoever started it. Exports session content continuously.
mirrorSubagentsfalseInclude subagent sessions in the mirror. One turn can fan out to a dozen.
mirrorNewSessionstrueAnnounce a newly created session in its channel. Only applies while mirror is on.
mirrorApprovalsfalseAnswer approval questions for sessions this bot did not start. A web-side user then waits out the card's two minutes.
sessionThreadsfalseGive each session its own thread under the workspace channel, instead of interleaving every session's turns in one. Inside the thread, turns are posted as independent messages (prompt, each assistant reply, done), not one rewritten card, so the thread reads like a scrollable conversation. Also removes the guesswork from targeting: a command or a message typed inside a thread acts on that session, however many others are live.
sessionThreadsBackfill5How many of each workspace's most recent sessions get a thread up front, each opening onto a card with what it was last doing. 0 waits for a session to say something first. Needs mirror, since the card quotes the conversation.
answerQuestionsfalseAnswer ask_user_question from Discord. Claims the seam where it is free; where a UI owns it, mirrors the gateway's questions instead so both surfaces can answer and the first one wins.
followNewWorkspacestrueCreate a channel when a session appears for an unmapped workspace.
traceLimit25Default entries per /dsh trace — also the default per /dsh timeline.
sessionLimit15Default sessions per /dsh sessions.
retrySeconds30Delay between Discord login retries.

The token may also come from DSH_DISCORD_BOT_TOKEN or DISCORD_BOT_TOKEN. Precedence is token → tokenFile → environment.