Support UIGF v2.3

This commit is contained in:
xtaodada 2023-08-27 15:14:05 +08:00
parent 468ed22a26
commit dbffd308e6
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
3 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
from simnet.models.genshin.wish import BannerType
PAIMONMOE_VERSION = 3
UIGF_VERSION = "v2.2"
UIGF_VERSION = "v2.3"
GACHA_TYPE_LIST = {

View File

@ -142,10 +142,11 @@ class GachaLog:
id=item.id,
name=item.name,
gacha_type=item.gacha_type,
item_id=roleToId(item.name) if item.item_type == "角色" else weaponToId(item.name),
item_type=item.item_type,
rank_type=item.rank_type,
time=item.time.strftime("%Y-%m-%d %H:%M:%S"),
uigf_gacha_type=item.gacha_type,
uigf_gacha_type=item.gacha_type if item.gacha_type != "400" else "301",
)
)
await self.save_json(save_path, json.loads(info.json()))

View File

@ -295,7 +295,7 @@ class WishLogPlugin(Plugin.Conversation):
await message.reply_chat_action(ChatAction.TYPING)
path = await self.gacha_log.gacha_log_to_uigf(str(user.id), str(player_id))
await message.reply_chat_action(ChatAction.UPLOAD_DOCUMENT)
await message.reply_document(document=open(path, "rb+"), caption="抽卡记录导出文件 - UIGF V2.2")
await message.reply_document(document=open(path, "rb+"), caption="抽卡记录导出文件 - UIGF V2.3")
except GachaLogNotFound:
logger.info("未找到用户 %s[%s] 的抽卡记录", user.full_name, user.id)
buttons = [