-
-
Couldn't load subscription status.
- Fork 2.7k
Advanced Config Options
Setting a different file to use as the config file is possible via the -Dconfig=/path/to/config.file command-line option. For example:
java -Dconfig=alternate_config.txt -jar JMusicBot.jarwill run the bot, loading from alternate_config.txt instead of config.txt.
Similar to the -Dconfig option, any setting in the config file can also be set from the command line. For example, to set the prefix from the command line (instead of from the config), you would use -Dprefix="!!" (values need to be quoted if they contain spaces or some special characters). For example:
java -Dprefix="!" -jar JMusicBot.jarTo use environment variables for the config, there are two options. For the following examples, assume that a prefix has been set to the environment variable CUSTOM_PREFIX.
To use environment variables from the command line, use the same system from above, but substitute in a resolved variable name. For example:
java -Dprefix="$CUSTOM_PREFIX" -jar JMusicBot.jarTo use an environment in the config file, specify it as follows
// this is in the config file
prefix = ${CUSTOM_PREFIX}