From 5747bdee321753af0978a93da203bc32dfb98eb7 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 21 Jun 2021 16:32:44 +0800 Subject: [PATCH] support user info --- func.py | 2 +- task.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/func.py b/func.py index 939f2c1..ad5baed 100644 --- a/func.py +++ b/func.py @@ -133,7 +133,7 @@ def stat(update, context): r.expireat("{}_{}_frequency_limit".format(chat_id, user_id), ex_time) count = int(r.get("{}_{}_frequency_limit".format(chat_id, user_id))) if count > LIMIT_COUNT: - update.message.reply_text("您在这个小时内的生成配额已经用完,请稍后再试~") + update.message.reply_text(f"[您](tg://user?id={user_id})在这个小时内的生成配额已经用完,请稍后再试~") return add_user_task(chat_id, user_id) print("群组: {},用户: {} | {} 发起了主动触发请求".format(chat_id, username, user_id, )) diff --git a/task.py b/task.py index 89e34ba..101e448 100644 --- a/task.py +++ b/task.py @@ -289,7 +289,7 @@ def generate_user(group, uid): hot_word_string += "\t\t\t\t\t\t\t\t" + "👥 `" + str(word_amount[i][0]) + "`" + ":" + str( word_amount[i][1]) + "\n" # print(hot_word_string) - text += f"🗣️ 此成员共产生 {total_message_amount} 条纯文本消息\n" \ + text += f"🗣️ [此成员](tg://user?id={uid})共产生 {total_message_amount} 条纯文本消息\n" \ f"🤹‍ Ta 今天讨论最多的是:\n\n{hot_word_string}\n" else: text += '无法分析出 Ta 的热词列表,可能是数据量过小,嗨起来吧~\n'