A Epic free game info plugin for Nonebot2
Project description
Nonebot Plugin EpicFree
🤖 用于获取 Epic 限免游戏资讯的 Nonebot2 插件
安装方法
可以使用以下两命令快速安装,但请注意可能引起的依赖版本冲突。
如果 pip
配置了 PyPI 镜像(推荐清华大学 PyPI 镜像),你可能无法及时检索到插件最新版本。
nb plugin install nonebot_plugin_epicfree
# or
pip install --upgrade nonebot_plugin_epicfree
**关于依赖版本**
以上述方式安装本插件时,可能由于版本差异引起报错,对于新手推荐在安装插件前先存留当前环境依赖版本,以便后续恢复:
# 备份当前的依赖版本
pip3 freeze > requirements.txt.txt
# 尝试安装 nonebot_plugin_epicfree
# 安装备份的依赖版本
pip3 install -r requirements.txt
当然,进阶方法是 使用虚拟环境,具体操作将不在本仓库讨论。
在 Nonebot2 入口文件(例如 bot.py
)增加:
nonebot.load_plugin("nonebot_plugin_epicfree")
指令详解
# nonebot_plugin_epicfree/nonebot_plugin_epicfree/__init__.py#L7
matcher = on_regex("((E|e)(P|p)(I|i)(C|c))?喜(加一|\+1)")
基于正则匹配,所以,甚至 EpIc喜+1
这样的指令都可用!(
如果你觉得不顺眼也可以自己参考 Nonebot2 文档修改下。
特别鸣谢
@nonebot/nonebot2 | @Mrs4s/go-cqhttp | @DIYgod/RSSHub | @SD4RK/epicstore_api
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
Close
Hashes for nonebot_plugin_epicfree-0.1.0a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d353a9969ccf565a7c1275da6c6f544d4c06399df78d34fb7853c69c4b6c701 |
|
MD5 | 81523c034a5774f5e23cc18ca3d26483 |
|
BLAKE2b-256 | df2f3e24170069755c0dd6a6a1b85d04f5fff43751898930a1113c36b24075ed |
Close
Hashes for nonebot_plugin_epicfree-0.1.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2215656c8df06f8f6151b8c1d1bcc53ad086ddc26262659387d3bbf9f11d8cb |
|
MD5 | b4bf710eba0f3ed435e604514e4b249c |
|
BLAKE2b-256 | 5a6e963d8506d1b4d83d2bd8234a927268777b94554162b914977320c1261190 |