-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from .sub import sub_add,sub_delete,sub_list,sub_off,sub_on | ||
from .sub import sub_add,sub_delete,sub_list,sub_off,sub_on,sub_open | ||
from .subscribe import danmaku, live |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from nonebot.adapters.onebot.v11.event import MessageEvent | ||
from nonebot.adapters.onebot.v11 import Bot | ||
from nonebot import on_command, get_driver | ||
from ...utils import get_type_id | ||
from ...config import danmaku_config | ||
|
||
|
||
sub_open = on_command("查看面板", priority=5) | ||
sub_open.__doc__ = """查看面板""" | ||
|
||
|
||
@sub_open.handle() | ||
async def _(event: MessageEvent, bot: Bot): | ||
"""查看面板""" | ||
driver = get_driver() | ||
host = danmaku_config.danmaku_host if danmaku_config.danmaku_host else f"http://{driver.config.host}:{driver.config.port}" | ||
type_id = await get_type_id(event) | ||
type = event.message_type | ||
url = f"{host}/danmaku/#/?type={type}&type_id={type_id}" | ||
await sub_open.finish(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "nonebot-plugin-blive-danmaku" | ||
version = "0.2.0" | ||
version = "0.2.3" | ||
description = "A danmaku plugin for Nonebot2" | ||
authors = ["ricardo <[email protected]>"] | ||
documentation = "https://github.com/zangxx66/nonebot_plugin_blive_danmaku#readme" | ||
|