diff --git a/LittlePaimon/plugins/Genshin_Voice/__init__.py b/LittlePaimon/plugins/Genshin_Voice/__init__.py index 9c7391d..be25b29 100644 --- a/LittlePaimon/plugins/Genshin_Voice/__init__.py +++ b/LittlePaimon/plugins/Genshin_Voice/__init__.py @@ -62,7 +62,7 @@ async def _(event: GroupMessageEvent, msg: Message = CommandArg(), lang=CommandL else: game = GuessVoice(event.group_id, pm.config.guess_voice_time, lang) result = await game.start() - await guess_voice.send('即将发送一段语音,将在30秒后公布答案') + await guess_voice.send(f'即将发送一段语音,将在{pm.config.guess_voice_time}秒后公布答案') try: await guess_voice.finish(result) except ActionFailed: diff --git a/LittlePaimon/plugins/Paimon_Wiki/draw_map.py b/LittlePaimon/plugins/Paimon_Wiki/draw_map.py index 1862a11..632686b 100644 --- a/LittlePaimon/plugins/Paimon_Wiki/draw_map.py +++ b/LittlePaimon/plugins/Paimon_Wiki/draw_map.py @@ -24,16 +24,17 @@ map_name_reverse = { } -async def init_map(refresh: bool = False): +async def init_map(): """ 初始化地图 - :param refresh: 是否刷新 """ for map_id in models.MapID: save_path = RESOURCE_BASE_PATH / 'genshin_map' / 'results' / f'{map_id.name}.png' save_path.parent.mkdir(parents=True, exist_ok=True) - if map_id.name == 'golden_apple_archipelago' or (save_path.exists() and not refresh): + if map_id.name == 'golden_apple_archipelago': continue + if save_path.exists(): + save_path.unlink() status_icon = await load_image(RESOURCE_BASE_PATH / 'genshin_map' / 'status_icon.png') anchor_icon = await load_image(RESOURCE_BASE_PATH / 'genshin_map' / 'anchor_icon.png') maps = await request.get_maps(map_id) @@ -46,7 +47,7 @@ async def init_map(refresh: bool = False): for point in anchor_points: map_img.paste(anchor_icon, (int(point.x) - 32, int(point.y) - 64), anchor_icon) map_img.save(save_path) - logger.info('原神地图', f'{map_name[map_id.name]}地图初始化完成') + logger.info('原神地图', f'{map_name[map_id.name]}地图生成完成') return f'地图资源生成完成,目前有{"、".join(list(map_name_reverse.keys()))}地图。'