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 🙏

© 2025 – Pkg Stats / Ryan Hefner

koishi-plugin-steam-listening

v1.0.2

Published

steam

Readme

koishi-plugin-steam-listening

npm

Steam 游戏状态监听插件,可以自动监听指定 Steam 账号的游戏运行状态,并在游戏上线或下线时发送通知。

功能特点

  • 支持监听多个 Steam 账号
  • 支持为每个账号配置多个游戏监听规则
  • 支持私聊和群聊通知
  • 支持多个 Steam API 密钥自动切换
  • 支持游戏上线和下线通知
  • 每15秒自动检查一次状态

安装方法

npm i koishi-plugin-steam-listening

配置说明

在 Koishi 的配置文件中添加以下配置:

plugins:
  steam-listening:
    apiKeys:
      - '你的Steam API密钥1'
      - '你的Steam API密钥2'  # 可选,用于备用
    adminQQ: '管理员QQ号'  # 用于接收错误通知
    accounts:
      - steamId: '76561198xxxxxxxxx'  # Steam 64位ID
        rules:
          - gameId: '252490'  # 游戏ID
            notifications:
              - type: 'private'  # 通知类型:private(私聊) 或 group(群聊)
                targetId: '123456789'  # 接收通知的QQ号
              - type: 'group'
                targetId: '987654321'  # 接收通知的群号
            notifyOffline: true  # 是否在游戏下线时通知

配置项说明

  • apiKeys: Steam API 密钥列表,支持配置多个密钥,按顺序尝试使用
  • adminQQ: 管理员QQ号,用于接收API调用失败等错误通知
  • accounts: Steam账号配置列表
    • steamId: Steam 64位ID(可通过 Steam ID 查询工具 获取)
    • rules: 游戏监听规则列表
      • gameId: 游戏ID(可通过游戏商店页面URL获取)
      • notifications: 通知配置列表
        • type: 通知类型(privategroup
        • targetId: 接收通知的QQ号或群号
      • notifyOffline: 是否在游戏下线时发送通知

通知模板

游戏在线通知

[账号]:玩家昵称
[Steam好友ID]:好友ID
[当前状态]:游戏在线(游戏名称)
[Steam状态]:在线/离线

游戏离线通知

[账号]:玩家昵称
[Steam好友ID]:好友ID
[当前状态]:游戏离线
[Steam状态]:在线/离线

获取必要信息

  1. Steam API 密钥

  2. Steam 64位ID

  3. 游戏ID

    • 在 Steam 商店页面打开游戏
    • 从URL中获取游戏ID,例如:https://store.steampowered.com/app/252490/Rust/ 中的 252490

注意事项

  1. 请确保 Steam API 密钥的安全性,不要泄露给他人
  2. 建议配置多个 API 密钥作为备用
  3. 插件每15秒检查一次状态,请勿设置过短的检查间隔
  4. 如果遇到 API 调用失败,会自动通知管理员QQ

常见问题

  1. Q: 为什么收不到通知? A: 请检查:

    • Steam API 密钥是否正确
    • Steam ID 是否正确
    • 游戏ID是否正确
    • 通知目标(QQ号/群号)是否正确
  2. Q: 如何获取游戏ID? A: 在 Steam 商店页面打开游戏,URL中的数字即为游戏ID

  3. Q: 支持同时监听多个游戏吗? A: 支持,可以在 rules 中配置多个游戏监听规则

更新日志

v1.0.0

  • 初始版本发布
  • 支持基本的游戏状态监听功能
  • 支持多账号、多游戏监听
  • 支持私聊和群聊通知
  • 支持游戏上线和下线通知
  • 支持多个 Steam API 密钥自动切换