mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 10:47:14 +00:00
keyword 更新,修复已知问题 (#118)
问题一、当发送消息不包含文字时,发送不成功。 问题二、修复在私人聊天中的 replace_data["chat_name"] 原来的 chat.title 产生的报错。
This commit is contained in:
parent
c67fa35164
commit
b8cdf9b9ea
@ -141,7 +141,10 @@ async def send_reply(chat_id, reply_msg, context):
|
||||
replace_data["last_name"] = sender.last_name if sender.last_name else ""
|
||||
if chat:
|
||||
replace_data["chat_id"] = chat.id
|
||||
replace_data["chat_name"] = chat.title
|
||||
last_name = chat.last_name
|
||||
if not last_name:
|
||||
last_name = ""
|
||||
replace_data["chat_name"] = f"{chat.first_name} {last_name}"
|
||||
update_last_time = False
|
||||
could_send_msg = valid_time(chat_id)
|
||||
for re_type, re_msg in reply_msg:
|
||||
@ -576,6 +579,8 @@ async def auto_reply(context):
|
||||
elif g_list or n_list:
|
||||
user_list = g_list if g_list else n_list
|
||||
send_text = context.text
|
||||
if not send_text:
|
||||
send_text = ""
|
||||
for k, v in plain_dict.items():
|
||||
if k in send_text:
|
||||
tmp = get_redis(f"keyword.{chat_id}.single.plain.{encode(k)}")
|
||||
|
Loading…
Reference in New Issue
Block a user