更换原神图片地址

This commit is contained in:
惜月 2023-02-05 18:23:22 +08:00 committed by GitHub
parent 1c3eccc04b
commit 7cef262937
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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
# 新建卡片