This commit is contained in:
BennyThink 2022-03-17 19:56:38 +08:00
parent 2df3ee5c6d
commit 9c199ab81a
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481
2 changed files with 4 additions and 4 deletions

View File

@ -317,14 +317,14 @@ def upload_processor(client, bot_msg, url, vp_or_fid: "typing.Any[str, pathlib.P
def gen_cap(bm, url, video_path):
chat_id = bm.chat.id
user = bm.chat
if user is None:
user_info = ""
else:
try:
user_info = "@{}({})-{}".format(
user.username or "N/A",
user.first_name or "" + user.last_name or "",
user.id
)
except Exception:
user_info = ""
if isinstance(video_path, pathlib.Path):
meta = get_metadata(video_path)

View File

@ -347,7 +347,7 @@ def periodic_sub_check():
logging.warning("User is blocked or deleted. %s", e)
vip.deactivate_user_subscription(uid)
except Exception as e:
logging.error("Unknown error when sending message to user. %s", e)
logging.error("Unknown error when sending message to user. %s", traceback.format_exc())
finally:
time.sleep(random.random() * 3)