Skip to content

Commit

Permalink
全由alconna发送消息
Browse files Browse the repository at this point in the history
  • Loading branch information
eya46 committed Jan 20, 2024
1 parent a851d9d commit 40da364
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions nonebot_plugin_enatfrp/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,9 @@ async def request(method: str, url: str, headers, **data) -> Any:


async def send(msg: Union[Any, UniMessage]) -> Receipt:
if not (config.natfrp_at or config.natfrp_reply):
await current_matcher.get().send(str(msg) if isinstance(msg, UniMessage) else msg)
else:
if not isinstance(msg, UniMessage):
msg = UniMessage(msg)
return await msg.send(at_sender=config.natfrp_at, reply_to=config.natfrp_reply)
if not isinstance(msg, UniMessage):
msg = UniMessage(msg)
return await msg.send(at_sender=config.natfrp_at, reply_to=config.natfrp_reply)


def bytes_to_human(data: int) -> str:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-enatfrp"
version = "0.1.1"
version = "0.1.2"
description = "SakuraFrp管理插件"
authors = ["eya46 <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 40da364

Please sign in to comment.