处理DDTV WebHook并推送相关信息
Project description
📖 介绍
有一个监控室大爷,他每天至少需要观看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"] |
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_ddtv_webhook-0.1.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_ddtv_webhook-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d185c826ccd2ea09c696575d17fc2f629505f85a08ef12c62eed97d2465bdffa
|
|
| MD5 |
fec2868206a3322009b751a94c7150f2
|
|
| BLAKE2b-256 |
ca828a131a343980e3589a96a595b828dbb430e8938859fe534adde8172fb1f0
|
Provenance
The following attestation bundles were made for nonebot_plugin_ddtv_webhook-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on Effect-Wei/nonebot-plugin-ddtv-webhook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_ddtv_webhook-0.1.0.tar.gz -
Subject digest:
d185c826ccd2ea09c696575d17fc2f629505f85a08ef12c62eed97d2465bdffa - Sigstore transparency entry: 166717042
- Sigstore integration time:
-
Permalink:
Effect-Wei/nonebot-plugin-ddtv-webhook@0be48d30fd62fad21ad970a5eac5457604f652f6 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/Effect-Wei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@0be48d30fd62fad21ad970a5eac5457604f652f6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nonebot_plugin_ddtv_webhook-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_ddtv_webhook-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d665cdf3ded9b20e8fbc6f988885abdd880cf59784e70f1592e3ed52ec10395
|
|
| MD5 |
8fd41293320e40d9fc559666038b005f
|
|
| BLAKE2b-256 |
eea80abf7f8fce78bb16ed5db1d7b68541afac54d90815017e0e28c69aa4f611
|
Provenance
The following attestation bundles were made for nonebot_plugin_ddtv_webhook-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on Effect-Wei/nonebot-plugin-ddtv-webhook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_ddtv_webhook-0.1.0-py3-none-any.whl -
Subject digest:
0d665cdf3ded9b20e8fbc6f988885abdd880cf59784e70f1592e3ed52ec10395 - Sigstore transparency entry: 166717044
- Sigstore integration time:
-
Permalink:
Effect-Wei/nonebot-plugin-ddtv-webhook@0be48d30fd62fad21ad970a5eac5457604f652f6 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/Effect-Wei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@0be48d30fd62fad21ad970a5eac5457604f652f6 -
Trigger Event:
push
-
Statement type: