EpicGameStore free games promotions plugin for NoneBot2
Project description
NoneBot Plugin EpicFree
🤖 用于获取 Epic 限免游戏资讯的 NoneBot2 插件
安装方法
使用以下命令之一快速安装(若配置了 PyPI 镜像,你可能无法及时检索到插件最新版本):
nb plugin install nonebot_plugin_epicfree
pip install --upgrade nonebot_plugin_epicfree
重启 Bot 即可体验此插件。
关于 NoneBot2 及相关依赖版本
在已淘汰的 NoneBot2 适配器 nonebot-adapter-cqhttp 下,切记不要使用 pip 或 nb_cli 安装此插件。通过拷贝文件夹 nonebot_plugin_epicfree 至 NoneBot2 插件目录、手动安装 nonebot-plugin-apscheduler 和 httpx 依赖的方式仍可正常启用此插件。在未来某个版本会完全移除该适配器支持,请尽快升级至 nonebot-adapter-onebot。
使用方法
# nonebot_plugin_epicfree/__init__.py#L31
epicMatcher = on_regex(r"((E|e)(P|p)(I|i)(C|c))?喜(加一|\+1)")
# nonebot_plugin_epicfree/__init__.py#L43
epicSubMatcher = on_regex(r"喜(加一|\+1)(私聊)?订阅(删除|取消)?")
- 发送「喜加一」查找限免游戏
- 发送「喜加一订阅」订阅游戏资讯
- 发送「喜加一订阅删除」取消订阅游戏资讯
* 插件响应基于正则匹配,所以,甚至「EpIc喜+1」这样的指令都可用!
环境变量
RESOURCES_DIR="/data/bot/resources"
EPIC_SCHEDULER="5 8 8 8"
限免游戏资讯订阅功能默认在机器人根目录下 /data/epicfree 文件夹内生成配置文件。定义 RESOURCES_DIR 环境变量即可指定用于存放订阅配置的文件夹,填写包含 epicfree 文件夹的 父级文件夹 路径即可。如果是 Windows 系统应写成类似 D:/path/to/resources_dir 的格式。
限免游戏资讯订阅默认每周六 08:08:08 发送,定义 EPIC_SCHEDULER 环境变量即可指定推送时间,该配置的四个数字依次代表 day_of_week hour minute second。
特别鸣谢
@nonebot/nonebot2 | @Mrs4s/go-cqhttp | @DIYgod/RSSHub | @SD4RK/epicstore_api
作者是 NoneBot2 新手,代码写的较为粗糙,欢迎提出修改意见或加入此插件开发!溜了溜了...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_epicfree-0.2.1.tar.gz.
File metadata
- Download URL: nonebot_plugin_epicfree-0.2.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9b78b2bbce75727cd42ce0c1a7ca6eb774bb42b0f1e40e65960fa284f976689
|
|
| MD5 |
da60f626c521499214f7e7eb9af6abd2
|
|
| BLAKE2b-256 |
d33d5a4c758c8787ee89ce7cb91e7276d037c8483251a31f7c698900bd6acaff
|
File details
Details for the file nonebot_plugin_epicfree-0.2.1-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_epicfree-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d9ff78f06720055473e12c536dbaa04e55ba2bc64c2d332f23e8d07fd2f0755
|
|
| MD5 |
b39a09506f8e5f7c818f6197ac0d1571
|
|
| BLAKE2b-256 |
4ae8da3561cf6169ce3c5d8e04aa224213e607090c1c200d493ddb1ba995e9fd
|