Update main.py

This commit is contained in:
Soulter 2025-02-06 23:24:44 +08:00 committed by GitHub
parent 67957212d4
commit 77886c4aed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,6 @@ class MyPlugin(Star):
'''这是一个 hello world 指令''' # 这是 handler 的描述,将会被解析方便用户了解插件内容。建议填写。
user_name = event.get_sender_name()
message_str = event.message_str # 用户发的纯文本消息字符串
message_chain = event.get_messages() # 用户发的消息链
message_chain = event.get_messages() # 用户的消息的消息链 # from astrbot.api.message_components import *
logger.info(message_chain)
yield event.plain_result(f"Hello, {user_name}, 你发了 {message_str}!") # 发送一条纯文本消息