This is a simple bot example that uses the Diskord wrapper.
If you want to run this bot, create a new file named 'bot.token' in the resources folder containing only the bot's token.
See the .gitignore file to see how the file is ignored.
NEVER PUBLISH YOUR BOT TOKEN
This bot uses Spring in kotlin for easy dependency management (autowiring and bean creation etc.) *Many of the dependency versions are set in gradle.properties, and automatically used due to the settings.gradle.kts script
If you don't like Spring, you can choose to not use it of course.
Here is my recommended toolkit if you plan on making a more advanced bot:
- Dependency management: Spring
- Reactive programming: (event-based flow) Reactive [Kotlin bindings]
- Any logging facade such as Log4j, Logback, Sl4j etc..
- JSON handling: FasterXML/Jackson (or Gson). Diskord ships with Jackson.
Diskord ships with the libraries for coroutines and okhttp3 for websocket related things.
Currently Diskord does not support kotlin/native, therefore you cannot generate native binaries.