NoneBot2 自动状态推送
Project description
📖 介绍
这里是插件的详细介绍部分
💿 安装
使用 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
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_autopush-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cbb65b6bbaaeb27dc4644f966cb8b78908fbadb8d812725bd3820b9b15505de |
|
MD5 | b0ae8c4f1d2a31774d6868806a100901 |
|
BLAKE2b-256 | 95eef3a3794c5418b982db658e55660a2fa325ac2f52576dda7cdacefab489fa |
Close
Hashes for nonebot_plugin_autopush-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ebe3d0b048c54a107c52ed1d53a3bdcba7bd293bd1696162abbdb95f8ad474e |
|
MD5 | 9335838a2ba3afe24b02ec4a0117da65 |
|
BLAKE2b-256 | 1d92cf5d0d004f62824d0eb1d60cfa53559759f1f4d36e133688a331f11ea70e |