bot config.properties - pumbas600/Halpbot-v1 GitHub Wiki
This property file allows you to configure different aspects of Halpbot. Depending on which adapters your bot is using, different properties may be required.
If you don't specify a value for an optional property, a default value will be used.
Note: If your config file is not named
bot-config.propertiesand not located atresources/bot-config.propertiesit won't be found by Halpbot
Example Config File
usageBuilder=nz.pumbas.halpbot.commands.usage.NameUsageBuilder
ownerId=111111111111111111
defaultPrefix=$
The various config properties are summarised below:
displayConfiguration
- default value:
nz.pumbas.halpbot.configurations.SimpleDisplayConfiguration - used by:
HalpbotCore
A fully qualified class name for the DisplayConfiguration to be used by Halpbot and is used to display messages. Along with the default SimpleDisplayConfiguration (which just displays objects directly) there is also nz.pumbas.halpbot.configurations.EmbedStringsDisplayConfiguration, which displays any strings as a MessageEmbed.
You can use your own custom DisplayConfiguration by specifying a class that implements the DisplayConfiguration interface.
ownerId
- default value: Must be specified
- used by:
HalpbotCore
The Discord id of the bot owner.
Not sure what your Discord id is? Refer to this tutorial
usageBuilder
- default value:
nz.pumbas.halpbot.commands.usage.TypeUsageBuilder - used by:
CommandAdapter
A fully qualified class name for the UsageBuilder to be used by the CommandAdapter when building commands. There are two built-in usage builders, nz.pumbas.halpbot.commands.usage.TypeUsageBuilder which builds command usage based on the type of command parameters and nz.pumbas.halpbot.commands.usage.NameUsageBuilder which uses command parameter names to build the command usage.
Note: The
NameUsageBuilderrequires parameter names to be preserved. This can be done in Gradle by adding the following to yourbuild.gradlefile:
tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
}
defaultPrefix
- default value: Must be specified if using
CommandAdapter - used by:
CommandAdapter
The default prefix that should be used by commands unless a guild-specific prefix has been set.