修复在接收到拍一拍消息时,由于某些原因无法获取到消息内容导致异常,且影响到正常消息的获取

(cherry picked from commit ac466fbd366a98ba35b3c94880a67faaa95f781a)
This commit is contained in:
corolin committed 2025-03-22 16:40:34 +08:00
1 parent 8a3681dfc7
commit ab72ef855d
1 file changed
+1 -1
+1 -1
View File
@@ -296,7 +296,7 @@ class ChatBot:
return
raw_message = f"[戳了戳]{global_config.BOT_NICKNAME}" # 默认类型
if info := event.raw_info:
if info := event.model_extra["raw_info"]:
poke_type = info[2].get("txt", "戳了戳") # 戳戳类型,例如“拍一拍”、“揉一揉”、“捏一捏”
custom_poke_message = info[4].get("txt", "") # 自定义戳戳消息,若不存在会为空字符串
raw_message = f"[{poke_type}]{global_config.BOT_NICKNAME}{custom_poke_message}"