Skip to content

Commit

Permalink
fix: 修改部分文本表示,删除不再需要的常量
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsSov8forUs committed May 21, 2024
1 parent 9b968bc commit 8bd10dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 35 deletions.
2 changes: 1 addition & 1 deletion nonebot_plugin_tsugu_bangdream_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
__plugin_meta__ = PluginMetadata(
name="nonebot-plugin-tsugu-bangdream-bot",
description="Koishi-Plugin-Tsugu-BanGDream-Bot 的 NoneBot2 实现",
usage="\n".join([f"{key}: {value}" for key, value in USAGES.items()]),
usage="\n\n".join([f"{key}: {value}" for key, value in USAGES.items()]),
type="application",
homepage="https://github.com/WindowsSov8forUs/nonebot-plugin-tsugu-bangdream-bot",
config=Config,
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_tsugu_bangdream_bot/_commands.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from base64 import b64decode
from typing import List, Tuple, Union, Optional, Sequence
from typing import List, Tuple, Union, Optional

from nonebot import logger

Expand Down
40 changes: 7 additions & 33 deletions nonebot_plugin_tsugu_bangdream_bot/_utils.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,8 @@
from tsugu_api_core._typing import _ServerId, _ServerName
from typing import List

_COMMAND_KEYWORDS = [
'查询玩家',
'查卡面',
'查玩家',
'查卡',
'查角色',
'查活动',
'查分数表',
'查询分数榜',
'查分数榜',
'查曲',
'查谱面',
'查卡池',
'查询分数表',
'ycx',
'ycxall',
'lsycx',
'抽卡模拟',
'绑定玩家',
'解除绑定',
'主服务器',
'设置默认服务器',
'玩家状态',
'开启车牌转发',
'关闭车牌转发'
]
COMMAND_KEYWORDS = sorted(_COMMAND_KEYWORDS, key=lambda x: len(x), reverse=True)
from tsugu_api_core._typing import _ServerId, _ServerName

tier_lists = {
TIER_LISTS = {
"jp": [20, 30, 40, 50, 100, 200, 300, 400, 500, 1000, 2000, 5000, 10000, 20000, 30000, 50000],
"tw": [100, 500],
"en": [50, 100, 300, 500, 1000, 2000, 2500],
Expand All @@ -37,10 +11,10 @@
}

def tier_list_of_server_to_string() -> str:
result: str = ""
for server, tiers in tier_lists.items():
result += server + " : " + ", ".join(str(tier) for tier in tiers) + "\n"
return result
results: List[str] = []
for server, tiers in TIER_LISTS.items():
results.append(server + " : " + ", ".join(str(tier) for tier in tiers))
return "\n".join(results)

USAGES = {
"开启车牌转发": "开启车牌转发",
Expand Down

0 comments on commit 8bd10dc

Please sign in to comment.