📖 介绍
有一个监控室大爷,他每天至少需要观看720小时来自$2^{64}$位不同管人的直播才能保证身心健康。因此,他的好朋友编写了本插件,以便第一时间通过 QQ Bot 告知大爷哪位管人开播或者下播了。
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-ddtv-webhook
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-ddtv-webhook
pdm
pdm add nonebot-plugin-ddtv-webhook
poetry
poetry add nonebot-plugin-ddtv-webhook
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot-plugin-ddtv-webhook"]
⚙️ 配置
Webhook URL查询字符串
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| token | 否 | 无 | 令牌;当与设置的 ddtv_webhook_token 相同时才会推送消息,否则返回 403 |
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| ddtv_webhook_token | 否 | 无 | 令牌,若不设置则不会进行验证,所有人都可以触发 Webhook |
| ddtv_webhook_send_to | 否 | 无 | 信息订阅者的 QQ 号,格式为 ["123", "456"] |
| ddtv_webhook_send_to_group | 否 | 无 | 信息订阅群的群号,格式为 ["123", "456"] |
| ddtv_webhook_route | 否 | /ddtv_webhook | Webhook 的 URI |
| superusers | 是 | 无 | Bot 管理员 QQ 号,在什么都没填的情况下默认将所有消息发给 Bot 管理员,格式为 ["123", "456"] |
Metadata
Release files for nonebot-plugin-ddtv-webhook 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nonebot_plugin_ddtv_webhook-0.1.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_ddtv_webhook-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / nonebot_plugin_ddtv_webhook-0.1.0.tar.gz
| Download URL | nonebot_plugin_ddtv_webhook-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d185c826ccd2ea09c696575d17fc2f629505f85a08ef12c62eed97d2465bdffa
|
|
BLAKE2b-256 checksum How to use checksums |
ca828a131a343980e3589a96a595b828dbb430e8938859fe534adde8172fb1f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 29, 2025.
Transparency logRelease files / nonebot_plugin_ddtv_webhook-0.1.0-py3-none-any.whl
| Download URL | nonebot_plugin_ddtv_webhook-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d665cdf3ded9b20e8fbc6f988885abdd880cf59784e70f1592e3ed52ec10395
|
|
BLAKE2b-256 checksum How to use checksums |
eea80abf7f8fce78bb16ed5db1d7b68541afac54d90815017e0e28c69aa4f611
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 29, 2025.
Transparency log