From dc30f33dd167f4c99127bcc3548534cae2889ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Sat, 8 Oct 2022 21:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E5=AF=B9=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E9=99=90=E5=88=B6=E4=B8=BA=20256kb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/gacha/gacha_log.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/genshin/gacha/gacha_log.py b/plugins/genshin/gacha/gacha_log.py index 0432b43..c415452 100644 --- a/plugins/genshin/gacha/gacha_log.py +++ b/plugins/genshin/gacha/gacha_log.py @@ -1,8 +1,7 @@ import json - from io import BytesIO -from genshin.models import BannerType +from genshin.models import BannerType from telegram import Update, User, Message, Document from telegram.constants import ChatAction from telegram.ext import CallbackContext, CommandHandler, MessageHandler, filters, ConversationHandler @@ -68,8 +67,8 @@ class GachaLog(Plugin.Conversation, BasePlugin.Conversation): document = message.document if not document.file_name.endswith(".json"): await message.reply_text("文件格式错误,请发送符合 UIGF 标准的抽卡记录文件") - if document.file_size > 50 * 1024 * 1024: - await message.reply_text("文件过大,请发送小于 50MB 的文件") + if document.file_size > 0.2 * 1024 * 1024: + await message.reply_text("文件过大,请发送小于 256kb 的文件") try: data = BytesIO() await (await document.get_file()).download(out=data)