diff --git a/hoshino/modules/Genshin_Paimon/character_alias.py b/hoshino/modules/Genshin_Paimon/character_alias.py index a51a0b9..d45641f 100644 --- a/hoshino/modules/Genshin_Paimon/character_alias.py +++ b/hoshino/modules/Genshin_Paimon/character_alias.py @@ -47,7 +47,9 @@ character_alias={ 10000062:['埃洛伊'], 10000063:['申鹤','小姨','小姨妈'], 10000064:['云堇','云先生'], - 10000066:['神里绫人','0人','大舅子','小舅子','绫人','神里哥'] + 10000066:['神里绫人','0人','大舅子','小舅子','绫人','神里哥'], + 10000060:["夜兰", "夜阑", "叶兰"], + 10000065: ["久岐忍", "忍者", "阿卡丽"] } short_name={ '胡桃': '胡桃', diff --git a/hoshino/modules/Genshin_Paimon/game_guild/__init__.py b/hoshino/modules/Genshin_Paimon/game_guild/__init__.py index 422f7bd..67a8ce7 100644 --- a/hoshino/modules/Genshin_Paimon/game_guild/__init__.py +++ b/hoshino/modules/Genshin_Paimon/game_guild/__init__.py @@ -1,6 +1,6 @@ -import hoshino,os +import hoshino, os from PIL import Image -from hoshino import R,MessageSegment,aiorequests,logger,Service +from hoshino import R, MessageSegment, aiorequests, logger, Service from hoshino.typing import CQEvent, Message from ..character_alias import get_id_by_alias from .blue import get_blue_pic @@ -9,7 +9,7 @@ from hoshino.util import filt_message import re import time -help_msg=''' +help_msg = ''' 1.[xx角色攻略]查看西风驿站出品的角色一图流攻略 2.[xx角色材料]查看惜月出品的角色材料统计 3.[xx参考面板]查看blue菌hehe出品的参考面板攻略 @@ -19,47 +19,42 @@ help_msg=''' ''' sv = Service('派蒙WIKI', bundle='派蒙', help_=help_msg) - res_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'res') + @sv.on_prefix('角色攻略') @sv.on_suffix('角色攻略') -async def genshinguide(bot,ev): +async def genshinguide(bot, ev): name = ev.message.extract_plain_text().strip() realname = get_id_by_alias(name) if not realname: - await bot.send(ev,f'没有找到{filt_message(name)}的攻略',at_sender=True) - elif realname[1][0] in ['八重神子', '神里绫华', '神里绫人', '温迪', '七七', '雷电将军']: - path = os.path.join(res_path, 'role_guide',f'{realname[1][0]}.png') - cq_img = f'[CQ:image,file=file:///{path}]' - await bot.send(ev,cq_img,at_sender=True) + await bot.send(ev, f'没有找到{filt_message(name)}的攻略', at_sender=True) else: - img = f'[CQ:image,file=https://cherishmoon.oss-cn-shenzhen.aliyuncs.com/LittlePaimon/XFGuide/{realname[1][0]}.png]' - await bot.send(ev,img) + img = f'[CQ:image,file=https://static.cherishmoon.fun/LittlePaimon/XFGuide/{realname[1][0]}.jpg]' + await bot.send(ev, img) + @sv.on_prefix('角色材料') @sv.on_suffix('角色材料') -async def genshinmaterial(bot,ev): +async def genshinmaterial(bot, ev): name = ev.message.extract_plain_text().strip() realname = get_id_by_alias(name) - if name in ['夜兰', '久岐忍']: - cq_img = f'[CQ:image,file=file:///{os.path.join(res_path, "role_material",f"{name}材料.png")}]' - await bot.send(ev,cq_img,at_sender=True) - elif not realname: - await bot.send(ev,f'没有找到{filt_message(name)}的材料',at_sender=True) + if not realname: + await bot.send(ev, f'没有找到{filt_message(name)}的材料', at_sender=True) else: - path = os.path.join(res_path, 'role_material',f'{realname[1][0]}材料.png') + path = os.path.join(res_path, 'role_material', f'{realname[1][0]}材料.png') cq_img = f'[CQ:image,file=file:///{path}]' - await bot.send(ev,cq_img,at_sender=True) + await bot.send(ev, cq_img, at_sender=True) + @sv.on_prefix('参考面板') @sv.on_suffix('参考面板') -async def genshinAttribute(bot,ev): +async def genshinAttribute(bot, ev): name = ev.message.extract_plain_text().strip() if name not in ['风主', '岩主', '雷主']: realname = get_id_by_alias(name) if not realname: - await bot.send(ev,f'没有找到{filt_message(name)}的参考面板',at_sender=True) + await bot.send(ev, f'没有找到{filt_message(name)}的参考面板', at_sender=True) return realname = realname[1][0] else: @@ -69,17 +64,17 @@ async def genshinAttribute(bot,ev): pic = pic.crop((0, pic_data[1][0], 1080, pic_data[1][1])) pic = pil2b64(pic, 85) pic = MessageSegment.image(pic) - await bot.send(ev,pic,at_sender=True) - + await bot.send(ev, pic, at_sender=True) + @sv.on_prefix('收益曲线') @sv.on_suffix('收益曲线') -async def genshinAttribute2(bot,ev): +async def genshinAttribute2(bot, ev): name = ev.message.extract_plain_text().strip() if name not in ['风主', '岩主', '雷主']: realname = get_id_by_alias(name) if not realname: - await bot.send(ev,f'没有找到{filt_message(name)}的参考面板',at_sender=True) + await bot.send(ev, f'没有找到{filt_message(name)}的参考面板', at_sender=True) return realname = realname[1][0] else: @@ -87,7 +82,8 @@ async def genshinAttribute2(bot,ev): pic = Image.open(os.path.join(res_path, 'blue', f'{realname}.png')) pic = pil2b64(pic, 85) pic = MessageSegment.image(pic) - await bot.send(ev,pic,at_sender=True) + await bot.send(ev, pic, at_sender=True) + @sv.on_suffix(('材料', '天赋材料', '角色天赋材料', '突破材料', '武器突破材料')) async def daily_material(bot, ev): @@ -113,11 +109,13 @@ async def daily_material(bot, ev): else: week = '0' if week == "0": - await bot.send(ev, '周日所有材料都可以刷哦!', at_sender = True) + await bot.send(ev, '周日所有材料都可以刷哦!', at_sender=True) elif week in ['1', '4']: - await bot.send(ev,f'[CQ:image,file=file:///{os.path.join(res_path, "daily_material","周一周四.jpg")}]',at_sender=True) + await bot.send(ev, f'[CQ:image,file=file:///{os.path.join(res_path, "daily_material", "周一周四.jpg")}]', + at_sender=True) elif week in ['2', '5']: - await bot.send(ev,f'[CQ:image,file=file:///{os.path.join(res_path, "daily_material","周二周五.jpg")}]',at_sender=True) + await bot.send(ev, f'[CQ:image,file=file:///{os.path.join(res_path, "daily_material", "周二周五.jpg")}]', + at_sender=True) else: - await bot.send(ev,f'[CQ:image,file=file:///{os.path.join(res_path, "daily_material","周三周六.jpg")}]',at_sender=True) - \ No newline at end of file + await bot.send(ev, f'[CQ:image,file=file:///{os.path.join(res_path, "daily_material", "周三周六.jpg")}]', + at_sender=True) diff --git a/hoshino/modules/Genshin_Paimon/res/gacha_res/武器/若水.png b/hoshino/modules/Genshin_Paimon/res/gacha_res/武器/若水.png new file mode 100644 index 0000000..30773ac Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/gacha_res/武器/若水.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/gacha_res/角色/久岐忍.png b/hoshino/modules/Genshin_Paimon/res/gacha_res/角色/久岐忍.png new file mode 100644 index 0000000..b6304f1 Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/gacha_res/角色/久岐忍.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/gacha_res/角色/夜兰.png b/hoshino/modules/Genshin_Paimon/res/gacha_res/角色/夜兰.png new file mode 100644 index 0000000..3830de9 Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/gacha_res/角色/夜兰.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/name_card/10000060.png b/hoshino/modules/Genshin_Paimon/res/name_card/10000060.png new file mode 100644 index 0000000..3522218 Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/name_card/10000060.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/name_card/10000065.png b/hoshino/modules/Genshin_Paimon/res/name_card/10000065.png new file mode 100644 index 0000000..8c6f4bb Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/name_card/10000065.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/role_card/10000060.png b/hoshino/modules/Genshin_Paimon/res/role_card/10000060.png new file mode 100644 index 0000000..dc6c38c Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/role_card/10000060.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/role_card/10000065.png b/hoshino/modules/Genshin_Paimon/res/role_card/10000065.png new file mode 100644 index 0000000..c9f0ccd Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/role_card/10000065.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/role_profile/10000060.png b/hoshino/modules/Genshin_Paimon/res/role_profile/10000060.png new file mode 100644 index 0000000..151c8fc Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/role_profile/10000060.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/role_profile/10000065.png b/hoshino/modules/Genshin_Paimon/res/role_profile/10000065.png new file mode 100644 index 0000000..f78f7ba Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/role_profile/10000065.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/thumb/久岐忍.png b/hoshino/modules/Genshin_Paimon/res/thumb/久岐忍.png new file mode 100644 index 0000000..2a1f791 Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/thumb/久岐忍.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/thumb/夜兰.png b/hoshino/modules/Genshin_Paimon/res/thumb/夜兰.png new file mode 100644 index 0000000..82a8858 Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/thumb/夜兰.png differ diff --git a/hoshino/modules/Genshin_Paimon/res/thumb/若水.png b/hoshino/modules/Genshin_Paimon/res/thumb/若水.png new file mode 100644 index 0000000..ec0e435 Binary files /dev/null and b/hoshino/modules/Genshin_Paimon/res/thumb/若水.png differ