From 9a9c98159c56b2ac853f591c353f7adbe7deae16 Mon Sep 17 00:00:00 2001 From: fllesser Date: Fri, 6 Dec 2024 20:51:08 +0800 Subject: [PATCH] chore: ... --- nonebot_plugin_emojilike/__init__.py | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nonebot_plugin_emojilike/__init__.py b/nonebot_plugin_emojilike/__init__.py index cd8daff..26aa738 100644 --- a/nonebot_plugin_emojilike/__init__.py +++ b/nonebot_plugin_emojilike/__init__.py @@ -22,7 +22,7 @@ ) -def contain_face(event: MessageEvent) -> bool: +def contain_face(event: GroupMessageEvent) -> bool: return any(seg.type == "face" for seg in event.get_message()) emojilike = on_message(rule=Rule(contain_face)) @@ -30,7 +30,7 @@ def contain_face(event: MessageEvent) -> bool: sub_card_like = on_command(cmd="天天赞我") @emojilike.handle() -async def _(bot: Bot, event: MessageEvent): +async def _(bot: Bot, event: GroupMessageEvent): msg = event.get_message() face_id_list = [seg.data.get('id') for seg in msg if seg.type == "face"] for id in face_id_list: @@ -38,7 +38,7 @@ async def _(bot: Bot, event: MessageEvent): await bot.call_api("set_msg_emoji_like", message_id = event.message_id, emoji_id = id) @cardlike.handle() -async def _(bot: Bot, event: MessageEvent): +async def _(bot: Bot, event: GroupMessageEvent): id_set = {'76', '66', '63', '201', '10024'} try: for _ in range(5): diff --git a/pyproject.toml b/pyproject.toml index c552cdb..2b05d08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nonebot-plugin-emojilike" -version = "0.0.3" +version = "0.0.4" description = "nonebot2 名片赞,表情回应插件" authors = ["fllesser "] readme = "README.md"