Skip to main content

EpicGameStore free games promotions plugin for NoneBot2

Project description

logo

✨ Epic喜加一 ✨

LICENSE pypi python NoneBot

📖 介绍

一个用于订阅和推送 Epic Games Store 每周免费游戏的 NoneBot2 插件。

功能特色:

  • 定时推送:每天定时检查并推送最新的喜加一游戏信息。
  • 指令查询:随时使用指令查询本周和下周的免费游戏。
  • 灵活订阅:支持群聊和私聊分别订阅,推送时间可自定义。
  • 代理支持:内置完善的代理配置,方便在网络受限的环境下使用。
  • 权限管理:订阅、取消订阅等指令可配置为仅限管理员/群主使用。

💿 安装

使用 nb-cli 安装 (推荐) 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-epicfree
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pdm
pdm add nonebot-plugin-epicfree
poetry
poetry add nonebot-plugin-epicfree
uv
uv pip install nonebot-plugin-epicfree

然后打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_epicfree"]

⚙️ 配置

在 nonebot2 项目的 .env.env.prod 文件中添加下表中的配置。

代理配置 (可选)

如果您的服务器无法直接访问 Epic Games API (例如,在中国大陆),则需要配置代理。

配置项 必填 默认值 说明
EPIC__PROXY_TYPE http 代理类型,可选 "http" 或 "socks5"。留空或不填则不使用代理。
EPIC__PROXY_HOST 127.0.0.1 代理服务器的地址。
EPIC__PROXY_PORT 7890 代理服务器的端口。
EPIC__PROXY_USERNAME (无) 代理的用户名 (如果需要认证)。
EPIC__PROXY_PASSWORD (无) 代理的密码 (如果需要认证)。
EPIC__SUPERUSER_ONLY False 是否仅允许超级用户 (SUPERUSERS) 执行订阅/取消订阅操作。设置为 True后,群管理和普通用户将无法使用订阅相关指令。

代理配置示例:

# 使用本地 7890 端口的 http 代理
EPIC__PROXY_TYPE="http"
EPIC__PROXY_HOST="127.0.0.1"
EPIC__PROXY_PORT=7890

🎉 使用

指令表

指令 (别名) 权限 说明
epic (喜加一) 所有用户 获取本周和下周的 Epic 免费游戏信息。
epic订阅 <时间> 群管/群主/超管* 在当前群聊或私聊中订阅每日定时推送。时间格式为 时:分 (24小时制),例如 epic订阅 8:30
epic取消订阅 群管/群主/超管* 在当前群聊或私聊中取消订阅。
epic订阅状态 所有用户 查看当前群聊或私聊的订阅状态和推送时间。
epic刷新 超级用户 强制刷新 Epic 免费游戏信息缓存。

🎨 效果图

查询效果:

img_3.png

订阅与推送效果:

img_1.png

img_2.png


️🙏 致谢

特别鸣谢

@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.2.12.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_epicfree-0.2.12-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_epicfree-0.2.12.tar.gz.

File metadata

  • Download URL: nonebot_plugin_epicfree-0.2.12.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nonebot_plugin_epicfree-0.2.12.tar.gz
Algorithm Hash digest
SHA256 84c5c53980dc2033b7b8990e2f8217f029bcf304f717c43f4507e43892313e46
MD5 df93ae60933e578dcc701a3d0d153d6f
BLAKE2b-256 95dd9193d3d15a4b0d255165f1971e0a646491f07080a9d6ab683b3f83fdad2c

See more details on using hashes here.

File details

Details for the file nonebot_plugin_epicfree-0.2.12-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_epicfree-0.2.12-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nonebot_plugin_epicfree-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 9a8fe8a4c08a64d7d9a9d7dedfa90baf9839310b6432ac1a5d28834ebe138ed7
MD5 e17b478f1006006b9846be67fb43689b
BLAKE2b-256 3690a302a2a0e3382798417de29365c8e8de0ed827f022ab3204abb63ab4f0d1

See more details on using hashes here.

Supported by

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