Skip to main content

A Epic free game info plugin for Nonebot2

Project description

Nonebot Plugin EpicFree


🤖 用于获取 Epic 限免游戏资讯的 Nonebot2 插件


actions license pypi python


安装方法

可以使用以下两命令快速安装,但请注意可能引起的依赖版本冲突。

如果 pip 配置了 PyPI 镜像(推荐清华大学 PyPI 镜像),你可能无法及时检索到插件最新版本。

nb plugin install nonebot_plugin_epicfree
# or
pip install --upgrade nonebot_plugin_epicfree
**关于依赖版本**

以上述方式安装本插件时,可能由于版本差异引起报错,对于新手推荐在安装插件前先存留当前环境依赖版本,以便后续恢复:

# 备份当前的依赖版本
pip3 freeze > requirements.txt

# 尝试安装 nonebot_plugin_epicfree

# 安装备份的依赖版本
pip3 install -r requirements.txt

如果安装前未存留备份,可以在 安装完本插件后,使用 pip3 install --upgrade nb-cli 按最新版本 nb-cli 的依赖重新安装,实测不影响此插件使用。

建议使用 Python 虚拟环境

在 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_epicfree-0.1.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_epicfree-0.1.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page