Skip to content

Commit df9cdf2

Browse files
Fix some mixup in naming
1 parent 6452e4c commit df9cdf2

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ _default true_
6161

6262
Allows to disable the name error on command localisation.
6363

64+
Prop: `bot.config`
65+
Env: `BOT_CONFIG`
66+
67+
Relative path to the configuration file.
6468

6569
[nexus_releases]: https://eldonexus.de/#browse/browse:maven-releases:de%2Fchojo%2Fcjda-util
6670
[nexus_snapshots]: https://eldonexus.de/#browse/browse:maven-snapshots:de%2Fchojo%2Fcjda-util

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ license {
3737
}
3838

3939
group = "de.chojo"
40-
version = "2.10.0+jda-" + libs.versions.jda.get()
40+
version = "2.10.1+jda-" + libs.versions.jda.get()
4141
description = "Discord utilities for use with JDA"
4242

4343
publishData {

src/main/java/de/chojo/jdautil/configuration/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private void forceConsistency() throws IOException {
8484
private Path getConfig() {
8585
var home = new File(".").getAbsoluteFile().getParentFile().toPath();
8686
var variable = SysVar.envOrPropOrThrow("BOT_CONFIG", "bot.config",
87-
() -> new ConfigurationException("set property -Dbot.config=<config path> or environment variable BOT_CONFIG."));
87+
() -> new ConfigurationException("Set property -Dbot.config=<config path> or environment variable BOT_CONFIG."));
8888
log.info("Found variable for config file");
8989
return Paths.get(home.toString(), variable);
9090
}

src/main/java/de/chojo/jdautil/util/ArrayUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static Matcher findInArray(String[] strings, Pattern contains) {
4040
}
4141

4242
/**
43-
* Checks if a array contains any of the values.
43+
* Checks if an array contains any of the values.
4444
*
4545
* @param strings string to check
4646
* @param values one or more value to check against
@@ -56,10 +56,10 @@ public static boolean arrayContains(String[] strings, String... values) {
5656
}
5757

5858
/**
59-
* Checks if a array contains any of the values.
59+
* Checks if an array contains any of the values.
6060
*
6161
* @param chars chars to check
62-
* @param values one or more value to check agains
62+
* @param values one or more value to check against
6363
* @return true if a match was found
6464
*/
6565
public static boolean arrayContains(char[] chars, char... values) {

src/main/java/de/chojo/jdautil/util/SysVar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public static <T extends Exception> String getOrThrowChecked(String property, St
2121
return get(property, environment).orElseThrow(throwableSupplier);
2222
}
2323

24-
public static <T extends Exception> String envOrPropOrThrow(String property, String environment, Supplier<T> throwableSupplier) throws T {
25-
return envOrProp(property, environment).orElseThrow(throwableSupplier);
24+
public static <T extends Exception> String envOrPropOrThrow(String env, String prop, Supplier<T> throwableSupplier) throws T {
25+
return envOrProp(env, prop).orElseThrow(throwableSupplier);
2626
}
2727

2828
public static <T extends Exception> String propOrEnvOrThrow(String property, String environment, Supplier<T> throwableSupplier) throws T {

0 commit comments

Comments
 (0)