diff --git a/README.md b/README.md index a83352b3..315911a0 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ You can also add the bot to a group if multiple people need to access this bot. ## Support the project -I am currently a broke university student, if you like my work and use it on a daily basis consider supporting the project through a small donation. :smile: +If you like `BTB-manager-telegram` and use it on a daily basis consider supporting the project through a small donation. :smile: [:heart: Sponsor on GitHub](https://github.com/sponsors/lorcalhost) diff --git a/custom_scripts/.gitkeep b/custom_scripts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docs/custom-scripts.md b/docs/custom-scripts.md index e3fe0848..d9029ad6 100644 --- a/docs/custom-scripts.md +++ b/docs/custom-scripts.md @@ -19,7 +19,7 @@ For example if one wants a button called `List files` which executes the `ls -la } ``` -Multiple scripts can be setup by adding a new line to the json file like so: +Multiple scripts can be setup by adding a new line to the json file like so (note the `,` when adding a new line): ```json { @@ -27,3 +27,39 @@ Multiple scripts can be setup by adding a new line to the json file like so: "List files 2": "ls -la -R" } ``` + +## Further information + +By default, all scripts are executed from within `BTB-manager-telegram`'s directory. + +It is recommended to use the `custom_scripts` directory in order to avoid confusion: + +```bash +cd /path/to/the/BTB-manager-telegram/custom_scripts +``` + +## Example custom script installation + +Create a script in a file called `custom_progress.sh` inside the `custom_scripts` directory, you can use this [example script](https://discord.com/channels/811277527997087745/818862057704390700/851190591454314539) from our Discord server. + +Make the script executable by giving execute permissions: + +```bash +chmod +x custom_progress.sh +``` + +In our example, the script uses `sqlite3`, so it is necessary to install it via system package manager: + +```bash +sudo apt install sqlite3 +``` + +Now we need to modify `custom_scripts.json` (it is located at `~/BTB-manager-telegram/config/custom_scripts.json`): + +```json +{ + "Custom Progress": "custom_scripts/custom_progress.sh" +} +``` + +Do not forget to restart `BTB-manager-telegram` bot so the changes will be applied. diff --git a/docs/telegram-setup.md b/docs/telegram-setup.md index 8044d71c..737f1f0e 100644 --- a/docs/telegram-setup.md +++ b/docs/telegram-setup.md @@ -24,7 +24,7 @@ urls: ``` Note: -_Binance Trade Bot Manager Telegram_ you can also decide to put a group chat id instead of a personal `chat_id`. +_Binance Trade Bot Manager Telegram_ also supports usage of a group chat id instead of a personal `chat_id`. [@botfather]: https://t.me/botfather [@userinfobot]: https://t.me/userinfobot