support user info
This commit is contained in:
parent
d50487e9d4
commit
5747bdee32
2
func.py
2
func.py
@ -133,7 +133,7 @@ def stat(update, context):
|
|||||||
r.expireat("{}_{}_frequency_limit".format(chat_id, user_id), ex_time)
|
r.expireat("{}_{}_frequency_limit".format(chat_id, user_id), ex_time)
|
||||||
count = int(r.get("{}_{}_frequency_limit".format(chat_id, user_id)))
|
count = int(r.get("{}_{}_frequency_limit".format(chat_id, user_id)))
|
||||||
if count > LIMIT_COUNT:
|
if count > LIMIT_COUNT:
|
||||||
update.message.reply_text("您在这个小时内的生成配额已经用完,请稍后再试~")
|
update.message.reply_text(f"[您](tg://user?id={user_id})在这个小时内的生成配额已经用完,请稍后再试~")
|
||||||
return
|
return
|
||||||
add_user_task(chat_id, user_id)
|
add_user_task(chat_id, user_id)
|
||||||
print("群组: {},用户: {} | {} 发起了主动触发请求".format(chat_id, username, user_id, ))
|
print("群组: {},用户: {} | {} 发起了主动触发请求".format(chat_id, username, user_id, ))
|
||||||
|
2
task.py
2
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(
|
hot_word_string += "\t\t\t\t\t\t\t\t" + "👥 `" + str(word_amount[i][0]) + "`" + ":" + str(
|
||||||
word_amount[i][1]) + "\n"
|
word_amount[i][1]) + "\n"
|
||||||
# print(hot_word_string)
|
# 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"
|
f"🤹 Ta 今天讨论最多的是:\n\n{hot_word_string}\n"
|
||||||
else:
|
else:
|
||||||
text += '无法分析出 Ta 的热词列表,可能是数据量过小,嗨起来吧~\n'
|
text += '无法分析出 Ta 的热词列表,可能是数据量过小,嗨起来吧~\n'
|
||||||
|
Loading…
Reference in New Issue
Block a user