Skip to content

Commit

Permalink
chore: ...
Browse files Browse the repository at this point in the history
  • Loading branch information
fllesser committed Dec 6, 2024
1 parent 67291bc commit 9a9c981
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions nonebot_plugin_emojilike/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
)


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))
cardlike = on_command(cmd="赞我")
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:
if id in msg_emoji_id_set:
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):
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-emojilike"
version = "0.0.3"
version = "0.0.4"
description = "nonebot2 名片赞,表情回应插件"
authors = ["fllesser <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 9a9c981

Please sign in to comment.