mirror of https://github.com/Mai-with-u/MaiBot.git
让base_action在群聊环境下也获取user_id和user_nickname
parent
514ccd6be3
commit
8e927512e7
|
|
@ -108,6 +108,8 @@ class BaseAction(ABC):
|
|||
# print(self.chat_stream.group_info)
|
||||
if self.chat_stream.group_info:
|
||||
self.is_group = True
|
||||
self.user_id = str(self.chat_stream.user_info.user_id)
|
||||
self.user_nickname = getattr(self.chat_stream.user_info, "user_nickname", None)
|
||||
self.group_id = str(self.chat_stream.group_info.group_id)
|
||||
self.group_name = getattr(self.chat_stream.group_info, "group_name", None)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue