Skip to content

Commit

Permalink
Vinyl shardcount in config added
Browse files Browse the repository at this point in the history
  • Loading branch information
Strafbefehl committed May 30, 2023
1 parent 0a06ff8 commit 7be8e63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>rystudio.strafbefehl.vinyl</groupId>
<artifactId>core</artifactId>
<version>1.0.38-RELEASE</version>
<version>1.0.39-RELEASE</version>
<packaging>jar</packaging>
<name>Vinyl-Core</name>

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/rystudio/strafbefehl/vinyl/utils/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public void makeConfig() throws IOException {
PrintWriter bufferedWriter = new PrintWriter(new FileWriter(this.file));
bufferedWriter.println(ConfigSettings.TOKEN.label);
bufferedWriter.println(ConfigSettings.BOTID.label);
bufferedWriter.println(ConfigSettings.SHARD.label);
bufferedWriter.println("# Database Settings");
bufferedWriter.println(ConfigSettings.USE_MYSQL.label);
bufferedWriter.println(ConfigSettings.DB_HOST.label);
Expand Down Expand Up @@ -59,6 +60,7 @@ public void loadConfig() throws IOException {
}
break;
case BOTID:
case SHARD:
case USE_MYSQL:
case DB_HOST:
case DB_PORT:
Expand All @@ -80,6 +82,9 @@ public String getBotID() {
return settingsValues.get(ConfigSettings.BOTID);
}

public String getShardCount() {
return settingsValues.get(ConfigSettings.SHARD);
}

public boolean getUseMysql() {
return Boolean.parseBoolean(settingsValues.get(ConfigSettings.USE_MYSQL).isBlank() ? "false" : settingsValues.get(ConfigSettings.USE_MYSQL));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public enum ConfigSettings {

TOKEN("token="),
BOTID("botid="),
SHARD("shard="),
USE_MYSQL("use_mysql="),
DB_HOST("db_host="),
DB_PORT("db_port="),
Expand Down

0 comments on commit 7be8e63

Please sign in to comment.