discord
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDiscord Skill (Read-Only)
Discord 技能(只读模式)
Reads Discord for financial research using discord-cli, a command-line tool that syncs Discord messages locally and provides search, analytics, and export capabilities.
This skill is read-only. It is designed for financial research: searching trading server discussions, monitoring crypto/market groups, tracking sentiment in financial communities, and exporting messages for analysis. It does NOT support sending messages, reacting, editing, deleting, or any write operations.
Important: This tool uses your Discord token extracted from a local Discord client or browser session. No bot account needed.
使用discord-cli在Discord上进行金融研究,这是一款可将Discord消息同步到本地,并提供搜索、分析和导出功能的命令行工具。
本技能为只读模式,专为金融研究设计:搜索交易服务器讨论内容、监控加密货币/市场讨论组、追踪金融社区舆情,以及导出消息用于分析。不支持发送消息、添加反应、编辑、删除或任何写入操作。
重要提示:本工具使用从本地Discord客户端或浏览器会话中提取的Discord令牌,无需机器人账号。
Step 1: Ensure discord-cli Is Installed and Authenticated
步骤1:确保discord-cli已安装并完成认证
Before running any command, install and check auth:
bash
undefined运行任何命令前,请先安装并检查认证状态:
bash
undefinedInstall (requires Python 3.10+)
安装(需要Python 3.10+)
command -v discord || uv tool install kabi-discord-cli
command -v discord || uv tool install kabi-discord-cli
Check authentication
检查认证状态
discord status && echo "AUTH_OK" || echo "AUTH_NEEDED"
If `AUTH_OK`, skip to Step 2. If `AUTH_NEEDED`, guide the user:discord status && echo "AUTH_OK" || echo "AUTH_NEEDED"
如果显示`AUTH_OK`,直接跳至步骤2。如果显示`AUTH_NEEDED`,请按以下步骤引导用户:Authentication
认证方法
Method A: Auto-extract from local Discord client (recommended)
bash
discord auth --saveThis extracts the token from the locally running Discord desktop app or browser session and saves it for future use.
Method B: Environment variable
bash
export DISCORD_TOKEN="<token from browser DevTools>"
discord status方法A:从本地Discord客户端自动提取(推荐)
bash
discord auth --save该命令会从本地运行的Discord桌面应用或浏览器会话中提取令牌,并保存以供后续使用。
方法B:环境变量设置
bash
export DISCORD_TOKEN="<从浏览器开发者工具获取的令牌>"
discord statusCommon auth issues
常见认证问题
| Symptom | Fix |
|---|---|
| Open Discord desktop app or login in browser, then run |
| Re-login to Discord and run |
| Token is invalid — re-extract with |
| 症状 | 解决方法 |
|---|---|
| 打开Discord桌面应用或在浏览器中登录,然后运行 |
| 重新登录Discord,再次运行 |
| 令牌无效——使用 |
Step 2: Identify What the User Needs
步骤2:明确用户需求
Match the user's request to one of the read commands below, then use the corresponding command from .
references/commands.md| User Request | Command | Key Flags |
|---|---|---|
| Auth check | | — |
| Who am I | | |
| List servers/guilds | | |
| List channels in a server | | |
| Server info | | |
| Server members | | |
| Fetch message history | | |
| Sync messages locally | | |
| Sync all channels | | |
| Tail (live/latest) | | |
| Search server (API) | | |
| Search locally | | |
| Recent messages | | |
| Today's messages | | |
| Message stats | | |
| Top senders | | |
| Activity timeline | | |
| Export messages | | |
将用户的请求与以下只读命令匹配,然后使用中的对应命令。
references/commands.md| 用户请求 | 命令 | 关键参数 |
|---|---|---|
| 认证检查 | | — |
| 查询当前用户 | | |
| 列出服务器/社群 | | |
| 列出服务器内频道 | | |
| 服务器信息 | | |
| 服务器成员 | | |
| 获取消息历史 | | |
| 同步消息到本地 | | |
| 同步所有频道 | | |
| 实时查看最新消息 | | |
| 服务器端搜索(API) | | |
| 本地搜索 | | |
| 近期消息 | | |
| 今日消息 | | |
| 消息统计 | | |
| 高频发言用户 | | |
| 活动时间线 | | |
| 导出消息 | | |
Step 3: Execute the Command
步骤3:执行命令
General pattern
通用格式
bash
undefinedbash
undefinedUse --json or --yaml for structured output
如需结构化输出,使用--json或--yaml参数
discord dc guilds --json
discord dc channels GUILD_ID --json
discord dc guilds --json
discord dc channels GUILD_ID --json
Sync messages from a channel for local queries
同步指定频道消息到本地,用于后续查询
discord dc sync CHANNEL_ID -n 1000
discord dc sync CHANNEL_ID -n 1000
Search for financial topics
搜索金融相关主题
discord dc search GUILD_ID "AAPL earnings" --json
discord search "BTC pump" -n 20 --json
discord dc search GUILD_ID "AAPL earnings" --json
discord search "BTC pump" -n 20 --json
Recent activity
查看近期活动
discord recent --hours 24 -n 50 --json
discord today -c CHANNEL_ID --json
undefineddiscord recent --hours 24 -n 50 --json
discord today -c CHANNEL_ID --json
undefinedKey rules
核心规则
- Check auth first — run before any other command
discord status - Use or
--jsonfor structured output when processing data programmatically--yaml - Sync before local queries — run before using
discord dc sync CHANNEL_ID,discord search, etc.discord recent - Use to limit results — start with 50–100 unless the user asks for more
-n N - Use for server-side search (no sync needed); use
discord dc searchfor local search (requires prior sync)discord search - Use with
--hours N,recent,top, andtimelineto scope by time windowexport - NEVER execute write operations — this skill is read-only; do not send messages, react, edit, delete, or manage server settings
- NEVER run — this deletes local data and is not relevant for research
discord purge
- 先检查认证状态——在执行其他命令前,先运行
discord status - 使用--json或--yaml参数——当需要程序化处理数据时,获取结构化输出
- 本地查询前先同步——在使用、
discord search等命令前,先运行discord recentdiscord dc sync CHANNEL_ID - 使用-n N参数限制结果数量——默认先返回50-100条结果,除非用户要求更多
- 区分搜索方式——用于服务器端搜索(无需同步);
discord dc search用于本地搜索(需提前同步)discord search - 使用--hours N参数限定时间范围——在、
recent、top和timeline命令中使用,缩小数据范围export - 禁止执行写入操作——本技能为只读模式,请勿发送消息、添加反应、编辑、删除内容或管理服务器设置
- 禁止运行discord purge命令——该命令会删除本地数据,与研究需求无关
Output flags
输出参数说明
| Flag | Purpose |
|---|---|
| JSON output |
| YAML output (default in non-TTY) |
| Limit number of results |
| Save output to file |
| Filter by channel |
| 参数 | 用途 |
|---|---|
| 输出JSON格式数据 |
| 输出YAML格式数据(非终端环境下默认格式) |
| 限制结果数量 |
| 将输出保存到指定文件 |
| 按频道筛选内容 |
Typical workflow for a new server
新服务器的典型操作流程
bash
undefinedbash
undefined1. List guilds to find the server
1. 列出所有服务器,找到目标服务器
discord dc guilds --json
discord dc guilds --json
2. List channels in the target guild
2. 列出目标服务器内的所有频道
discord dc channels GUILD_ID --json
discord dc channels GUILD_ID --json
3. Sync messages from channels of interest
3. 同步感兴趣频道的消息到本地
discord dc sync CHANNEL_ID -n 2000
discord dc sync CHANNEL_ID -n 2000
4. Search or analyze
4. 搜索或分析数据
discord search "price target" -n 20 --json
discord recent -c CHANNEL_ID --hours 24 --json
discord top -c CHANNEL_ID --hours 168 --json
---discord search "price target" -n 20 --json
discord recent -c CHANNEL_ID --hours 24 --json
discord top -c CHANNEL_ID --hours 168 --json
---Step 4: Present the Results
步骤4:展示结果
After fetching data, present it clearly for financial research:
- Summarize key content — highlight the most relevant messages for the user's financial research
- Include attribution — show username, message content, and timestamp
- For search results, group by relevance and highlight key themes, sentiment, or market signals
- For server/channel listings, present as a clean table with names and IDs
- Flag sentiment — note bullish/bearish sentiment, consensus vs contrarian views
- For analytics (,
stats,top), present activity patterns and notable contributorstimeline - Treat tokens as secrets — never echo Discord tokens to stdout
获取数据后,需为金融研究场景清晰展示结果:
- 总结核心内容——高亮与用户金融研究最相关的消息
- 标注来源信息——显示用户名、消息内容和时间戳
- 搜索结果处理——按相关性分组,突出关键主题、舆情倾向或市场信号
- 服务器/频道列表展示——以清晰表格呈现名称和ID
- 标记舆情倾向——标注看多/看空情绪、共识观点与反向观点
- 分析类结果展示(、
stats、top)——呈现活动规律和核心贡献用户timeline - 令牌保密——切勿在标准输出中显示Discord令牌
Step 5: Diagnostics
步骤5:问题排查
If authentication fails, re-run:
bash
discord auth --save
discord statusEnsure Discord desktop app is running or you are logged into Discord in a browser.
如果认证失败,重新运行以下命令:
bash
discord auth --save
discord status确保Discord桌面应用正在运行,或已在浏览器中登录Discord。
Error Reference
错误参考
| Error | Cause | Fix |
|---|---|---|
| Not authenticated | Run |
| HTTP 401 | Token expired/invalid | Re-login to Discord and re-extract token |
| HTTP 403 | No access to resource | Verify you have access to the server/channel |
| HTTP 429 | Rate limited | Wait a few minutes, then retry |
| 错误信息 | 原因 | 解决方法 |
|---|---|---|
| 未完成认证 | 打开Discord后运行 |
| HTTP 401 | 令牌过期/无效 | 重新登录Discord并重新提取令牌 |
| HTTP 403 | 无资源访问权限 | 确认你有权访问该服务器/频道 |
| HTTP 429 | 请求频率受限 | 等待几分钟后重试 |
Reference Files
参考文件
- — Complete read command reference with all flags and usage examples
references/commands.md
Read the reference file when you need exact command syntax or detailed flag descriptions.
- —— 完整的只读命令参考,包含所有参数和使用示例
references/commands.md
当需要准确的命令语法或详细的参数说明时,请查阅该参考文件。