Temp: Removed animation support

This commit is contained in:
2023-06-27 20:04:03 +02:00
parent 39b9c365fb
commit f0cad86dd6
4 changed files with 33 additions and 37 deletions

View File

@@ -23,7 +23,7 @@ logger = logging.getLogger(__name__)
@Client.on_message(
~filters.scheduled & filters.private & filters.photo
| filters.video
| filters.animation
# | filters.animation
| filters.document
)
async def get_submission(app: PyroClient, msg: Message):
@@ -103,27 +103,27 @@ async def get_submission(app: PyroClient, msg: Message):
save_tmp = False
contents = msg.video.file_id, SubmissionType.VIDEO # , msg.video.file_name
if msg.animation is not None:
logger.info(
"User %s is trying to submit an animation with name '%s' and size of %s MB",
msg.from_user.id,
msg.animation.file_name,
msg.animation.file_size / 1024 / 1024,
)
if msg.animation.file_size > app.config["submission"]["file_size"]:
await msg.reply_text(
app._("document_too_large", "message", locale=user_locale).format(
str(app.config["submission"]["file_size"] / 1024 / 1024)
),
quote=True,
)
return
if msg.animation.file_size > app.config["submission"]["tmp_size"]:
save_tmp = False
contents = (
msg.animation.file_id,
SubmissionType.ANIMATION,
) # , msg.animation.file_name
# if msg.animation is not None:
# logger.info(
# "User %s is trying to submit an animation with name '%s' and size of %s MB",
# msg.from_user.id,
# msg.animation.file_name,
# msg.animation.file_size / 1024 / 1024,
# )
# if msg.animation.file_size > app.config["submission"]["file_size"]:
# await msg.reply_text(
# app._("document_too_large", "message", locale=user_locale).format(
# str(app.config["submission"]["file_size"] / 1024 / 1024)
# ),
# quote=True,
# )
# return
# if msg.animation.file_size > app.config["submission"]["tmp_size"]:
# save_tmp = False
# contents = (
# msg.animation.file_id,
# SubmissionType.ANIMATION,
# ) # , msg.animation.file_name
if msg.photo is not None:
logger.info(