Template for simple creating of bot based on PlaguBot (https://insanusmokrassar.github.io/PlaguBot/)
Go to file
2024-10-10 10:37:29 +00:00
.github/workflows Update build.yml 2024-08-14 16:45:53 +06:00
gradle Update kotlin monorepo to v2.0.21 2024-10-10 10:37:29 +00:00
_config.yml Set theme jekyll-theme-cayman 2020-11-12 13:33:09 +06:00
.gitattributes Initial commit 2020-11-12 13:08:07 +06:00
.gitignore update dependencies 2024-08-14 16:35:15 +06:00
build.gradle Update build.gradle 2022-11-28 18:25:08 +06:00
config.json update template 2022-06-17 00:36:25 +06:00
gradle.properties update template 2022-06-17 00:36:25 +06:00
gradlew Initial commit 2020-11-12 13:08:07 +06:00
gradlew.bat Initial commit 2020-11-12 13:08:07 +06:00
LICENSE Initial commit 2020-11-12 13:08:07 +06:00
README.md Adjusted README for deps declared in toml 2023-09-11 17:21:07 +03:00
renovate.json Add renovate.json 2024-09-06 10:37:23 +00:00
settings.gradle fill 2020-11-12 13:28:59 +06:00

PlaguBot Bot Template

  1. Update your dependencies in gradle/libs.versions.toml, and don't forget to mention them in depdendencies { ... } block of build.gradle if you add new ones. Usually in gradle projects/readmes developers define names of their dependencies
  2. 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 Hello is name of plugin and parameter is its configuration parameter
    • Change params:
      • Any key here will be available in plugins as name of param
      • Any value must contains:
        • type to detect which one object to instantiate
        • Other type parameters
      • You may look into example related to database in config: defaultDatabase is easily available in plugins as params.database extension

How to launch

There are two main ways to launch it:

  • Run ./gradlew build && ./gradlew run --args="PATH_TO_YOUR_CONFIG" with replacing of PATH_TO_YOUR_CONFIG
  • Run ./gradlew build and get zip of bot and unarchive it somewhere you need. In this archive there is an executable files bot.bat (for windows) and bot (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