Skip to content

Commit

Permalink
不具合修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kosugikun committed Dec 17, 2021
1 parent f502d8b commit b4a2b95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/jagrosh/jmusicbot/BotConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public BotConfig(Prompt prompt) {
public void load() {
valid = false;

// read config from file
// ファイルからの設定の読み込み
try {
// get the path to the config, default config.txt
// 設定のパスを取得(デフォルトはconfig.txt)
path = OtherUtil.getPath(System.getProperty("config.file", System.getProperty("config", "config.txt")));
if(path.toFile().exists())
{
Expand All @@ -81,11 +81,11 @@ public void load() {
ConfigFactory.invalidateCaches();
}

// load in the config file, plus the default values
// 設定ファイルにロードされ、デフォルト値が追加される
//Config config = ConfigFactory.parseFile(path.toFile()).withFallback(ConfigFactory.load());
Config config = ConfigFactory.load();

// set values
// 設定値
token = config.getString("token");
prefix = config.getString("prefix");
altprefix = config.getString("altprefix");
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/jagrosh/jmusicbot/JMusicBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public static void main(String[] args) {
// Admin
add(new PrefixCmd(bot));
add(new SetdjCmd(bot));
add(new SkipratioCmd(bot));
add(new SettcCmd(bot));
add(new SetvcCmd(bot));
add(new AutoplaylistCmd(bot));
Expand All @@ -194,7 +195,7 @@ public static void main(String[] args) {
add(new SetstatusCmd(bot));
add(new PublistCmd(bot));
add(new ShutdownCmd(bot));
add(new LeaveCmd(bot));
//add(new LeaveCmd(bot));
}};

cb.addCommands(commandList.toArray(new Command[0]));
Expand Down

0 comments on commit b4a2b95

Please sign in to comment.