Skip to content

Commit

Permalink
🐛 修复配置的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
KimigaiiWuyi committed Oct 8, 2024
1 parent 4ce2b07 commit 6e9fd01
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 31 deletions.
5 changes: 5 additions & 0 deletions MajsoulUID/majs_config/config_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
defalut_id = str(master if master else superuser)

CONFIG_DEFAULT: Dict[str, GSC] = {
"UseFlowerHistory": GsBoolConfig(
"对局历史使用花图替代折线图",
"对局历史使用花图替代折线图",
False,
),
'MajsIsPushActiveToMaster': GsBoolConfig(
'是否向推送对象也推送订阅信息',
'设置后将会向下面设置的推送对象也推送订阅信息',
Expand Down
4 changes: 2 additions & 2 deletions MajsoulUID/majs_help/get_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import aiofiles
from PIL import Image
from msgspec import json as msgjson
from gsuid_core.sv import get_plugin_prefix
from gsuid_core.help.model import PluginHelp
from gsuid_core.sv import get_plugin_available_prefix
from gsuid_core.help.draw_new_plugin_help import get_new_help

from ..utils.image import get_footer
Expand All @@ -16,7 +16,7 @@
ICON_PATH = Path(__file__).parent / 'icon_path'
TEXT_PATH = Path(__file__).parent / 'texture2d'

PREFIX = get_plugin_prefix('MajsoulUID')
PREFIX = get_plugin_available_prefix('MajsoulUID')


async def get_help_data() -> Dict[str, PluginHelp]:
Expand Down
4 changes: 2 additions & 2 deletions MajsoulUID/majs_info/draw_majs_info_pic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from ..utils.majs_api import majs_api
from ..utils.api.remote import PlayerLevel
from ..utils.majs_config import majs_config
from ..utils.api.models import Stats, Extended
from ..majs_config.majs_config import MAJS_CONFIG
from ..utils.api.remote_const import player_stats_zero, player_extend_zero

TEXTURE = Path(__file__).parent / "texture2d"
Expand All @@ -26,7 +26,7 @@

@gs_cache()
async def draw_majs_info_img(ev: Event, uid: str, mode: str = "auto"):
MODE: bool = majs_config.get_config("use_flower_history").data
MODE: bool = MAJS_CONFIG.get_config("UseFlowerHistory").data
data4 = await majs_api.get_player_stats(uid)
data3 = await majs_api.get_player_stats(uid, "3")

Expand Down
27 changes: 0 additions & 27 deletions MajsoulUID/utils/majs_config.py

This file was deleted.

0 comments on commit 6e9fd01

Please sign in to comment.