# steam-plugin
**Repository Path**: xiaoye12123/steam-plugin
## Basic Information
- **Project Name**: steam-plugin
- **Description**: 为yunzai提供steam相关功能
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 5
- **Forks**: 0
- **Created**: 2024-11-20
- **Last Updated**: 2025-07-27
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Steam Plugin
**提供 steam 相关功能**








## **注意**
1. 一定要填**Steam Web API Key**,否则无法使用绝大部分功能,通常会返回 401 或 403 错误,请前往[Steam API](https://steamcommunity.com/dev/apikey)申请API Key, 域名随意填写
相关链接:
- [Steam Web API 说明](https://partner.steamgames.com/doc/webapi_overview/auth)
- [申请API Key](https://steamcommunity.com/dev/apikey)
- [Steam API 条款](https://steamcommunity.com/dev/apiterms)
2. Steam 是国外网站, 所以通常需要配置代理或反代链接, 否则可能会出现连接超时, 通常会返回: `timeout of 5000ms exceeded`
## 介绍
这是一个基于 [Miao-Yunzai](https://github.com/yoimiya-kokomi/Miao-Yunzai)&[Trss-Yunzai](https://github.com/TimeRainStarSky/Yunzai)&[Karin](https://github.com/KarinJS/Karin)的扩展插件, 提供 steam 群友状态播报, steam 库存, steam 愿望单 等功能
## 安装
### Yunzai使用
#### 使用github
```bash
git clone --depth=1 https://github.com/XasYer/steam-plugin.git ./plugins/steam-plugin
```
#### 使用gitee
```bash
git clone --depth=1 https://gitee.com/xiaoye12123/steam-plugin.git ./plugins/steam-plugin
```
### Karin使用
#### 使用github
```bash
git clone --depth=1 https://github.com/XasYer/steam-plugin.git ./plugins/karin-plugin-steam
```
#### 使用gitee
```bash
git clone --depth=1 https://gitee.com/xiaoye12123/steam-plugin.git ./plugins/karin-plugin-steam
```
### 安装依赖
```bash
pnpm install --filter=steam-plugin
```
## 功能

## 联系方式
- QQ 群: [741577559](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=IvPaOVo_p-6n--FaLm1v39ML9EZaBRCm&authKey=YPs0p%2FRh8MGPQrWZgn99fk4kGB5PtRAoOYIUqK71FBsBYCDdekxCEHFFHnznpYA1&noverify=0&group_code=741577559)
## 使用cloudflare搭建反代 (连接不上steam情况下的备选)
1. 需要`cloudflare账号`, 以及在`cf托管的域名`, 自行查看对应教程
2. 打开cf主页左侧的`Workers 和 Pages`, 点击`创建`, 然后点击`创建 Worker`
3. 名字随意, 可参考`steam` 然后点击`部署` 再点击`编辑代码`
4. 复制以下代码到编辑器, `覆盖`原内容, 然后点击`部署`, 出现`版本已保存`即可
```js
export default {
async fetch(request) {
const url = new URL(request.url);
const path = decodeURIComponent(url.pathname.replace("/", ""));
if (!path || !path.startsWith("http")) {
return new Response("Ciallo~(∠・ω< )⌒☆");
}
const target = new URL(path);
url.hostname = path.replace(/https?:\/\//, "");
url.protocol = target.protocol;
url.pathname = target.pathname;
return await fetch(new Request(url, request));
},
};
```
5. 依次点击`左上角第3步填写的名字`, `设置`, `域和路由`右边的`添加`, `自定义域`, 然后填入你想设置的二级或多级域名, 比如`steam.example.com`, 然后点`添加域`, 要改成自己的在cf托管的域名
6. 测试(可选): 浏览器访问`https://steam.example.com/https://api.steampowered.com/ISteamWebAPIUtil/GetServerInfo/v1/`, `steam.example.com`替换成第5步设置的域名, 如果能看到`servertime`字段, 说明配置成功
7. 对你的Bot发送`#steam设置通用反代https://steam.example.com/{{url}}`, 域名替换成第5步设置的域名
### 注意事项
1. cloudflare的workers免费账户的每天请求数量限制10w次(一个账号所有的workers请求总量)
2. 2024年12月03日 cloudflare 更新[服务条款 2.2.1](https://www.cloudflare.com/zh-cn/terms/) **禁止使用服务提供虚拟专用网络或其他类似的代理服务** 若任使用请知晓可能出现的风险, 包括但不限于: **暂停或终止您对cloudflare服务的使用或访问** 等等。
## 贡献者
> 🌟 星光闪烁,你们的智慧如同璀璨的夜空。感谢所有为 **steam-plugin** 做出贡献的人!

## 其他
如果觉得此插件对你有帮助的话,可以点一个 star,你的支持就是不断更新的动力~