网淘吧来吧,欢迎您!

Discord Doctor技能使用说明

2026-04-01 新闻来源:网淘吧 围观:15
电脑广告
手机广告

Discord 医生

快速诊断和修复 Discord/Gateway 可用性问题、OAuth 令牌问题以及遗留的 Clawdis 配置冲突。

使用方法

# Check status (diagnostic only)
discord-doctor

# Check and auto-fix issues
discord-doctor --fix

检查内容

  1. Discord 应用程序- Discord 桌面应用程序是否正在运行(可选,用于监控)
  2. 网关进程- Clawdbot 网关守护进程是否正在运行
  3. 网关 HTTP- 网关是否在端口 18789 上响应
  4. Discord 连接- 机器人是否实际连接到 Discord(通过clawdbot health命令)
  5. Anthropic OAuth- 您的 OAuth 令牌是否有效或已过期
  6. 遗留 Clawdis- 检测可能导致冲突的旧 launchd 服务和配置目录
  7. 近期活动- 显示最近的 Discord 会话

自动修复功能

当运行时--fix,它可以:

Discord Doctor

  • 启动网关如果未运行
  • 安装缺失的 npm 包(如 discord.js、strip-ansi)
  • 重启网关修复依赖项后
  • 移除遗留的 launchd 服务com.clawdis.gateway.plist
  • 备份遗留配置(将~/.clawdis移动至~/.clawdis-backup

常见问题与修复

问题自动修复操作
网关未运行在端口 18789 上启动网关
缺失 npm 包运行npm install+ 安装特定包
Discord 断开连接重启网关以重新连接
OAuth 令牌已过期显示重新认证的说明
遗留的 launchd 服务移除旧的com.clawdis.gateway.plist
遗留的 ~/.clawdis 配置移动到~/.clawdis-backup

OAuth 令牌问题

如果您看到"访问令牌已过期",请运行:

cd ~/Clawdis && npx clawdbot configure

然后选择"Anthropic OAuth (Claude Pro/Max)"以重新认证。

遗留 Clawdis 迁移

如果您从 Clawdis 升级到 Clawdbot,可能存在遗留文件导致 OAuth 令牌冲突:

  • 旧的 launchd 服务~/Library/LaunchAgents/com.clawdis.gateway.plist
  • 旧的配置目录:~/.clawdis/

运行discord-doctor --fix以自动清理这些内容。

示例输出

Discord Doctor
Checking Discord and Gateway health...

1. Discord App
   Running (6 processes)

2. Gateway Process
   Running (PID: 66156, uptime: 07:45)

3. Gateway HTTP
   Responding on port 18789

4. Discord Connection
   Discord: ok (@Clawdis) (321ms)

5. Anthropic OAuth
   Valid (expires in 0h 45m)

6. Legacy Clawdis
   No legacy launchd service
   No legacy config directory

7. Recent Discord Activity
   - discord:group:123456789012345678 (21h ago)

Summary
All checks passed! Discord is healthy.

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

文章底部电脑广告
手机广告位-内容正文底部

相关文章

您是本站第393705名访客 今日有1篇新文章/评论