A rewrite of the emergencyfood bot in Kotlin
Looking for the original project? Find it here.
Main:
Version 1.7.13:
Configuration is possible through 3 methods
- A
botConfig.json
file - Environment Variables
The bot will attempt to load a config from each of these methods in this order. Failure to load any config will prevent the bot from launching.
An example can be found here
Note:
The following method only allows for more basic configurations than the other methods. Consider using
botConfig.json
orconfig,bot.kts
if you need more control over the configuration.
The following environment variables are required:
TOKEN
: This is the token used when the bot launches on a stable channel
TOKEN_BETA
: This is the token used when the bot launches on a stable channel
BOT_OWNER
: This is the id of the discord user owning the bot and is used for the admin commands
The following environment variables are optional:
CHANNEL
: This represents the channel on which the bot should be running.
It's value may only be STABLE
, BETA
or LOCAL
.
If this is missing or does not match a valid value the bot will default to STABLE
EXCLUSIONS
: This represents the commands to be excluded. The values to pass are the
command names separated by a space.
Download a release from the releases page
-
Clone the repository with
git clone https://github.com/Vincentvibe3/emergencyfood-v2.git
-
Build from source with
./gradlew build
-
The produced binary will be under
build/libs/Emergencyfood-<version>.jar
Use java -jar <Location of the jar>
to start the bot