mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-08 04:55:47 +08:00
parent
146d84ec06
commit
f2f1898630
@ -9,6 +9,7 @@ from gsuid_core.utils.image.convert import convert_img
|
||||
from gsuid_core.utils.image.image_tools import draw_pic_with_ring
|
||||
|
||||
from ..utils.mys_api import mys_api
|
||||
from ..utils.error_reply import prefix
|
||||
from ..sruid_utils.api.mys.models import AbyssAvatar
|
||||
from ..utils.resource.get_pic_from import get_roleinfo_icon
|
||||
from ..utils.image.image_tools import elements, _get_event_avatar
|
||||
@ -117,7 +118,7 @@ async def draw_abyss_img(
|
||||
|
||||
# 获取查询者数据
|
||||
if raw_abyss_data.max_floor == "":
|
||||
return "你还没有挑战本期深渊!\n可以使用[sr上期深渊]命令查询上期~"
|
||||
return f"你还没有挑战本期深渊!\n可以使用[{prefix}上期深渊]命令查询上期~"
|
||||
# 过滤掉 is_fast (快速通关) 为 True 的项
|
||||
floor_detail = [
|
||||
detail
|
||||
|
@ -9,6 +9,7 @@ from gsuid_core.utils.image.convert import convert_img
|
||||
from gsuid_core.utils.image.image_tools import draw_pic_with_ring
|
||||
|
||||
from ..utils.mys_api import mys_api
|
||||
from ..utils.error_reply import prefix
|
||||
from ..sruid_utils.api.mys.models import AbyssAvatar
|
||||
from ..utils.resource.get_pic_from import get_roleinfo_icon
|
||||
from ..utils.image.image_tools import elements, _get_event_avatar
|
||||
@ -121,7 +122,7 @@ async def draw_abyss_img(
|
||||
|
||||
# 获取查询者数据
|
||||
if raw_abyss_data.max_floor == "":
|
||||
return "你还没有挑战本期末日幻影!\n可以使用[sr上期末日幻影]命令查询上期~"
|
||||
return f"你还没有挑战本期末日幻影!\n可以使用[{prefix}上期末日幻影]命令查询上期~"
|
||||
# 过滤掉 is_fast (快速通关) 为 True 的项
|
||||
floor_detail = [
|
||||
detail
|
||||
|
@ -9,6 +9,7 @@ from gsuid_core.utils.image.convert import convert_img
|
||||
from gsuid_core.utils.image.image_tools import draw_pic_with_ring
|
||||
|
||||
from ..utils.mys_api import mys_api
|
||||
from ..utils.error_reply import prefix
|
||||
from ..sruid_utils.api.mys.models import AbyssAvatar
|
||||
from ..utils.resource.get_pic_from import get_roleinfo_icon
|
||||
from ..utils.image.image_tools import elements, _get_event_avatar
|
||||
@ -136,7 +137,7 @@ async def draw_abyss_img(
|
||||
|
||||
# 获取查询者数据
|
||||
if raw_abyss_data.max_floor == "":
|
||||
return "你还没有挑战本期虚构叙事!\n可以使用[sr上期虚构叙事]命令查询上期~"
|
||||
return f"你还没有挑战本期虚构叙事!\n可以使用[{prefix}上期虚构叙事]命令查询上期~"
|
||||
# 过滤掉 is_fast (快速通关) 为 True 的项
|
||||
floor_detail = [
|
||||
detail
|
||||
|
@ -8,6 +8,7 @@ from gsuid_core.utils.image.image_tools import crop_center_img
|
||||
from starrail_damage_cal.map.SR_MAP_PATH import avatarId2Name
|
||||
from starrail_damage_cal.to_data import api_to_dict
|
||||
|
||||
from ..utils.error_reply import prefix
|
||||
from ..utils.fonts.first_world import fw_font_28
|
||||
from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_58
|
||||
from ..utils.name_covert import avatar_id_to_char_star
|
||||
@ -62,7 +63,7 @@ async def draw_enka_card(uid: str, char_list: List, showfrom: int = 0):
|
||||
return await convert_img(Image.new("RGBA", (0, 1), (255, 255, 255)))
|
||||
else:
|
||||
line1 = f"UID {uid} 刷新成功"
|
||||
line2 = f'可以使用 sr查询{char_data_list[0]["avatarName"]} 查询详情角色面板'
|
||||
line2 = f'可以使用 {prefix}查询{char_data_list[0]["avatarName"]} 查询详情角色面板'
|
||||
char_num = len(char_data_list)
|
||||
if char_num <= 4:
|
||||
based_w, based_h = 1380, 926
|
||||
|
@ -10,6 +10,7 @@ from gsuid_core.logger import logger
|
||||
from gsuid_core.utils.image.convert import convert_img
|
||||
from gsuid_core.utils.image.image_tools import get_color_bg, draw_pic_with_ring
|
||||
|
||||
from ..utils.error_reply import prefix
|
||||
from ..utils.image.image_tools import _get_event_avatar
|
||||
from ..utils.name_covert import name_to_avatar_id, name_to_weapon_id
|
||||
from ..utils.resource.RESOURCE_PATH import (
|
||||
@ -146,7 +147,7 @@ def check_up(name: str, _time: str) -> bool:
|
||||
async def draw_gachalogs_img(uid: str, ev: Event) -> Union[bytes, str]:
|
||||
path = PLAYER_PATH / str(uid) / "gacha_logs.json"
|
||||
if not path.exists():
|
||||
return "你还没有跃迁数据噢~\n请使用命令`sr导入抽卡链接`更新跃迁数据~"
|
||||
return f"你还没有跃迁数据噢~\n请使用命令`{prefix}导入抽卡链接`更新跃迁数据~"
|
||||
with Path.open(path, encoding="UTF-8") as f:
|
||||
gacha_data = json.load(f)
|
||||
|
||||
|
@ -189,5 +189,3 @@ async def save_gachalogs(
|
||||
f"角色跃迁{char_add}个\n光锥跃迁{weapon_add}个!"
|
||||
)
|
||||
return im
|
||||
return im
|
||||
return im
|
||||
|
@ -1,13 +1,13 @@
|
||||
from PIL import Image
|
||||
from gsuid_core.sv import SV
|
||||
from gsuid_core.bot import Bot
|
||||
from gsuid_core.models import Event
|
||||
from gsuid_core.logger import logger
|
||||
from gsuid_core.help.utils import register_help
|
||||
from gsuid_core.sv import SV, get_plugin_available_prefix
|
||||
|
||||
from .get_help import ICON, get_help
|
||||
from ..utils.error_reply import prefix
|
||||
|
||||
PREFIX = get_plugin_available_prefix('StarRailUID')
|
||||
sv_sr_help = SV("sr帮助")
|
||||
|
||||
|
||||
@ -17,4 +17,4 @@ async def send_help_img(bot: Bot, ev: Event):
|
||||
im = await get_help()
|
||||
await bot.send(im)
|
||||
|
||||
register_help('StarRailUID', f'{PREFIX}帮助', Image.open(ICON))
|
||||
register_help('StarRailUID', f'{prefix}帮助', Image.open(ICON))
|
||||
|
@ -1,6 +1,7 @@
|
||||
from gsuid_core.sv import SV
|
||||
from gsuid_core.bot import Bot
|
||||
from gsuid_core.models import Event
|
||||
from gsuid_core.logger import logger
|
||||
from gsuid_core.utils.database.api import get_uid
|
||||
from gsuid_core.utils.database.models import GsBind
|
||||
|
||||
|
@ -10,6 +10,7 @@ from gsuid_core.utils.image.convert import convert_img
|
||||
from gsuid_core.utils.image.image_tools import draw_pic_with_ring
|
||||
|
||||
from ..utils.mys_api import mys_api
|
||||
from ..utils.error_reply import prefix
|
||||
from ..utils.resource.get_pic_from import get_roleinfo_icon
|
||||
from ..utils.image.image_tools import elements, _get_event_avatar
|
||||
from ..utils.fonts.starrail_fonts import (
|
||||
@ -291,9 +292,9 @@ async def draw_rogue_img(
|
||||
return "你还没有挑战该模拟宇宙!"
|
||||
elif schedule_type == "3":
|
||||
if raw_rogue_data.current_record.basic.finish_cnt == 0:
|
||||
return "你还没有挑战本期模拟宇宙!\n可以使用[sr上期模拟宇宙]命令查询上期~"
|
||||
return f"你还没有挑战本期模拟宇宙!\n可以使用[{prefix}上期模拟宇宙]命令查询上期~"
|
||||
elif raw_rogue_data.last_record.basic.finish_cnt == 0:
|
||||
return "你还没有挑战上期模拟宇宙!\n可以使用[sr模拟宇宙]命令查询本期~"
|
||||
return f"你还没有挑战上期模拟宇宙!\n可以使用[{prefix}模拟宇宙]命令查询本期~"
|
||||
|
||||
# 获取背景图片各项参数
|
||||
based_w = 900
|
||||
|
@ -21,7 +21,7 @@ async def send_role_info(bot: Bot, ev: Event):
|
||||
|
||||
uid = await get_uid(bot, ev, GsBind, "sr")
|
||||
if uid is None:
|
||||
return "你还没有绑定UID噢,请使用[sr绑定uid123]完成绑定!"
|
||||
return await bot.send(UID_HINT)
|
||||
|
||||
logger.info(f"[sr查询信息]UID: {uid}")
|
||||
logger.info("开始执行[sr查询信息]")
|
||||
|
@ -7,9 +7,10 @@ from gsuid_core.utils.database.models import GsUser
|
||||
from ..sruid_utils.api.mys.models import DailyNoteData
|
||||
from ..starrailuid_config.sr_config import srconfig
|
||||
from ..utils.database.model import SrPush
|
||||
from..utils.error_reply import prefix
|
||||
from ..utils.mys_api import mys_api
|
||||
|
||||
MR_NOTICE = "\n可发送[srmr]或者[sr每日]来查看更多信息!\n"
|
||||
MR_NOTICE = f"\n可发送[{prefix}mr]或者[{prefix}每日]来查看更多信息!\n"
|
||||
|
||||
NOTICE = {
|
||||
"stamina": f"你的开拓力已达提醒阈值!{MR_NOTICE}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user