From 82f0e9eac72f13b714eb4614ccdce5b50bb4e2ee Mon Sep 17 00:00:00 2001 From: Peaksol Date: Sat, 30 Jul 2022 15:12:30 +0800 Subject: [PATCH] bug fixes --- SpelakoCore.php | 7 +++---- commands/Hypixel.php | 6 +++--- commands/Spelako.php | 4 +--- resources/spelako.json | 14 +++++--------- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/SpelakoCore.php b/SpelakoCore.php index 2ec6ebc..71b9e35 100644 --- a/SpelakoCore.php +++ b/SpelakoCore.php @@ -20,10 +20,9 @@ require __DIR__.'/utils/SpelakoUtils.php'; class SpelakoCore { - const VERSION = '22w07a'; - const LAST_UPDATED = '2022/2/14'; - const DEVELOPERS = 'github.com/orgs/Spelako/people'; - const WEBSITE = 'spelako.github.io'; + const VERSION = '22w30a'; + const LAST_UPDATED = '2022/7/30'; + const WEBSITE = 'https://spelako.github.io'; private array $commands = []; private array $resources = []; diff --git a/commands/Hypixel.php b/commands/Hypixel.php index 14a3ee5..dafb21e 100644 --- a/commands/Hypixel.php +++ b/commands/Hypixel.php @@ -134,8 +134,8 @@ public function execute(array $args) { $modeName = $this->getMessage('modes.all'); } else if( - $modeName = $this->getMessage('modes.duels_'.$args[3]) - || $modeName = $this->getMessage('modes.duels_'.($args[3] .= '_duel')) + $modeName = $this->getMessage('modes.DUELS_'.strtoupper($args[3])) + || $modeName = $this->getMessage('modes.DUELS_'.strtoupper($args[3] .= '_duel')) ) { $keyAsPrefix = $args[3].'_'; $keyAsSuffix = '_'.$args[3]; @@ -146,7 +146,7 @@ public function execute(array $args) { $this->getMessage('duels.layout'), [ $rank.$p['displayname'], - isset($args[3]) ? $this->getMessage('modes.duels'.$keyAsSuffix) : $this->getMessage('modes.all'), + isset($args[3]) ? $this->getMessage('modes.DUELS'.strtoupper($keyAsSuffix)) : $this->getMessage('modes.all'), isset($args[3]) ? '' : SpelakoUtils::buildString( $this->getMessage('duels.placeholders.general_stats'), [ diff --git a/commands/Spelako.php b/commands/Spelako.php index 5c9967f..ce848f4 100644 --- a/commands/Spelako.php +++ b/commands/Spelako.php @@ -79,9 +79,7 @@ public function execute(array $args, $isStaff) { [ $this->core::VERSION, $this->core::LAST_UPDATED, - $this->core::DEVELOPERS, - $this->core::WEBSITE, - $isStaff ? $this->getMessage('default.placeholder') : '' + $this->core::WEBSITE ] ); } diff --git a/resources/spelako.json b/resources/spelako.json index 359cf60..bc50e85 100644 --- a/resources/spelako.json +++ b/resources/spelako.json @@ -32,15 +32,11 @@ }, "default": { "layout": [ - "关于 Spelako:", - "Spelako 是一个提供 Minecraft 相关查询功能的机器人.", - "当前版本为 Spelako %1$s, 上次更新于 %2$s.", - "本程序是自由软件, 你可以在 GitHub 上获取其源代码.", - "开发者: %3$s", - "了解更多请访问这里: %4$s", - "%5$s" - ], - "placeholder": "使用 /spelako help 以查看管理员命令." + "SpelakoCore %1$s (%2$s)", + "本程序是自由软件, 以 AGPLv3 许可证发布.", + "欲获取帮助文档, 源代码, 作者及版权信息等,", + "请访问 <%3$s>." + ] } } } \ No newline at end of file