Skip to main content

该插件提供了一个位于 /brec_report 的路由,并和录播姬适配,实现实现几乎实时的开播提醒 (需要安装录播姬)

Project description

nonebot-plugin-brecreport

功能

该插件提供了一个位于 /brec_report 的路由,并和录播姬适配,实现实现几乎实时的开播提醒 (需要安装录播姬)

使用

nonebot2 .env配置

Field Type Desc Default Note
brec_report_from Optional[ID] 推送消息的机器人 ID 若不设置,任意获取一个可用的机器人
brec_report_route str 路由 /brec_report 若与其它路由冲突可以更换该值
brec_report_template str 消息模板 主播{Name}开播了!标题:{Title}\n直播分区:{AreaNameParent}-{AreaNameChild}\nhttps://live.bilibili.com/{RoomId} 支持 {Name}(主播名), {Title}(直播标题), {AreaNameParent}(主分区), {AreaNameChild}(二级分区), {RoomId}(长房间号) 5个字段
brec_report_roomids Optional[List[str]] 要报告的B站直播间号 长或短号都支持,若不设置,谁开播都不会报告
brec_report_send_to_group Optional[List[str]] 报告的群号

录播姬配置

录播姬的Web界面中设置Webhook V2地址为 http://127.0.0.1:8080/brec_report ,如果更改过nonebot2相关设置请对应更改地址。

原理

录播姬在监控开播情况时可以发起Webhook(详见https://rec.danmuji.org/reference/webhook/ ),取 "EventType": "StreamStarted" 作为直播提醒。

Note: 录播姬中,对某直播房间关闭自动录制后,录播姬仍可发起 StreamStartedStreamEnded 两种Webhook。

Todo

  • 开播封面发送
  • (?)推送给好友
  • (?)支持更多EventType

致谢

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_brecreport-0.1.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_brecreport-0.1.3-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_brecreport-0.1.3.tar.gz.

File metadata

  • Download URL: nonebot_plugin_brecreport-0.1.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.1.0-16-amd64

File hashes

Hashes for nonebot_plugin_brecreport-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b02f7106d2745ad15d8ccf8de7230f0c94fdd9d950f8d960b030dd2411868ba6
MD5 8990b00b5ad8aa55ba2dcf5829dca8e4
BLAKE2b-256 6f269d84fb9652aa083fada5427f0ef195061a2ec65d2baca902804728bc3ae1

See more details on using hashes here.

File details

Details for the file nonebot_plugin_brecreport-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_brecreport-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 24d4d4bf6d02840e6fc58e52c570f4c2f39525464cc7d1262351a2006084ad93
MD5 b53c4468634297b57be34b030787d788
BLAKE2b-256 5e30fec99e4bc2dcc8a450b8205b66b824579c6c284477eee34ec81113f8c395

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page