Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Peaksol authored and Peaksol committed Jul 30, 2022
1 parent d2a7550 commit 82f0e9e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
7 changes: 3 additions & 4 deletions SpelakoCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
6 changes: 3 additions & 3 deletions commands/Hypixel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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'),
[
Expand Down
4 changes: 1 addition & 3 deletions commands/Spelako.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
);
}
Expand Down
14 changes: 5 additions & 9 deletions resources/spelako.json
Original file line number Diff line number Diff line change
Expand Up @@ -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>."
]
}
}
}

0 comments on commit 82f0e9e

Please sign in to comment.