mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-07 04:03:45 +08:00
🎨 改为调用core中的error_reply
This commit is contained in:
parent
a019ea1610
commit
c85e29b1da
@ -1,9 +1,11 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
from gsuid_core.sv import SV
|
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.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from .draw_abyss_card import draw_abyss_img
|
from .draw_abyss_card import draw_abyss_img
|
||||||
|
|
||||||
sv_abyss = SV('查询深渊')
|
sv_abyss = SV('查询深渊')
|
||||||
@ -13,6 +15,10 @@ sv_abyss = SV('查询深渊')
|
|||||||
('查询深渊', 'sy', '查询上期深渊', 'sqsy', '上期深渊', '深渊'), block=True
|
('查询深渊', 'sy', '查询上期深渊', 'sqsy', '上期深渊', '深渊'), block=True
|
||||||
)
|
)
|
||||||
async def send_abyss_info(bot: Bot, ev: Event):
|
async def send_abyss_info(bot: Bot, ev: Event):
|
||||||
|
name = ''.join(re.findall('[\u4e00-\u9fa5]', ev.text))
|
||||||
|
if name:
|
||||||
|
return
|
||||||
|
|
||||||
await bot.logger.info('开始执行[查询深渊信息]')
|
await bot.logger.info('开始执行[查询深渊信息]')
|
||||||
uid = await get_uid(bot, ev)
|
uid = await get_uid(bot, ev)
|
||||||
if uid is None:
|
if uid is None:
|
||||||
|
@ -5,10 +5,10 @@ from typing import Union, Optional
|
|||||||
|
|
||||||
from PIL import Image, ImageDraw
|
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.api.mys.models import AbyssBattleAvatar
|
from gsuid_core.utils.api.mys.models import AbyssBattleAvatar
|
||||||
|
|
||||||
from ..utils.convert import GsCookie
|
from ..utils.convert import GsCookie
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.image.convert import convert_img
|
from ..utils.image.convert import convert_img
|
||||||
from ..utils.resource.download_url import download_file
|
from ..utils.resource.download_url import download_file
|
||||||
from ..utils.resource.generate_char_card import create_single_char_card
|
from ..utils.resource.generate_char_card import create_single_char_card
|
||||||
|
@ -7,11 +7,11 @@ from gsuid_core.gss import gss
|
|||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.aps import scheduler
|
from gsuid_core.aps import scheduler
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from .util import black_ids
|
from .util import black_ids
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from .main import ann, consume_remind
|
from .main import ann, consume_remind
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.image.convert import convert_img
|
from ..utils.image.convert import convert_img
|
||||||
from ..genshinuid_config.gs_config import gsconfig
|
from ..genshinuid_config.gs_config import gsconfig
|
||||||
from .ann_card import sub_ann, unsub_ann, ann_list_card, ann_detail_card
|
from .ann_card import sub_ann, unsub_ann, ann_list_card, ann_detail_card
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
from gsuid_core.sv import SV
|
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.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from .draw_collection_card import draw_explora_img, draw_collection_img
|
from .draw_collection_card import draw_explora_img, draw_collection_img
|
||||||
|
|
||||||
sv_sj = SV('查询收集')
|
sv_sj = SV('查询收集')
|
||||||
|
@ -3,9 +3,9 @@ import re
|
|||||||
from gsuid_core.sv import SV
|
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.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from .draw_config_card import draw_config_img
|
from .draw_config_card import draw_config_img
|
||||||
from .set_config import set_push_value, set_config_func
|
from .set_config import set_push_value, set_config_func
|
||||||
|
|
||||||
|
@ -8,11 +8,11 @@ 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.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from .to_data import switch_api
|
from .to_data import switch_api
|
||||||
from .to_card import enka_to_card
|
from .to_card import enka_to_card
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.image.convert import convert_img
|
from ..utils.image.convert import convert_img
|
||||||
from ..utils.map.GS_MAP_PATH import alias_data
|
from ..utils.map.GS_MAP_PATH import alias_data
|
||||||
from .draw_char_rank import draw_cahrcard_list
|
from .draw_char_rank import draw_cahrcard_list
|
||||||
|
@ -4,9 +4,9 @@ from typing import Dict, List, Tuple, Union, Optional
|
|||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
from gsuid_core.utils.error_reply import CHAR_HINT
|
||||||
|
|
||||||
from .to_card import draw_enka_card
|
from .to_card import draw_enka_card
|
||||||
from ..utils.error_reply import CHAR_HINT
|
|
||||||
from .draw_char_card import draw_char_img
|
from .draw_char_card import draw_char_img
|
||||||
from .draw_group_dmg import draw_group_dmg_img
|
from .draw_group_dmg import draw_group_dmg_img
|
||||||
from .mono.Character import Character, get_char
|
from .mono.Character import Character, get_char
|
||||||
|
@ -3,11 +3,11 @@ import time
|
|||||||
from typing import List, Union, Literal, Optional
|
from typing import List, Union, Literal, Optional
|
||||||
|
|
||||||
from httpx import ReadTimeout, ConnectTimeout
|
from httpx import ReadTimeout, ConnectTimeout
|
||||||
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
from gsuid_core.utils.api.enka.models import EnkaData
|
from gsuid_core.utils.api.enka.models import EnkaData
|
||||||
from gsuid_core.utils.api.enka.request import get_enka_info
|
from gsuid_core.utils.api.enka.request import get_enka_info
|
||||||
from gsuid_core.utils.api.minigg.request import get_weapon_info
|
from gsuid_core.utils.api.minigg.request import get_weapon_info
|
||||||
|
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||||
from ..utils.ambr_to_minigg import convert_ambr_to_weapon
|
from ..utils.ambr_to_minigg import convert_ambr_to_weapon
|
||||||
from ..utils.map.GS_MAP_PATH import (
|
from ..utils.map.GS_MAP_PATH import (
|
||||||
|
@ -2,10 +2,10 @@ 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.segment import MessageSegment
|
from gsuid_core.segment import MessageSegment
|
||||||
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
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
|
from .draw_gachalogs import draw_gachalogs_img
|
||||||
from .export_and_import import export_gachalogs, import_gachalogs
|
from .export_and_import import export_gachalogs, import_gachalogs
|
||||||
|
@ -3,8 +3,9 @@ import asyncio
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Dict, Optional
|
from typing import Dict, Optional
|
||||||
|
|
||||||
|
from gsuid_core.utils.error_reply import SK_HINT
|
||||||
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
from ..utils.error_reply import SK_HINT
|
|
||||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||||
|
|
||||||
gacha_type_meta_data = {
|
gacha_type_meta_data = {
|
||||||
|
@ -5,10 +5,10 @@ import httpx
|
|||||||
import aiofiles
|
import aiofiles
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from urllib3 import encode_multipart_formdata
|
from urllib3 import encode_multipart_formdata
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.api.mys.request import RECOGNIZE_SERVER
|
from gsuid_core.utils.api.mys.request import RECOGNIZE_SERVER
|
||||||
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from .export_and_import import export_gachalogs, import_gachalogs
|
from .export_and_import import export_gachalogs, import_gachalogs
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
from gsuid_core.sv import SV
|
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.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from .draw_gcgdesk import draw_deck_img
|
from .draw_gcgdesk import draw_deck_img
|
||||||
from .draw_gcginfo import draw_gcg_info
|
from .draw_gcginfo import draw_gcg_info
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
|
|
||||||
sv_gcg = SV('查询七圣')
|
sv_gcg = SV('查询七圣')
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ from typing import Union
|
|||||||
|
|
||||||
from PIL import Image, ImageDraw
|
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 ..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.image.convert import convert_img
|
||||||
from ..utils.resource.download_url import download
|
from ..utils.resource.download_url import download
|
||||||
from ..utils.resource.RESOURCE_PATH import CARD_PATH
|
from ..utils.resource.RESOURCE_PATH import CARD_PATH
|
||||||
|
@ -3,9 +3,9 @@ from typing import Union
|
|||||||
|
|
||||||
from PIL import Image, ImageDraw
|
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 ..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.image.convert import convert_img
|
||||||
from ..utils.resource.download_url import download
|
from ..utils.resource.download_url import download
|
||||||
from ..utils.resource.RESOURCE_PATH import CARD_PATH
|
from ..utils.resource.RESOURCE_PATH import CARD_PATH
|
||||||
|
@ -8,9 +8,9 @@ from gsuid_core.gss import gss
|
|||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.aps import scheduler
|
from gsuid_core.aps import scheduler
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
from gsuid_core.utils.error_reply import CK_HINT, SK_HINT
|
||||||
|
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
from ..utils.error_reply import CK_HINT, SK_HINT
|
|
||||||
from ..genshinuid_config.gs_config import gsconfig
|
from ..genshinuid_config.gs_config import gsconfig
|
||||||
from .daily_get import mihoyo_coin, all_daily_mihoyo_bbs_coin
|
from .daily_get import mihoyo_coin, all_daily_mihoyo_bbs_coin
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
from gsuid_core.sv import SV
|
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.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from .note_text import award
|
from .note_text import award
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from .draw_note_card import draw_note_img
|
from .draw_note_card import draw_note_img
|
||||||
|
|
||||||
sv_get_monthly_data = SV('查询札记')
|
sv_get_monthly_data = SV('查询札记')
|
||||||
|
@ -3,9 +3,9 @@ from typing import Union
|
|||||||
|
|
||||||
from PIL import Image, ImageDraw
|
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 ..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.image.convert import convert_img
|
||||||
from ..utils.image.image_tools import get_color_bg
|
from ..utils.image.image_tools import get_color_bg
|
||||||
from ..utils.fonts.genshin_fonts import gs_font_26, gs_font_38, gs_font_58
|
from ..utils.fonts.genshin_fonts import gs_font_26, gs_font_38, gs_font_58
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
from gsuid_core.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 = """
|
||||||
==============
|
==============
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from gsuid_core.sv import SV
|
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.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from .get_draw import post_my_draw
|
from .get_draw import post_my_draw
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
|
|
||||||
sv_post_my_draw = SV('留影叙佳期')
|
sv_post_my_draw = SV('留影叙佳期')
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
from gsuid_core.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
|
|
||||||
|
|
||||||
|
|
||||||
async def post_my_draw(uid) -> str:
|
async def post_my_draw(uid) -> str:
|
||||||
|
@ -7,11 +7,11 @@ from gsuid_core.models import Event
|
|||||||
from gsuid_core.aps import scheduler
|
from gsuid_core.aps import scheduler
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.segment import MessageSegment
|
from gsuid_core.segment import MessageSegment
|
||||||
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from .notice import get_notice_list
|
from .notice import get_notice_list
|
||||||
from .resin_text import get_resin_text
|
from .resin_text import get_resin_text
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from .draw_resin_card import get_resin_img
|
from .draw_resin_card import get_resin_img
|
||||||
|
|
||||||
sv_get_resin = SV('查询体力')
|
sv_get_resin = SV('查询体力')
|
||||||
|
@ -2,9 +2,9 @@ import math
|
|||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
from gsuid_core.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
|
|
||||||
from ..utils.map.name_covert import avatar_id_to_name, enName_to_avatarId
|
from ..utils.map.name_covert import avatar_id_to_name, enName_to_avatarId
|
||||||
|
|
||||||
daily_im = """*数据刷新可能存在一定延迟,请以当前游戏实际数据为准
|
daily_im = """*数据刷新可能存在一定延迟,请以当前游戏实际数据为准
|
||||||
|
@ -3,10 +3,10 @@ import re
|
|||||||
from gsuid_core.sv import SV
|
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.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.convert import get_uid
|
from ..utils.convert import get_uid
|
||||||
from .get_regtime import calc_reg_time
|
from .get_regtime import calc_reg_time
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from .draw_roleinfo_card import draw_pic
|
from .draw_roleinfo_card import draw_pic
|
||||||
|
|
||||||
sv_get_regtime = SV('查询注册时间')
|
sv_get_regtime = SV('查询注册时间')
|
||||||
|
@ -3,11 +3,11 @@ from pathlib import Path
|
|||||||
|
|
||||||
from PIL import Image, ImageDraw
|
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.api.mys.models import MihoyoAvatar
|
from gsuid_core.utils.api.mys.models import MihoyoAvatar
|
||||||
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
from ..utils.convert import GsCookie
|
from ..utils.convert import GsCookie
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.image.convert import convert_img
|
from ..utils.image.convert import convert_img
|
||||||
from ..utils.resource.download_url import download_file
|
from ..utils.resource.download_url import download_file
|
||||||
from ..utils.fonts.genshin_fonts import genshin_font_origin
|
from ..utils.fonts.genshin_fonts import genshin_font_origin
|
||||||
|
@ -2,9 +2,9 @@ import json
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
from gsuid_core.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
|
|
||||||
|
|
||||||
|
|
||||||
async def calc_reg_time(uid: str) -> str:
|
async def calc_reg_time(uid: str) -> str:
|
||||||
|
@ -7,10 +7,10 @@ from gsuid_core.gss import gss
|
|||||||
from gsuid_core.models import Event
|
from gsuid_core.models import Event
|
||||||
from gsuid_core.aps import scheduler
|
from gsuid_core.aps import scheduler
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
from .sign import sign_in, daily_sign
|
from .sign import sign_in, daily_sign
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
from ..genshinuid_config.gs_config import gsconfig
|
from ..genshinuid_config.gs_config import gsconfig
|
||||||
|
|
||||||
SIGN_TIME = gsconfig.get_config('SignTime').data
|
SIGN_TIME = gsconfig.get_config('SignTime').data
|
||||||
|
@ -10,11 +10,11 @@ from gsuid_core.bot import Bot
|
|||||||
from qrcode import ERROR_CORRECT_L
|
from qrcode import ERROR_CORRECT_L
|
||||||
from gsuid_core.logger import logger
|
from gsuid_core.logger import logger
|
||||||
from gsuid_core.segment import MessageSegment
|
from gsuid_core.segment import MessageSegment
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.api.mys.models import MysOrder
|
from gsuid_core.utils.api.mys.models import MysOrder
|
||||||
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from .draw_topup_img import draw_wx, draw_ali
|
from .draw_topup_img import draw_wx, draw_ali
|
||||||
|
|
||||||
disnote = '''免责声明:
|
disnote = '''免责声明:
|
||||||
|
@ -2,9 +2,9 @@ from pathlib import Path
|
|||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.utils.error_reply import UPDATE_HINT
|
||||||
|
|
||||||
from .update import update_from_git
|
from .update import update_from_git
|
||||||
from ..utils.error_reply import UPDATE_HINT
|
|
||||||
from ..utils.image.convert import convert_img
|
from ..utils.image.convert import convert_img
|
||||||
from ..utils.image.image_tools import get_color_bg
|
from ..utils.image.image_tools import get_color_bg
|
||||||
from ..utils.fonts.genshin_fonts import genshin_font_origin
|
from ..utils.fonts.genshin_fonts import genshin_font_origin
|
||||||
|
@ -2,9 +2,10 @@ from pathlib import Path
|
|||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
from http.cookies import SimpleCookie
|
from http.cookies import SimpleCookie
|
||||||
|
|
||||||
|
from gsuid_core.utils.error_reply import UID_HINT
|
||||||
|
|
||||||
from ..utils.mys_api import mys_api
|
from ..utils.mys_api import mys_api
|
||||||
from ..utils.database import get_sqla
|
from ..utils.database import get_sqla
|
||||||
from ..utils.error_reply import UID_HINT
|
|
||||||
|
|
||||||
pic_path = Path(__file__).parent / 'pic'
|
pic_path = Path(__file__).parent / 'pic'
|
||||||
id_list = [
|
id_list = [
|
||||||
|
@ -3,11 +3,11 @@ from typing import Tuple, Union
|
|||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.api.minigg.models import Artifact
|
from gsuid_core.utils.api.minigg.models import Artifact
|
||||||
from gsuid_core.utils.api.minigg.request import get_others_info
|
from gsuid_core.utils.api.minigg.request import get_others_info
|
||||||
|
|
||||||
from .path import TEXT_PATH
|
from .path import TEXT_PATH
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.image.image_tools import get_pic
|
from ..utils.image.image_tools import get_pic
|
||||||
from ..utils.image.convert import str_lenth, convert_img
|
from ..utils.image.convert import str_lenth, convert_img
|
||||||
from ..utils.resource.RESOURCE_PATH import REL_PATH, WIKI_REL_PATH
|
from ..utils.resource.RESOURCE_PATH import REL_PATH, WIKI_REL_PATH
|
||||||
|
@ -2,6 +2,7 @@ from typing import Dict, List, Tuple, Union
|
|||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.api.minigg.request import (
|
from gsuid_core.utils.api.minigg.request import (
|
||||||
get_character_info,
|
get_character_info,
|
||||||
get_constellation_info,
|
get_constellation_info,
|
||||||
@ -13,7 +14,6 @@ from gsuid_core.utils.api.minigg.models import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from .path import TEXT_PATH
|
from .path import TEXT_PATH
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.resource.download_url import download
|
from ..utils.resource.download_url import download
|
||||||
from ..utils.map.name_covert import name_to_avatar_id
|
from ..utils.map.name_covert import name_to_avatar_id
|
||||||
from ..utils.image.convert import str_lenth, convert_img
|
from ..utils.image.convert import str_lenth, convert_img
|
||||||
|
@ -2,6 +2,7 @@ from typing import Dict, List, Tuple, Union
|
|||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.api.minigg.models import Character, CharacterTalents
|
from gsuid_core.utils.api.minigg.models import Character, CharacterTalents
|
||||||
from gsuid_core.utils.api.minigg.request import (
|
from gsuid_core.utils.api.minigg.request import (
|
||||||
get_others_info,
|
get_others_info,
|
||||||
@ -11,7 +12,6 @@ from gsuid_core.utils.api.minigg.request import (
|
|||||||
|
|
||||||
from .path import TEXT_PATH
|
from .path import TEXT_PATH
|
||||||
from ..utils.colors import white_color
|
from ..utils.colors import white_color
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.get_assets import get_assets_from_ambr
|
from ..utils.get_assets import get_assets_from_ambr
|
||||||
from ..utils.map.name_covert import name_to_avatar_id
|
from ..utils.map.name_covert import name_to_avatar_id
|
||||||
from ..utils.image.convert import str_lenth, convert_img
|
from ..utils.image.convert import str_lenth, convert_img
|
||||||
|
@ -2,12 +2,12 @@ from typing import List, Union
|
|||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.api.minigg.models import Food
|
from gsuid_core.utils.api.minigg.models import Food
|
||||||
from gsuid_core.utils.api.minigg.request import get_others_info
|
from gsuid_core.utils.api.minigg.request import get_others_info
|
||||||
|
|
||||||
from .path import TEXT_PATH
|
from .path import TEXT_PATH
|
||||||
from ..utils.colors import white_color
|
from ..utils.colors import white_color
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.get_assets import get_assets_from_ambr
|
from ..utils.get_assets import get_assets_from_ambr
|
||||||
from ..utils.resource.RESOURCE_PATH import WIKI_FOOD_PATH
|
from ..utils.resource.RESOURCE_PATH import WIKI_FOOD_PATH
|
||||||
from ..utils.image.convert import convert_img, get_str_size
|
from ..utils.image.convert import convert_img, get_str_size
|
||||||
|
@ -3,6 +3,7 @@ from typing import Dict, List, Union
|
|||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
from gsuid_core.utils.error_reply import get_error
|
||||||
from gsuid_core.utils.api.minigg.models import Weapon, WeaponStats
|
from gsuid_core.utils.api.minigg.models import Weapon, WeaponStats
|
||||||
from gsuid_core.utils.api.minigg.request import (
|
from gsuid_core.utils.api.minigg.request import (
|
||||||
get_others_info,
|
get_others_info,
|
||||||
@ -12,7 +13,6 @@ from gsuid_core.utils.api.minigg.request import (
|
|||||||
|
|
||||||
from .path import TEXT_PATH
|
from .path import TEXT_PATH
|
||||||
from ..utils.colors import white_color
|
from ..utils.colors import white_color
|
||||||
from ..utils.error_reply import get_error
|
|
||||||
from ..utils.get_assets import get_assets_from_ambr
|
from ..utils.get_assets import get_assets_from_ambr
|
||||||
from ..utils.image.convert import convert_img, get_str_size
|
from ..utils.image.convert import convert_img, get_str_size
|
||||||
from ..utils.resource.RESOURCE_PATH import WIKI_WEAPON_PATH
|
from ..utils.resource.RESOURCE_PATH import WIKI_WEAPON_PATH
|
||||||
|
@ -3,11 +3,11 @@ 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.error_reply import VERIFY_HINT
|
||||||
from gsuid_core.utils.api.mys.models import AbyssData, IndexData
|
from gsuid_core.utils.api.mys.models import AbyssData, IndexData
|
||||||
|
|
||||||
from .mys_api import mys_api
|
from .mys_api import mys_api
|
||||||
from .database import get_sqla
|
from .database import get_sqla
|
||||||
from .error_reply import VERIFY_HINT
|
|
||||||
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
from typing import Union
|
|
||||||
|
|
||||||
UID_HINT = '你还没有绑定过uid哦!\n请使用[绑定uid123456]命令绑定!'
|
|
||||||
MYS_HINT = '你还没有绑定过mysid哦!\n请使用[绑定mys1234]命令绑定!'
|
|
||||||
CK_HINT = """你还没有绑定过Cookie哦!发送【ck帮助】获取帮助!
|
|
||||||
警告:绑定Cookie可能会带来未知的账号风险,请确保信任机器人管理员"""
|
|
||||||
CHAR_HINT = '你还没有{}的缓存噢!\n请先使用【强制刷新】命令来缓存数据! \n或者使用【查询展柜角色】命令查看已缓存角色!'
|
|
||||||
VERIFY_HINT = '''出现验证码!
|
|
||||||
如已绑定CK: 请至米游社软件->我的->我的角色处解锁验证码
|
|
||||||
(可使用[gs关闭推送]命令关闭体力推送以减少出现验证码风险)
|
|
||||||
如未绑定CK: 可联系管理员使用[gs清除缓存]命令
|
|
||||||
'''
|
|
||||||
SK_HINT = '你还没有绑定过Stoken或者Stoken已失效~\n请加好友私聊Bot\n [扫码登陆] 或 [添加]后跟SK格式 以绑定SK'
|
|
||||||
UPDATE_HINT = '''更新失败!更多错误信息请查看控制台...
|
|
||||||
>> 可以尝试使用
|
|
||||||
>> [gs强制更新](危险)
|
|
||||||
>> [gs强行强制更新](超级危险)!'''
|
|
||||||
|
|
||||||
|
|
||||||
def get_error(retcode: Union[int, str]) -> str:
|
|
||||||
if retcode == -51:
|
|
||||||
return CK_HINT
|
|
||||||
elif retcode == -100:
|
|
||||||
return '您的cookie已经失效, 请重新获取!'
|
|
||||||
elif retcode == 10001:
|
|
||||||
return '您的cookie已经失效, 请重新获取!'
|
|
||||||
elif retcode == 10101:
|
|
||||||
return '当前查询CK已超过每日30次上限!'
|
|
||||||
elif retcode == 10102:
|
|
||||||
return '当前查询id已经设置了隐私, 无法查询!'
|
|
||||||
elif retcode == 1034:
|
|
||||||
return VERIFY_HINT
|
|
||||||
elif retcode == -10001:
|
|
||||||
return '请求体出错, 请检查具体实现代码...'
|
|
||||||
elif retcode == 10104:
|
|
||||||
return CK_HINT
|
|
||||||
elif retcode == -512009:
|
|
||||||
return '[留影叙佳期]已经获取过该内容~!'
|
|
||||||
elif retcode == -201:
|
|
||||||
return '你的账号可能已被封禁, 请联系米游社客服...'
|
|
||||||
elif retcode == -501101:
|
|
||||||
return '当前角色冒险等阶未达到10级, 暂时无法参加此活动...'
|
|
||||||
elif retcode == 400:
|
|
||||||
return '[MINIGG]暂未找到此内容...'
|
|
||||||
elif retcode == -400:
|
|
||||||
return '请输入更详细的名称...'
|
|
||||||
else:
|
|
||||||
return f'API报错, 错误码为{retcode}!'
|
|
Loading…
x
Reference in New Issue
Block a user