mirror of
https://github.com/omg-xtao/ytdlbot.git
synced 2025-01-30 17:58:36 +00:00
fix sub
This commit is contained in:
parent
2df3ee5c6d
commit
9c199ab81a
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user