mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
✨ 更换原神图片地址
This commit is contained in:
parent
1c3eccc04b
commit
7cef262937
@ -164,7 +164,7 @@ async def _(event: MessageEvent, players=CommandPlayer(only_cn=False), character
|
||||
character_info = await gim.get_character(name=character)
|
||||
if not character_info:
|
||||
logger.info('原神角色卡片', '➤➤', {'角色': character}, '没有该角色信息,发送随机图', True)
|
||||
msg += MessageSegment.image(f'http://img.genshin.cherishmoon.fun/{character}')
|
||||
msg += MessageSegment.image(f'https://genshin-res.cherishmoon.fun/img?name={character}')
|
||||
else:
|
||||
img, temp_img = await draw_chara_card(character_info)
|
||||
logger.info('原神角色卡片', '➤➤', {'角色': character}, '制图完成', True)
|
||||
@ -178,7 +178,7 @@ async def _(event: MessageEvent, players=CommandPlayer(only_cn=False), character
|
||||
character_info = await gim.get_character(name=characters[0])
|
||||
if not character_info:
|
||||
logger.info('原神角色卡片', '➤➤', {'角色': characters[0]}, '没有该角色信息,发送随机图', True)
|
||||
msg += MessageSegment.image(f'http://img.genshin.cherishmoon.fun/{characters[0]}')
|
||||
msg += MessageSegment.image(f'https://genshin-res.cherishmoon.fun/img?name={characters[0]}')
|
||||
else:
|
||||
img, temp_img = await draw_chara_card(character_info)
|
||||
logger.info('原神角色卡片', '➤➤', {'角色': characters[0]}, '制图完成', True)
|
||||
|
@ -26,7 +26,7 @@ talent_color = [('#d5f2b6', '#6d993d'), ('#d5f2b6', '#6d993d'), ('#d5f2b6', '#6d
|
||||
|
||||
|
||||
async def draw_chara_card(info: Character):
|
||||
img = await aiorequests.get_img(f'http://img.genshin.cherishmoon.fun/{info.name}', mode='RGBA', follow_redirects=True)
|
||||
img = await aiorequests.get_img(f'https://genshin-res.cherishmoon.fun/img?name={info.name}', mode='RGBA', follow_redirects=True)
|
||||
if img == 'No Such File':
|
||||
return '暂时没有这个角色的同人图哦~', None
|
||||
# 新建卡片
|
||||
|
Loading…
Reference in New Issue
Block a user