mirror of
https://github.com/InsanusMokrassar/PlaguBotBotTemplate.git
synced 2025-10-24 16:10:03 +00:00
74068b067e3353d1f27f130df0ad453a84613694
PlaguBot Bot Template
- Update your dependencies in
gradle/libs.versions.toml, and don't forget to mention them indepdendencies { ... }block ofbuild.gradleif you add new ones. Usually in gradle projects/readmes developers define names of their dependencies - Edit config. The main points
(full list of parameters with explanation):
- Change database section
- Change bot token
- Change list of plugins:
- Field
type- it is name of the plugin provided by developer/dependency - Other fields are parameters of plugin and must be provided directly
- Example is available in the example section: here
Hellois name of plugin andparameteris its configuration parameter
- Field
- Change params:
- Any key here will be available in plugins as name of param
- Any value must contains:
typeto detect which one object to instantiate- Other type parameters
- You may look into example related to database in
config:
defaultDatabaseis easily available in plugins asparams.databaseextension
How to launch
There are two main ways to launch it:
- Run
./gradlew build && ./gradlew run --args="PATH_TO_YOUR_CONFIG"with replacing ofPATH_TO_YOUR_CONFIG - Run
./gradlew buildand get zip of bot and unarchive it somewhere you need. In this archive there is an executable filesbot.bat(for windows) andbot(for linux) by the path inside of archive/bot/bin. After unarchiving you can just launch executable file with one argument: path to the config
Description
Template for simple creating of bot based on PlaguBot (https://insanusmokrassar.github.io/PlaguBot/)
Languages
Gradle
100%