npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openclawdc

v1.0.0

Published

一键配置 Discord 与 OpenClaw 的连接,自动设置 Bot Token 和权限

Downloads

111

Readme

openclawdc

一键配置 Discord 与 OpenClaw 的连接。

快速开始

npx openclawdc

或指定 Bot Token:

# macOS/Linux
DISCORD_BOT_TOKEN="你的Token" npx openclawdc

# Windows PowerShell
$env:DISCORD_BOT_TOKEN="你的Token"; npx openclawdc

# Windows CMD
set DISCORD_BOT_TOKEN=你的Token && npx openclawdc

前置条件

  1. 已安装 OpenClaw:npm install -g openclaw && openclaw onboard
  2. 已创建 Discord 应用和机器人

Discord 开发者平台设置

1. 创建应用

  1. 访问 Discord Developer Portal
  2. 点击 New Application
  3. 输入应用名称(如:OpenClaw Bot)

2. 添加机器人

  1. 左侧菜单点击 Bot
  2. 点击 Add Bot
  3. 点击 Reset Token 并复制 Token

3. 启用 Message Content Intent(必须)

在 Bot 页面,找到 Privileged Gateway Intents

  • MESSAGE CONTENT INTENT - 必须启用

4. 配置权限

OAuth2 → URL Generator

Scopes:

  • ✅ bot

Bot Permissions:

  • ✅ Send Messages
  • ✅ Read Messages/View Channels
  • ✅ Read Message History
  • ✅ Embed Links(推荐)
  • ✅ Attach Files(推荐)

5. 邀请机器人

复制生成的 URL,在浏览器中打开,选择服务器并授权。

配置项

| 配置项 | 说明 | 必要性 | |--------|------|--------| | token | Discord Bot Token | 必填 | | enabled | 是否启用 | 必填 | | allowlist | 允许的用户 ID 列表 | 可选 |

手动配置

如果自动配置失败,可以手动执行:

openclaw config set channels.discord.enabled true
openclaw config set channels.discord.token "YOUR_BOT_TOKEN"
openclaw config set channels.discord.allowlist '["USER_ID_1", "USER_ID_2"]'
openclaw gateway restart

常用命令

# 查看状态
openclaw channels status --deep

# 查看日志
openclaw channels logs

# 重启服务
openclaw gateway restart

故障排除

机器人不响应

  1. 检查 MESSAGE CONTENT INTENT 是否已启用
  2. 检查机器人是否在服务器中
  3. 检查机器人是否有读取消息的权限
  4. 查看日志:openclaw channels logs

Token 无效

  1. 在 Discord Developer Portal 重新生成 Token
  2. 重新运行配置:npx openclawdc

权限不足

确保机器人有以下权限:

  • Send Messages
  • Read Messages/View Channels
  • Read Message History

License

MIT