3
0

♻️ Change cover order

This commit is contained in:
xtaodada 2022-01-28 01:04:06 +08:00
parent daa43b74fe
commit f58313ded0
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 6 additions and 6 deletions

View File

@ -106,10 +106,14 @@ async def get_character(name: str):
f"<b>称号:</b>{data['title']}\n" \
f"<b>CV</b>{data['cv']['chinese']}\n" \
f"<b>简介:</b>{data['description']}"
try:
if "card" in data["images"]:
url = data["images"]["card"]
except KeyError:
elif "cover2" in data["images"]:
url = data["images"]["cover2"]
elif "icon" in data["images"]:
url = data["images"]["icon"]
else:
url = None
return result, url

View File

@ -1,8 +1,4 @@
from configparser import RawConfigParser
from os import getcwd, sep
from ci import admin_id
from defs.redis_load import redis, redis_status
from pyrogram import Client
from pyrogram.types import Message, CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton