Skip to main content

NoneBot2 自动状态推送

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-autopush

✨ NoneBot 插件简单描述 ✨

license pypi python

📖 介绍

这里是插件的详细介绍部分

💿 安装

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

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

plugins = ["nonebot_plugin_autopush"]

⚙️ 配置

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

配置项 类型 必填 默认值 说明
AUTOPUSH_SERVERS list[Union[str, ServerConfig]] Server 列表
AUTOPUSH_PROXY Optional[str] None 请求 URL 时使用的代理
AUTOPUSH_SUCCESS_CODE list[int] [200, 204] 推送成功时的状态码
AUTOPUSH_PUSH_CRON dict[str, str] {"minute": "*"} 推送间隔(Apscheduler 任务参数)

ServerConfig

class ServerConfig(BaseModel):
    url: str
    headers: dict[str, str] = {}
    method: str = "GET"
    data: Optional[str] = None

🎉 使用

无指令和效果图

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_autopush-0.1.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_autopush-0.1.1-py3-none-any.whl (5.9 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