【萌新求助】如何以消息中的表情为关键词触发回复 #191
Answered
by
yanyongyu
the-cold-heart
asked this question in
问答
-
如题,如何以消息中的表情(如:[CQ:face,id=178])为关键词触发回复? |
Beta Was this translation helpful? Give feedback.
Answered by
yanyongyu
Aug 1, 2022
Replies: 2 comments 26 replies
-
你可以自己写一个rule判断消息中的表情,然后 |
Beta Was this translation helpful? Give feedback.
26 replies
Answer selected by
the-cold-heart
-
# 获取消息
get_msg = event.raw_message
# 判断消息中是否包含表情的CQ码
if "[CQ:face,id=178]" in get_msg:
# 结果为True
# 执行代码
else:
# 结果为False
# 执行代码 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你可以自己写一个rule判断消息中的表情,然后
on_message(rule)
即可