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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88b7a2c289f7b1ef259a3af930682d587dd06ccd940e9a05d5f9b48ceda9539b |
|
MD5 | 155a20b630e01fcb88efaecaf6de65ae |
|
BLAKE2b-256 | c7a1d58afa634468964616761be19993f8409290e8a3255dd0c3ee9680b45918 |
Close
Hashes for nonebot_plugin_autopush-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15dc0aafbbb397bf0fad307b6e5581c2bdfa402ccfbfec30aaf37f45daf5e15b |
|
MD5 | 25d834be85773621094af4e61e0f5023 |
|
BLAKE2b-256 | 5008d1a53f604c549e31f396f86ffbb06c0eeb84c166c1e8544cf4ad77eb85fd |