prechange of readme

This commit is contained in:
InsanusMokrassar 2022-06-20 20:27:14 +06:00
parent 7bfba4ee22
commit 2af832e70c

View File

@ -1,27 +1,11 @@
# PlaguBot Bot Template
# Telegram Bot Tutorial
1. Update your dependencies [here](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/build.gradle#L27-L30). Usually in gradle projects/readmes developers define names of
their dependencies
2. Edit [config](config.json). The main points
([full list of parameters with explanation](https://github.com/InsanusMokrassar/PlaguBot/blob/master/template.config.json):
* Change [database](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#L2-L4) section
* Change [bot token](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#L5)
* Change [list of plugins](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#L6-L11):
* 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](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#L6-L11): here `Hello` is name of plugin and
`parameter` is its configuration parameter
* Change [params](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#L12-L17):
* 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](https://github.com/InsanusMokrassar/PlaguBotBotTemplate/blob/master/config.json#13): `defaultDatabase`
is easily available in plugins as `params.database` extension
This tutorial aimed to show how you may break your bot parts into different modules and run it easily change the
## How to launch
First, you need to change bot token inside of [config.json](config.json). The other parts should be described in the readmes of the modules with these parts.
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`