对入库的文字长度做了一定限制(50字以内)
This commit is contained in:
parent
66e51f3f6e
commit
b723e5aefc
5
func.py
5
func.py
@ -28,8 +28,13 @@ def chat_content_exec(update, context):
|
||||
chat_type = update.effective_chat.type
|
||||
user_id = update.effective_user.id
|
||||
chat_id = update.effective_message.chat_id
|
||||
# 限制为群组
|
||||
if chat_type != "supergroup":
|
||||
return
|
||||
# 限制文字长度不能超过50字
|
||||
if len(text) > 50:
|
||||
return
|
||||
# 取消注释开启独享模式(仅授权群组可用)
|
||||
# if chat_id not in ["1231242141"]:
|
||||
# return
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user