mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-07 20:45:46 +08:00
🚨 pre-commit-ci
修复格式错误
This commit is contained in:
parent
b310ee2a7b
commit
ecfc672838
@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Dict, List, TypedDict, Union
|
from typing import Any, Dict, List, Union, TypedDict
|
||||||
|
|
||||||
################
|
################
|
||||||
# 抽卡记录相关 #
|
# 抽卡记录相关 #
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
|
||||||
from gsuid_core.utils.error_reply import UID_HINT
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional, Union
|
from typing import Union, Optional
|
||||||
|
|
||||||
|
from PIL import Image, ImageDraw
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.utils.error_reply import get_error
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.image.image_tools import (
|
from gsuid_core.utils.image.image_tools import (
|
||||||
draw_pic_with_ring,
|
|
||||||
get_qq_avatar,
|
get_qq_avatar,
|
||||||
|
draw_pic_with_ring,
|
||||||
)
|
)
|
||||||
from PIL import Image, ImageDraw
|
|
||||||
|
|
||||||
from ..sruid_utils.api.mys.models import AbyssAvatar
|
from .utils import get_icon
|
||||||
from ..utils.convert import GsCookie
|
from ..utils.convert import GsCookie
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
|
from ..sruid_utils.api.mys.models import AbyssAvatar
|
||||||
from ..utils.fonts.starrail_fonts import (
|
from ..utils.fonts.starrail_fonts import (
|
||||||
sr_font_22,
|
sr_font_22,
|
||||||
sr_font_28,
|
sr_font_28,
|
||||||
@ -18,8 +20,6 @@ from ..utils.fonts.starrail_fonts import (
|
|||||||
sr_font_34,
|
sr_font_34,
|
||||||
sr_font_42,
|
sr_font_42,
|
||||||
)
|
)
|
||||||
from ..utils.image.convert import convert_img
|
|
||||||
from .utils import get_icon
|
|
||||||
|
|
||||||
abyss_list = {
|
abyss_list = {
|
||||||
'1': '琥珀恩赐其一',
|
'1': '琥珀恩赐其一',
|
||||||
|
@ -2,9 +2,9 @@ from io import BytesIO
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TypeVar
|
from typing import TypeVar
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession
|
||||||
from gsuid_core.data_store import get_res_path
|
from gsuid_core.data_store import get_res_path
|
||||||
from PIL import Image
|
|
||||||
|
|
||||||
T = TypeVar('T')
|
T = TypeVar('T')
|
||||||
|
|
||||||
|
@ -2,19 +2,19 @@ import re
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Tuple, cast
|
from typing import Tuple, cast
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
|
||||||
from PIL import Image
|
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.image.convert import convert_img
|
|
||||||
from ..utils.resource.RESOURCE_PATH import TEMP_PATH
|
|
||||||
from ..utils.sr_prefix import PREFIX
|
|
||||||
from .draw_char_img import cal, get_char_data
|
|
||||||
from .get_char_img import draw_char_info_img
|
|
||||||
from .to_card import api_to_card
|
from .to_card import api_to_card
|
||||||
|
from ..utils.convert import get_uid
|
||||||
|
from ..utils.sr_prefix import PREFIX
|
||||||
|
from ..utils.error_reply import UID_HINT
|
||||||
|
from .get_char_img import draw_char_info_img
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
|
from .draw_char_img import cal, get_char_data
|
||||||
|
from ..utils.resource.RESOURCE_PATH import TEMP_PATH
|
||||||
|
|
||||||
sv_char_info_config = SV('sr面板设置', pm=2)
|
sv_char_info_config = SV('sr面板设置', pm=2)
|
||||||
sv_get_char_info = SV('sr面板查询', priority=10)
|
sv_get_char_info = SV('sr面板查询', priority=10)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ..utils.excel.model import RelicMainAffixConfig, RelicSubAffixConfig
|
|
||||||
from ..utils.map.SR_MAP_PATH import RelicId2MainAffixGroup
|
from ..utils.map.SR_MAP_PATH import RelicId2MainAffixGroup
|
||||||
|
from ..utils.excel.model import RelicSubAffixConfig, RelicMainAffixConfig
|
||||||
|
|
||||||
|
|
||||||
async def cal_relic_main_affix(
|
async def cal_relic_main_affix(
|
||||||
|
@ -4,14 +4,30 @@ import textwrap
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Union
|
from typing import Dict, Union
|
||||||
|
|
||||||
|
from PIL import Image, ImageDraw
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.utils.image.convert import convert_img
|
from gsuid_core.utils.image.convert import convert_img
|
||||||
from gsuid_core.utils.image.image_tools import draw_text_by_line
|
from gsuid_core.utils.image.image_tools import draw_text_by_line
|
||||||
from PIL import Image, ImageDraw
|
|
||||||
|
|
||||||
|
from .to_data import api_to_dict
|
||||||
from ..utils.error_reply import CHAR_HINT
|
from ..utils.error_reply import CHAR_HINT
|
||||||
from ..utils.excel.read_excel import light_cone_ranks
|
from .cal_damage import cal, cal_char_info
|
||||||
from ..utils.fonts.first_world import fw_font_28
|
from ..utils.fonts.first_world import fw_font_28
|
||||||
|
from ..utils.excel.read_excel import light_cone_ranks
|
||||||
|
from ..utils.map.name_covert import name_to_avatar_id, alias_to_char_name
|
||||||
|
from ..utils.map.SR_MAP_PATH import (
|
||||||
|
RelicId2Rarity,
|
||||||
|
AvatarRelicScore,
|
||||||
|
avatarId2Name,
|
||||||
|
avatarId2DamageType,
|
||||||
|
)
|
||||||
|
from ..utils.resource.RESOURCE_PATH import (
|
||||||
|
RELIC_PATH,
|
||||||
|
SKILL_PATH,
|
||||||
|
PLAYER_PATH,
|
||||||
|
WEAPON_PATH,
|
||||||
|
CHAR_PORTRAIT_PATH,
|
||||||
|
)
|
||||||
from ..utils.fonts.starrail_fonts import (
|
from ..utils.fonts.starrail_fonts import (
|
||||||
sr_font_18,
|
sr_font_18,
|
||||||
sr_font_20,
|
sr_font_20,
|
||||||
@ -22,22 +38,6 @@ from ..utils.fonts.starrail_fonts import (
|
|||||||
sr_font_34,
|
sr_font_34,
|
||||||
sr_font_38,
|
sr_font_38,
|
||||||
)
|
)
|
||||||
from ..utils.map.name_covert import alias_to_char_name, name_to_avatar_id
|
|
||||||
from ..utils.map.SR_MAP_PATH import (
|
|
||||||
AvatarRelicScore,
|
|
||||||
RelicId2Rarity,
|
|
||||||
avatarId2DamageType,
|
|
||||||
avatarId2Name,
|
|
||||||
)
|
|
||||||
from ..utils.resource.RESOURCE_PATH import (
|
|
||||||
CHAR_PORTRAIT_PATH,
|
|
||||||
PLAYER_PATH,
|
|
||||||
RELIC_PATH,
|
|
||||||
SKILL_PATH,
|
|
||||||
WEAPON_PATH,
|
|
||||||
)
|
|
||||||
from .cal_damage import cal, cal_char_info
|
|
||||||
from .to_data import api_to_dict
|
|
||||||
|
|
||||||
Excel_path = Path(__file__).parent / 'effect'
|
Excel_path = Path(__file__).parent / 'effect'
|
||||||
with Path.open(Excel_path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
with Path.open(Excel_path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||||
|
@ -3,7 +3,7 @@ from typing import Dict, List
|
|||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..Base.AvatarBase import BaseAvatar, BaseAvatarBuff
|
from ..Base.AvatarBase import BaseAvatar, BaseAvatarBuff
|
||||||
from ..Base.model import DamageInstanceAvatar, DamageInstanceSkill
|
from ..Base.model import DamageInstanceSkill, DamageInstanceAvatar
|
||||||
|
|
||||||
|
|
||||||
class Seele(BaseAvatar):
|
class Seele(BaseAvatar):
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import json
|
import json
|
||||||
from abc import abstractmethod
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from abc import abstractmethod
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
import msgspec
|
import msgspec
|
||||||
from msgspec import Struct
|
from msgspec import Struct
|
||||||
|
|
||||||
from ....utils.excel.model import AvatarPromotionConfig
|
|
||||||
from .model import DamageInstanceAvatar, DamageInstanceSkill
|
|
||||||
from .SkillBase import BaseSkills
|
from .SkillBase import BaseSkills
|
||||||
|
from ....utils.excel.model import AvatarPromotionConfig
|
||||||
|
from .model import DamageInstanceSkill, DamageInstanceAvatar
|
||||||
|
|
||||||
path = Path(__file__).parent.parent
|
path = Path(__file__).parent.parent
|
||||||
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from abc import abstractmethod
|
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
from abc import abstractmethod
|
||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ....utils.map.SR_MAP_PATH import RelicSetSkill
|
|
||||||
from .model import DamageInstanceRelic
|
from .model import DamageInstanceRelic
|
||||||
|
from ....utils.map.SR_MAP_PATH import RelicSetSkill
|
||||||
|
|
||||||
|
|
||||||
class SingleRelic:
|
class SingleRelic:
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import json
|
import json
|
||||||
from pathlib import Path
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from .model import DamageInstanceAvatar, DamageInstanceSkill
|
from .model import DamageInstanceSkill, DamageInstanceAvatar
|
||||||
|
|
||||||
path = Path(__file__).parent.parent
|
path = Path(__file__).parent.parent
|
||||||
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
from abc import abstractmethod
|
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
from abc import abstractmethod
|
||||||
|
|
||||||
from msgspec import Struct
|
from msgspec import Struct
|
||||||
|
|
||||||
|
from .model import DamageInstanceWeapon
|
||||||
from ....utils.excel.model import EquipmentPromotionConfig
|
from ....utils.excel.model import EquipmentPromotionConfig
|
||||||
from ....utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty
|
from ....utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty
|
||||||
from .model import DamageInstanceWeapon
|
|
||||||
|
|
||||||
|
|
||||||
class BaseWeaponAttribute(Struct):
|
class BaseWeaponAttribute(Struct):
|
||||||
|
@ -3,9 +3,9 @@ from typing import Dict, List, Union
|
|||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..Base.model import DamageInstanceRelic
|
|
||||||
from ..Base.RelicBase import BaseRelicSetSkill, SingleRelic
|
|
||||||
from ..utils import merge_attribute
|
from ..utils import merge_attribute
|
||||||
|
from ..Base.model import DamageInstanceRelic
|
||||||
|
from ..Base.RelicBase import SingleRelic, BaseRelicSetSkill
|
||||||
|
|
||||||
|
|
||||||
class Relic101(BaseRelicSetSkill):
|
class Relic101(BaseRelicSetSkill):
|
||||||
|
@ -2,12 +2,12 @@ from typing import List, Union
|
|||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..mono.Character import Character
|
|
||||||
from .Avatar.Avatar import Avatar
|
from .Avatar.Avatar import Avatar
|
||||||
|
from .Weapon.Weapon import Weapon
|
||||||
|
from .utils import merge_attribute
|
||||||
|
from ..mono.Character import Character
|
||||||
from .Base.model import DamageInstance
|
from .Base.model import DamageInstance
|
||||||
from .Relic.Relic import RelicSet, SingleRelic
|
from .Relic.Relic import RelicSet, SingleRelic
|
||||||
from .utils import merge_attribute
|
|
||||||
from .Weapon.Weapon import Weapon
|
|
||||||
|
|
||||||
|
|
||||||
class RoleInstance:
|
class RoleInstance:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import json
|
import json
|
||||||
from pathlib import Path
|
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from ..Base.model import DamageInstanceWeapon
|
|
||||||
from ..Base.WeaponBase import BaseWeapon
|
from ..Base.WeaponBase import BaseWeapon
|
||||||
|
from ..Base.model import DamageInstanceWeapon
|
||||||
|
|
||||||
path = Path(__file__).parent.parent
|
path = Path(__file__).parent.parent
|
||||||
with Path.open(path / 'Excel' / 'weapon_effect.json', encoding='utf-8') as f:
|
with Path.open(path / 'Excel' / 'weapon_effect.json', encoding='utf-8') as f:
|
||||||
@ -1673,11 +1673,9 @@ class Thisbodyisasword(BaseWeapon):
|
|||||||
attribute_bonus[
|
attribute_bonus[
|
||||||
'AllResistancePenetration'
|
'AllResistancePenetration'
|
||||||
] = resistance_penetration + (
|
] = resistance_penetration + (
|
||||||
|
weapon_effect['23014']['Param']['ResistancePenetration'][
|
||||||
weapon_effect['23014']['Param']['ResistancePenetration'][
|
self.weapon_rank - 1
|
||||||
self.weapon_rank - 1
|
]
|
||||||
]
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return attribute_bonus
|
return attribute_bonus
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
import json
|
|
||||||
import re
|
import re
|
||||||
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Optional, Tuple, Union
|
from typing import Dict, Tuple, Union, Optional
|
||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
|
from .to_data import api_to_dict
|
||||||
|
from .draw_char_img import draw_char_img
|
||||||
from ..utils.error_reply import CHAR_HINT
|
from ..utils.error_reply import CHAR_HINT
|
||||||
|
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||||
from ..utils.excel.model import EquipmentPromotionConfig
|
from ..utils.excel.model import EquipmentPromotionConfig
|
||||||
from ..utils.map.name_covert import (
|
from ..utils.map.name_covert import (
|
||||||
alias_to_char_name,
|
|
||||||
name_to_avatar_id,
|
name_to_avatar_id,
|
||||||
name_to_weapon_id,
|
name_to_weapon_id,
|
||||||
|
alias_to_char_name,
|
||||||
)
|
)
|
||||||
from ..utils.map.SR_MAP_PATH import (
|
from ..utils.map.SR_MAP_PATH import (
|
||||||
EquipmentID2Name,
|
EquipmentID2Name,
|
||||||
EquipmentID2Rarity,
|
EquipmentID2Rarity,
|
||||||
avatarId2DamageType,
|
|
||||||
avatarId2EnName,
|
|
||||||
avatarId2Name,
|
|
||||||
rankId2Name,
|
rankId2Name,
|
||||||
|
avatarId2Name,
|
||||||
|
avatarId2EnName,
|
||||||
|
avatarId2DamageType,
|
||||||
)
|
)
|
||||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
|
||||||
from .draw_char_img import draw_char_img
|
|
||||||
from .to_data import api_to_dict
|
|
||||||
|
|
||||||
WEAPON_TO_INT = {
|
WEAPON_TO_INT = {
|
||||||
'一': 1,
|
'一': 1,
|
||||||
@ -210,7 +210,7 @@ async def get_fake_char_data(
|
|||||||
char_data['avatarPromotion'] = original_data['avatarPromotion']
|
char_data['avatarPromotion'] = original_data['avatarPromotion']
|
||||||
char_data['avatarName'] = fake_name
|
char_data['avatarName'] = fake_name
|
||||||
char_data['avatarId'] = await name_to_avatar_id(fake_name)
|
char_data['avatarId'] = await name_to_avatar_id(fake_name)
|
||||||
en_name: str = avatarId2EnName(char_data['avatarId']) # type: ignore
|
en_name: str = avatarId2EnName(char_data['avatarId']) # type: ignore
|
||||||
char_data['avatarEnName'] = en_name
|
char_data['avatarEnName'] = en_name
|
||||||
if str(char_data['avatarId']) in avatarId2DamageType:
|
if str(char_data['avatarId']) in avatarId2DamageType:
|
||||||
char_data['avatarElement'] = avatarId2DamageType[
|
char_data['avatarElement'] = avatarId2DamageType[
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import json
|
import json
|
||||||
from collections import Counter
|
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
|
from collections import Counter
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
from ...utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty, RelicSetSkill
|
from ...utils.map.SR_MAP_PATH import RelicSetSkill, EquipmentID2AbilityProperty
|
||||||
|
|
||||||
|
|
||||||
class Character:
|
class Character:
|
||||||
|
@ -4,13 +4,13 @@ from typing import Dict, List, Union
|
|||||||
|
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
|
||||||
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.image.convert import convert_img
|
|
||||||
from ..utils.map.name_covert import avatar_id_to_char_star
|
|
||||||
from ..utils.map.SR_MAP_PATH import avatarId2Name
|
|
||||||
from ..utils.resource.RESOURCE_PATH import CHAR_ICON_PATH, CHAR_PREVIEW_PATH
|
|
||||||
from .to_data import api_to_dict
|
from .to_data import api_to_dict
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
|
from ..utils.fonts.first_world import fw_font_28
|
||||||
|
from ..utils.map.SR_MAP_PATH import avatarId2Name
|
||||||
|
from ..utils.map.name_covert import avatar_id_to_char_star
|
||||||
|
from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_58
|
||||||
|
from ..utils.resource.RESOURCE_PATH import CHAR_ICON_PATH, CHAR_PREVIEW_PATH
|
||||||
|
|
||||||
half_color = (255, 255, 255, 120)
|
half_color = (255, 255, 255, 120)
|
||||||
first_color = (29, 29, 29)
|
first_color = (29, 29, 29)
|
||||||
|
@ -1,34 +1,34 @@
|
|||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Optional, Union
|
from typing import Dict, List, Union, Optional
|
||||||
|
|
||||||
from httpx import ReadTimeout
|
from httpx import ReadTimeout
|
||||||
|
|
||||||
|
from ..utils.error_reply import UID_HINT
|
||||||
from ..sruid_utils.api.mihomo import MihomoData
|
from ..sruid_utils.api.mihomo import MihomoData
|
||||||
from ..sruid_utils.api.mihomo.models import Avatar
|
from ..sruid_utils.api.mihomo.models import Avatar
|
||||||
|
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||||
from ..sruid_utils.api.mihomo.requests import get_char_card_info
|
from ..sruid_utils.api.mihomo.requests import get_char_card_info
|
||||||
from ..utils.error_reply import UID_HINT
|
from .cal_value import cal_relic_sub_affix, cal_relic_main_affix
|
||||||
from ..utils.excel.model import AvatarPromotionConfig, EquipmentPromotionConfig
|
from ..utils.excel.model import AvatarPromotionConfig, EquipmentPromotionConfig
|
||||||
from ..utils.map.SR_MAP_PATH import (
|
from ..utils.map.SR_MAP_PATH import (
|
||||||
AvatarRankSkillUp,
|
SetId2Name,
|
||||||
EquipmentID2Name,
|
|
||||||
EquipmentID2Rarity,
|
|
||||||
ItemId2Name,
|
ItemId2Name,
|
||||||
Property2Name,
|
Property2Name,
|
||||||
RelicId2SetId,
|
RelicId2SetId,
|
||||||
SetId2Name,
|
EquipmentID2Name,
|
||||||
avatarId2DamageType,
|
AvatarRankSkillUp,
|
||||||
avatarId2EnName,
|
EquipmentID2Rarity,
|
||||||
|
rankId2Name,
|
||||||
|
skillId2Name,
|
||||||
avatarId2Name,
|
avatarId2Name,
|
||||||
|
skillId2Effect,
|
||||||
|
avatarId2EnName,
|
||||||
avatarId2Rarity,
|
avatarId2Rarity,
|
||||||
characterSkillTree,
|
characterSkillTree,
|
||||||
rankId2Name,
|
|
||||||
skillId2AttackType,
|
skillId2AttackType,
|
||||||
skillId2Effect,
|
avatarId2DamageType,
|
||||||
skillId2Name,
|
|
||||||
)
|
)
|
||||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
|
||||||
from .cal_value import cal_relic_main_affix, cal_relic_sub_affix
|
|
||||||
|
|
||||||
|
|
||||||
async def api_to_dict(
|
async def api_to_dict(
|
||||||
|
@ -2,9 +2,9 @@ from typing import Dict
|
|||||||
|
|
||||||
from gsuid_core.utils.plugins_config.models import (
|
from gsuid_core.utils.plugins_config.models import (
|
||||||
GSC,
|
GSC,
|
||||||
|
GsStrConfig,
|
||||||
GsBoolConfig,
|
GsBoolConfig,
|
||||||
GsListStrConfig,
|
GsListStrConfig,
|
||||||
GsStrConfig,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
CONIFG_DEFAULT: Dict[str, GSC] = {
|
CONIFG_DEFAULT: Dict[str, GSC] = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from gsuid_core.utils.plugins_config.gs_config import StringConfig
|
from gsuid_core.utils.plugins_config.gs_config import StringConfig
|
||||||
|
|
||||||
from ..utils.resource.RESOURCE_PATH import CONFIG_PATH
|
|
||||||
from .config_default import CONIFG_DEFAULT
|
from .config_default import CONIFG_DEFAULT
|
||||||
|
from ..utils.resource.RESOURCE_PATH import CONFIG_PATH
|
||||||
|
|
||||||
srconfig = StringConfig('StarRailUID', CONFIG_PATH, CONIFG_DEFAULT)
|
srconfig = StringConfig('StarRailUID', CONFIG_PATH, CONIFG_DEFAULT)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.sr_prefix import PREFIX
|
from ..utils.sr_prefix import PREFIX
|
||||||
from .draw_gachalogs import draw_gachalogs_img
|
from ..utils.error_reply import UID_HINT
|
||||||
from .get_gachalogs import save_gachalogs
|
from .get_gachalogs import save_gachalogs
|
||||||
|
from .draw_gachalogs import draw_gachalogs_img
|
||||||
|
|
||||||
sv_gacha_log = SV('sr抽卡记录')
|
sv_gacha_log = SV('sr抽卡记录')
|
||||||
sv_get_gachalog_by_link = SV('sr导入抽卡链接', area='DIRECT')
|
sv_get_gachalog_by_link = SV('sr导入抽卡链接', area='DIRECT')
|
||||||
|
@ -1,17 +1,24 @@
|
|||||||
|
import json
|
||||||
import asyncio
|
import asyncio
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Tuple, Union
|
from typing import List, Tuple, Union
|
||||||
|
|
||||||
|
from PIL import Image, ImageDraw
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.utils.image.image_tools import (
|
from gsuid_core.utils.image.image_tools import (
|
||||||
draw_pic_with_ring,
|
|
||||||
get_color_bg,
|
get_color_bg,
|
||||||
get_qq_avatar,
|
get_qq_avatar,
|
||||||
|
draw_pic_with_ring,
|
||||||
)
|
)
|
||||||
from PIL import Image, ImageDraw
|
|
||||||
|
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
|
from ..utils.map.name_covert import name_to_avatar_id, name_to_weapon_id
|
||||||
|
from ..utils.resource.RESOURCE_PATH import (
|
||||||
|
PLAYER_PATH,
|
||||||
|
WEAPON_PATH,
|
||||||
|
CHAR_ICON_PATH,
|
||||||
|
)
|
||||||
from ..utils.fonts.starrail_fonts import (
|
from ..utils.fonts.starrail_fonts import (
|
||||||
sr_font_20,
|
sr_font_20,
|
||||||
sr_font_24,
|
sr_font_24,
|
||||||
@ -19,13 +26,6 @@ from ..utils.fonts.starrail_fonts import (
|
|||||||
sr_font_38,
|
sr_font_38,
|
||||||
sr_font_40,
|
sr_font_40,
|
||||||
)
|
)
|
||||||
from ..utils.image.convert import convert_img
|
|
||||||
from ..utils.map.name_covert import name_to_avatar_id, name_to_weapon_id
|
|
||||||
from ..utils.resource.RESOURCE_PATH import (
|
|
||||||
CHAR_ICON_PATH,
|
|
||||||
PLAYER_PATH,
|
|
||||||
WEAPON_PATH,
|
|
||||||
)
|
|
||||||
|
|
||||||
TEXT_PATH = Path(__file__).parent / 'texture2d'
|
TEXT_PATH = Path(__file__).parent / 'texture2d'
|
||||||
EMO_PATH = Path(__file__).parent / 'texture2d' / 'emo'
|
EMO_PATH = Path(__file__).parent / 'texture2d' / 'emo'
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import asyncio
|
|
||||||
import json
|
import json
|
||||||
from datetime import datetime
|
import asyncio
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Optional
|
|
||||||
from urllib import parse
|
from urllib import parse
|
||||||
|
from datetime import datetime
|
||||||
|
from typing import Dict, Optional
|
||||||
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from gsuid_core.bot import Bot
|
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from gsuid_core.models import Event
|
|
||||||
from gsuid_core.sv import SV
|
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 ..utils.sr_prefix import PREFIX
|
|
||||||
from .get_help import get_core_help
|
from .get_help import get_core_help
|
||||||
|
from ..utils.sr_prefix import PREFIX
|
||||||
|
|
||||||
sv_sr_help = SV('sr帮助')
|
sv_sr_help = SV('sr帮助')
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Optional, Union
|
from typing import Dict, Union, Optional
|
||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
from gsuid_core.help.draw_plugin_help import get_help
|
|
||||||
from gsuid_core.help.model import PluginHelp
|
|
||||||
from msgspec import json as msgjson
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
from msgspec import json as msgjson
|
||||||
|
from gsuid_core.help.model import PluginHelp
|
||||||
|
from gsuid_core.help.draw_plugin_help import get_help
|
||||||
|
|
||||||
from ..utils.fonts.starrail_fonts import starrail_font_origin
|
|
||||||
from ..version import StarRail_version
|
from ..version import StarRail_version
|
||||||
|
from ..utils.fonts.starrail_fonts import starrail_font_origin
|
||||||
|
|
||||||
TEXT_PATH = Path(__file__).parent / 'texture2d'
|
TEXT_PATH = Path(__file__).parent / 'texture2d'
|
||||||
HELP_DATA = Path(__file__).parent / 'Help.json'
|
HELP_DATA = Path(__file__).parent / 'Help.json'
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
|
||||||
|
|
||||||
|
from .note_text import award
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.sr_prefix import PREFIX
|
from ..utils.sr_prefix import PREFIX
|
||||||
|
from ..utils.error_reply import UID_HINT
|
||||||
from .draw_note_card import draw_note_img
|
from .draw_note_card import draw_note_img
|
||||||
from .note_text import award
|
|
||||||
|
|
||||||
sv_get_monthly_data = SV('sr查询月历')
|
sv_get_monthly_data = SV('sr查询月历')
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.fonts.starrail_fonts import sr_font_20, sr_font_28, sr_font_34
|
|
||||||
from ..utils.image.convert import convert_img
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
|
from ..utils.error_reply import get_error
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||||
|
from ..utils.fonts.starrail_fonts import sr_font_20, sr_font_28, sr_font_34
|
||||||
|
|
||||||
TEXT_PATH = Path(__file__).parent / 'texture2d'
|
TEXT_PATH = Path(__file__).parent / 'texture2d'
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
|
from ..utils.error_reply import get_error
|
||||||
|
|
||||||
month_im = '''==============
|
month_im = '''==============
|
||||||
SR_UID:{}
|
SR_UID:{}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from gsuid_core.bot import Bot
|
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from gsuid_core.models import Event
|
|
||||||
from gsuid_core.sv import SV
|
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 ..utils.resource.download_all_resource import download_all_resource
|
|
||||||
from ..utils.sr_prefix import PREFIX
|
from ..utils.sr_prefix import PREFIX
|
||||||
|
from ..utils.resource.download_all_resource import download_all_resource
|
||||||
|
|
||||||
sv_sr_download_config = SV('sr下载资源', pm=1)
|
sv_sr_download_config = SV('sr下载资源', pm=1)
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
|
||||||
from gsuid_core.utils.error_reply import UID_HINT
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
import math
|
import math
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional, Union
|
from typing import List, Union, Optional
|
||||||
|
|
||||||
|
from PIL import Image, ImageDraw
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.utils.error_reply import get_error
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.image.image_tools import (
|
from gsuid_core.utils.image.image_tools import (
|
||||||
draw_pic_with_ring,
|
|
||||||
get_qq_avatar,
|
get_qq_avatar,
|
||||||
|
draw_pic_with_ring,
|
||||||
)
|
)
|
||||||
from PIL import Image, ImageDraw
|
|
||||||
|
|
||||||
from ..sruid_utils.api.mys.models import (
|
from .utils import get_icon
|
||||||
LocustBlocks,
|
|
||||||
RogueAvatar,
|
|
||||||
RogueBuffitems,
|
|
||||||
RogueMiracles,
|
|
||||||
)
|
|
||||||
from ..utils.convert import GsCookie
|
from ..utils.convert import GsCookie
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
from ..utils.fonts.starrail_fonts import (
|
from ..utils.fonts.starrail_fonts import (
|
||||||
sr_font_22,
|
sr_font_22,
|
||||||
sr_font_28,
|
sr_font_28,
|
||||||
sr_font_34,
|
sr_font_34,
|
||||||
sr_font_42,
|
sr_font_42,
|
||||||
)
|
)
|
||||||
from ..utils.image.convert import convert_img
|
from ..sruid_utils.api.mys.models import (
|
||||||
from .utils import get_icon
|
RogueAvatar,
|
||||||
|
LocustBlocks,
|
||||||
|
RogueMiracles,
|
||||||
|
RogueBuffitems,
|
||||||
|
)
|
||||||
|
|
||||||
TEXT_PATH = Path(__file__).parent / 'texture2D'
|
TEXT_PATH = Path(__file__).parent / 'texture2D'
|
||||||
white_color = (255, 255, 255)
|
white_color = (255, 255, 255)
|
||||||
|
@ -2,9 +2,9 @@ from io import BytesIO
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TypeVar
|
from typing import TypeVar
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession
|
||||||
from gsuid_core.data_store import get_res_path
|
from gsuid_core.data_store import get_res_path
|
||||||
from PIL import Image
|
|
||||||
|
|
||||||
T = TypeVar('T')
|
T = TypeVar('T')
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from gsuid_core.bot import Bot
|
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from gsuid_core.models import Event
|
|
||||||
from gsuid_core.sv import SV
|
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 ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.sr_prefix import PREFIX
|
from ..utils.sr_prefix import PREFIX
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Optional, Union
|
from typing import Dict, List, Union, Optional
|
||||||
|
|
||||||
from gsuid_core.utils.error_reply import get_error
|
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
|
|
||||||
from ..sruid_utils.api.mys.models import AvatarListItem, RoleBasicInfo, Stats
|
|
||||||
from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_36
|
|
||||||
from ..utils.image.convert import convert_img
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
from .utils import get_icon, wrap_list
|
from .utils import get_icon, wrap_list
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
|
from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_36
|
||||||
|
from ..sruid_utils.api.mys.models import Stats, RoleBasicInfo, AvatarListItem
|
||||||
|
|
||||||
TEXT_PATH = Path(__file__).parent / 'texture2D'
|
TEXT_PATH = Path(__file__).parent / 'texture2D'
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Generator, List, TypeVar
|
from typing import List, TypeVar, Generator
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession
|
||||||
from gsuid_core.data_store import get_res_path
|
from gsuid_core.data_store import get_res_path
|
||||||
from PIL import Image
|
|
||||||
|
|
||||||
T = TypeVar('T')
|
T = TypeVar('T')
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import asyncio
|
|
||||||
import random
|
import random
|
||||||
|
import asyncio
|
||||||
|
|
||||||
from gsuid_core.aps import scheduler
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.gss import gss
|
from gsuid_core.gss import gss
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
from gsuid_core.aps import scheduler
|
||||||
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..starrailuid_config.sr_config import srconfig
|
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.sr_prefix import PREFIX
|
from ..utils.sr_prefix import PREFIX
|
||||||
from .sign import daily_sign, sign_in
|
from .sign import sign_in, daily_sign
|
||||||
|
from ..utils.error_reply import UID_HINT
|
||||||
|
from ..starrailuid_config.sr_config import srconfig
|
||||||
|
|
||||||
SIGN_TIME = srconfig.get_config('SignTime').data
|
SIGN_TIME = srconfig.get_config('SignTime').data
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import asyncio
|
|
||||||
import random
|
import random
|
||||||
|
import asyncio
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from gsuid_core.gss import gss
|
from gsuid_core.gss import gss
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.utils.plugins_config.gs_config import core_plugins_config
|
from gsuid_core.utils.plugins_config.gs_config import core_plugins_config
|
||||||
|
|
||||||
from ..starrailuid_config.sr_config import srconfig
|
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
|
from ..starrailuid_config.sr_config import srconfig
|
||||||
|
|
||||||
private_msg_list = {}
|
private_msg_list = {}
|
||||||
group_msg_list = {}
|
group_msg_list = {}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from gsuid_core.aps import scheduler
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.gss import gss
|
from gsuid_core.gss import gss
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
|
from gsuid_core.aps import scheduler
|
||||||
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.segment import MessageSegment
|
from gsuid_core.segment import MessageSegment
|
||||||
from gsuid_core.sv import SV
|
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.sr_prefix import PREFIX
|
|
||||||
from .draw_stamina_card import get_stamina_img
|
|
||||||
from .notice import get_notice_list
|
from .notice import get_notice_list
|
||||||
|
from ..utils.sr_prefix import PREFIX
|
||||||
|
from ..utils.error_reply import UID_HINT
|
||||||
from .stamina_text import get_stamina_text
|
from .stamina_text import get_stamina_text
|
||||||
|
from .draw_stamina_card import get_stamina_img
|
||||||
|
|
||||||
sv_get_stamina = SV('sr查询体力')
|
sv_get_stamina = SV('sr查询体力')
|
||||||
sv_get_stamina_admin = SV('sr强制推送', pm=1)
|
sv_get_stamina_admin = SV('sr强制推送', pm=1)
|
||||||
|
@ -4,12 +4,15 @@ from pathlib import Path
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
|
from ..utils.api import get_sqla
|
||||||
|
from ..utils.mys_api import mys_api
|
||||||
|
from ..utils.image.convert import convert_img
|
||||||
from ..sruid_utils.api.mys.models import Expedition
|
from ..sruid_utils.api.mys.models import Expedition
|
||||||
from ..starrailuid_config.sr_config import srconfig
|
from ..starrailuid_config.sr_config import srconfig
|
||||||
from ..utils.api import get_sqla
|
from ..utils.image.image_tools import get_simple_bg
|
||||||
from ..utils.fonts.starrail_fonts import (
|
from ..utils.fonts.starrail_fonts import (
|
||||||
sr_font_22,
|
sr_font_22,
|
||||||
sr_font_24,
|
sr_font_24,
|
||||||
@ -17,9 +20,6 @@ from ..utils.fonts.starrail_fonts import (
|
|||||||
sr_font_36,
|
sr_font_36,
|
||||||
sr_font_50,
|
sr_font_50,
|
||||||
)
|
)
|
||||||
from ..utils.image.convert import convert_img
|
|
||||||
from ..utils.image.image_tools import get_simple_bg
|
|
||||||
from ..utils.mys_api import mys_api
|
|
||||||
|
|
||||||
use_widget = srconfig.get_config('WidgetResin').data
|
use_widget = srconfig.get_config('WidgetResin').data
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@ from typing import Dict
|
|||||||
from gsuid_core.gss import gss
|
from gsuid_core.gss import gss
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..sruid_utils.api.mys.models import DailyNoteData
|
|
||||||
from ..starrailuid_config.sr_config import srconfig
|
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
|
from ..starrailuid_config.sr_config import srconfig
|
||||||
|
from ..sruid_utils.api.mys.models import DailyNoteData
|
||||||
|
|
||||||
MR_NOTICE = '\n可发送[srmr]或者[sr每日]来查看更多信息!\n'
|
MR_NOTICE = '\n可发送[srmr]或者[sr每日]来查看更多信息!\n'
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ from typing import List
|
|||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
|
from ..utils.error_reply import get_error
|
||||||
|
|
||||||
daily_im = '''*数据刷新可能存在一定延迟,请以当前游戏实际数据为准
|
daily_im = '''*数据刷新可能存在一定延迟,请以当前游戏实际数据为准
|
||||||
==============
|
==============
|
||||||
|
@ -3,8 +3,8 @@ import threading
|
|||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
|
||||||
from ..starrailuid_resource import startup
|
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
|
from ..starrailuid_resource import startup
|
||||||
|
|
||||||
|
|
||||||
async def all_start():
|
async def all_start():
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
|
||||||
|
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
from ..utils.message import send_diff_msg
|
|
||||||
from ..utils.sr_prefix import PREFIX
|
from ..utils.sr_prefix import PREFIX
|
||||||
|
from ..utils.message import send_diff_msg
|
||||||
from .draw_user_card import get_user_card
|
from .draw_user_card import get_user_card
|
||||||
|
|
||||||
sv_user_config = SV('sr用户管理', pm=2)
|
sv_user_config = SV('sr用户管理', pm=2)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from http.cookies import SimpleCookie
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
|
from http.cookies import SimpleCookie
|
||||||
|
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
|
from ..utils.error_reply import UID_HINT
|
||||||
|
|
||||||
pic_path = Path(__file__).parent / 'pic'
|
pic_path = Path(__file__).parent / 'pic'
|
||||||
id_list = [
|
id_list = [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# from pathlib import Path
|
# from pathlib import Path
|
||||||
from typing import Optional, Tuple
|
from typing import Tuple, Optional
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import asyncio
|
|
||||||
import base64
|
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
|
import base64
|
||||||
|
import asyncio
|
||||||
from http.cookies import SimpleCookie
|
from http.cookies import SimpleCookie
|
||||||
from typing import Any, Dict, List, Literal, Tuple, Union
|
from typing import Any, Dict, List, Tuple, Union, Literal
|
||||||
|
|
||||||
import qrcode
|
import qrcode
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.segment import MessageSegment
|
from gsuid_core.logger import logger
|
||||||
from qrcode.constants import ERROR_CORRECT_L
|
from qrcode.constants import ERROR_CORRECT_L
|
||||||
|
from gsuid_core.segment import MessageSegment
|
||||||
|
|
||||||
from ..utils.api import get_sqla
|
from ..utils.api import get_sqla
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
|
from gsuid_core.sv import SV
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.sv import SV
|
|
||||||
from gsuid_core.utils.image.convert import convert_img
|
from gsuid_core.utils.image.convert import convert_img
|
||||||
|
|
||||||
from ..utils.map.name_covert import (
|
from ..utils.map.name_covert import (
|
||||||
alias_to_char_name,
|
|
||||||
name_to_avatar_id,
|
name_to_avatar_id,
|
||||||
name_to_weapon_id,
|
name_to_weapon_id,
|
||||||
|
alias_to_char_name,
|
||||||
)
|
)
|
||||||
from ..utils.resource.RESOURCE_PATH import (
|
from ..utils.resource.RESOURCE_PATH import (
|
||||||
GUIDE_CHARACTER_PATH,
|
|
||||||
GUIDE_LIGHT_CONE_PATH,
|
|
||||||
WIKI_LIGHT_CONE_PATH,
|
|
||||||
WIKI_MATERIAL_FOR_ROLE,
|
|
||||||
WIKI_RELIC_PATH,
|
|
||||||
WIKI_ROLE_PATH,
|
WIKI_ROLE_PATH,
|
||||||
|
WIKI_RELIC_PATH,
|
||||||
|
GUIDE_CHARACTER_PATH,
|
||||||
|
WIKI_LIGHT_CONE_PATH,
|
||||||
|
GUIDE_LIGHT_CONE_PATH,
|
||||||
|
WIKI_MATERIAL_FOR_ROLE,
|
||||||
)
|
)
|
||||||
|
|
||||||
sv_sr_wiki = SV('星铁WIKI')
|
sv_sr_wiki = SV('星铁WIKI')
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import re
|
import re
|
||||||
from typing import Optional, Tuple, Union, overload
|
from typing import Tuple, Union, Optional, overload
|
||||||
|
|
||||||
from gsuid_core.bot import Bot
|
from gsuid_core.bot import Bot
|
||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.utils.api.mys.models import IndexData
|
from gsuid_core.utils.api.mys.models import IndexData
|
||||||
|
|
||||||
from ..sruid_utils.api.mys.models import AbyssData, RogueData, RogueLocustData
|
|
||||||
from .api import get_sqla
|
from .api import get_sqla
|
||||||
from .error_reply import VERIFY_HINT
|
|
||||||
from .mys_api import mys_api
|
from .mys_api import mys_api
|
||||||
|
from .error_reply import VERIFY_HINT
|
||||||
|
from ..sruid_utils.api.mys.models import AbyssData, RogueData, RogueLocustData
|
||||||
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
|
@ -10,9 +10,7 @@ VERIFY_HINT = '''出现验证码!
|
|||||||
(可使用[gs关闭推送]命令关闭体力推送以减少出现验证码风险)
|
(可使用[gs关闭推送]命令关闭体力推送以减少出现验证码风险)
|
||||||
如未绑定CK: 可联系管理员使用[gs清除缓存]命令
|
如未绑定CK: 可联系管理员使用[gs清除缓存]命令
|
||||||
'''
|
'''
|
||||||
SK_HINT = (
|
SK_HINT = '你还没有绑定过Stoken或者Stoken已失效~\n请群聊发送 [扫码登陆] 或加好友私聊Bot [添加]后跟SK格式 以绑定SK'
|
||||||
'你还没有绑定过Stoken或者Stoken已失效~\n请群聊发送 [扫码登陆] 或加好友私聊Bot [添加]后跟SK格式 以绑定SK'
|
|
||||||
)
|
|
||||||
UPDATE_HINT = '''更新失败!更多错误信息请查看控制台...
|
UPDATE_HINT = '''更新失败!更多错误信息请查看控制台...
|
||||||
>> 可以尝试使用
|
>> 可以尝试使用
|
||||||
>> [gs强制更新](危险)
|
>> [gs强制更新](危险)
|
||||||
|
@ -3,10 +3,10 @@ from typing import Dict, List, Union
|
|||||||
from msgspec import Struct
|
from msgspec import Struct
|
||||||
|
|
||||||
from .read_excel import (
|
from .read_excel import (
|
||||||
|
RelicSubAffix,
|
||||||
|
RelicMainAffix,
|
||||||
AvatarPromotion,
|
AvatarPromotion,
|
||||||
EquipmentPromotion,
|
EquipmentPromotion,
|
||||||
RelicMainAffix,
|
|
||||||
RelicSubAffix,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from base64 import b64encode
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from base64 import b64encode
|
||||||
from typing import Union, overload
|
from typing import Union, overload
|
||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional, Union
|
from typing import Union, Optional
|
||||||
|
|
||||||
from gsuid_core.utils.image.image_tools import TEXT_PATH, CustomizeImage
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
from gsuid_core.utils.image.image_tools import TEXT_PATH, CustomizeImage
|
||||||
|
|
||||||
from ...starrailuid_config.sr_config import srconfig
|
|
||||||
from ..resource.RESOURCE_PATH import CU_BG_PATH
|
from ..resource.RESOURCE_PATH import CU_BG_PATH
|
||||||
|
from ...starrailuid_config.sr_config import srconfig
|
||||||
|
|
||||||
BG_PATH = Path(__file__).parent / 'bg'
|
BG_PATH = Path(__file__).parent / 'bg'
|
||||||
NM_BG_PATH = BG_PATH / 'nm_bg'
|
NM_BG_PATH = BG_PATH / 'nm_bg'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, TypedDict, Union
|
from typing import Dict, List, Union, TypedDict
|
||||||
|
|
||||||
from msgspec import json as msgjson
|
from msgspec import json as msgjson
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from .SR_MAP_PATH import (
|
from .SR_MAP_PATH import (
|
||||||
EquipmentID2EnName,
|
|
||||||
EquipmentID2Name,
|
EquipmentID2Name,
|
||||||
|
EquipmentID2EnName,
|
||||||
alias_data,
|
alias_data,
|
||||||
avatarId2Name,
|
avatarId2Name,
|
||||||
avatarId2Rarity,
|
avatarId2Rarity,
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
import copy
|
import copy
|
||||||
import random
|
|
||||||
import time
|
import time
|
||||||
from string import ascii_letters, digits
|
import random
|
||||||
from typing import Any, Dict, Optional, Union, cast
|
from string import digits, ascii_letters
|
||||||
|
from typing import Any, Dict, Union, Optional, cast
|
||||||
|
|
||||||
|
from gsuid_core.utils.api.mys_api import _MysApi
|
||||||
from gsuid_core.utils.api.mys.models import MysSign, SignInfo, SignList
|
from gsuid_core.utils.api.mys.models import MysSign, SignInfo, SignList
|
||||||
from gsuid_core.utils.api.mys.tools import (
|
from gsuid_core.utils.api.mys.tools import (
|
||||||
_random_int_ds,
|
_random_int_ds,
|
||||||
generate_os_ds,
|
generate_os_ds,
|
||||||
get_web_ds_token,
|
get_web_ds_token,
|
||||||
)
|
)
|
||||||
from gsuid_core.utils.api.mys_api import _MysApi
|
|
||||||
|
|
||||||
|
from .api import srdbsqla
|
||||||
from ..sruid_utils.api.mys.api import _API
|
from ..sruid_utils.api.mys.api import _API
|
||||||
from ..sruid_utils.api.mys.models import (
|
from ..sruid_utils.api.mys.models import (
|
||||||
AbyssData,
|
|
||||||
AvatarInfo,
|
|
||||||
DailyNoteData,
|
|
||||||
GachaLog,
|
GachaLog,
|
||||||
MonthlyAward,
|
AbyssData,
|
||||||
RogueData,
|
RogueData,
|
||||||
RogueLocustData,
|
|
||||||
RoleBasicInfo,
|
|
||||||
RoleIndex,
|
RoleIndex,
|
||||||
|
AvatarInfo,
|
||||||
|
MonthlyAward,
|
||||||
|
DailyNoteData,
|
||||||
|
RoleBasicInfo,
|
||||||
WidgetStamina,
|
WidgetStamina,
|
||||||
|
RogueLocustData,
|
||||||
)
|
)
|
||||||
from .api import srdbsqla
|
|
||||||
|
|
||||||
RECOGNIZE_SERVER = {
|
RECOGNIZE_SERVER = {
|
||||||
'1': 'prod_gf_cn',
|
'1': 'prod_gf_cn',
|
||||||
|
@ -2,12 +2,12 @@ import asyncio
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Tuple, Union
|
from typing import Dict, List, Tuple, Union
|
||||||
|
|
||||||
from aiohttp.client import ClientSession
|
|
||||||
from gsuid_core.logger import logger
|
|
||||||
from msgspec import json as msgjson
|
from msgspec import json as msgjson
|
||||||
|
from gsuid_core.logger import logger
|
||||||
|
from aiohttp.client import ClientSession
|
||||||
|
|
||||||
from .download_url import download_file
|
from .download_url import download_file
|
||||||
from .RESOURCE_PATH import GUIDE_PATH, RESOURCE_PATH, WIKI_PATH
|
from .RESOURCE_PATH import WIKI_PATH, GUIDE_PATH, RESOURCE_PATH
|
||||||
|
|
||||||
with Path.open(
|
with Path.open(
|
||||||
Path(__file__).parent / 'resource_map.json', encoding='UTF-8'
|
Path(__file__).parent / 'resource_map.json', encoding='UTF-8'
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
from typing import Optional, Tuple
|
from typing import Tuple, Optional
|
||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
|
from gsuid_core.logger import logger
|
||||||
from aiohttp.client import ClientSession
|
from aiohttp.client import ClientSession
|
||||||
from aiohttp.client_exceptions import ClientConnectorError
|
from aiohttp.client_exceptions import ClientConnectorError
|
||||||
from gsuid_core.logger import logger
|
|
||||||
|
|
||||||
from .RESOURCE_PATH import GUIDE_PATH, RESOURCE_PATH, WIKI_PATH
|
from .RESOURCE_PATH import WIKI_PATH, GUIDE_PATH, RESOURCE_PATH
|
||||||
|
|
||||||
PATHDICT = {
|
PATHDICT = {
|
||||||
'resource': RESOURCE_PATH,
|
'resource': RESOURCE_PATH,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user