From eac21375e8ee96b9d23ebf1fe3f801bba6d1afd1 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sat, 9 Jan 2021 08:10:52 +0100 Subject: [PATCH] doc: config moved --- dev/make-distribution.sh | 4 ++-- doc/0_install.md | 11 ++++++++--- doc/2_usage.md | 6 ++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index a5d2f04..b2d673e 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -7,7 +7,7 @@ # # Options: --notest - skip tests # -#### $$VERSION$$ v1.25-dev-35-gfa8e8a2 +#### $$VERSION$$ v1.25-dev-42-gde24ded ############################################################## # magic to ensure that we're always inside the root of our application, @@ -27,7 +27,7 @@ DISTDIR="./DIST/${DISTNAME}" DISTMKDIR="data-bot-bash logs bin bin/logs addons" DISTFILES="bashbot.sh commands.sh mycommands.sh.clean bin doc examples scripts modules LICENSE README.md README.txt README.html" -DISTFILESDIST="mycommands.sh bashbot.rc $(echo "addons/"*.sh)" +DISTFILESDIST="mycommands.sh mycommands.conf bashbot.rc $(echo "addons/"*.sh)" # run tests first! for test in $1 dev/all-test*.sh diff --git a/doc/0_install.md b/doc/0_install.md index 8032701..5972732 100644 --- a/doc/0_install.md +++ b/doc/0_install.md @@ -28,10 +28,11 @@ Installing bashbot is very simple: Download and extract the installation archive 1. Choose a directory to install bashbot (_e.g.your HOME or /usr/local_) 2. Download [latest release zip / tar archive](https://github.com/topkecleon/telegram-bot-bash/releases/latest) and extract all files. 3. Change into the directory `telegram-bot-bash` +4. Copy `mycommands.conf.dist` `mycommands.conf` 4. Copy `mycommands.sh.dist` or `mycommands.sh.clean` to `mycommands.sh` 5. Run `./bashbot.sh init`\* to setup the environment and enter your Bots token given by botfather. -Edit `mycommands.sh` to fit your needs. +Edit config in `mycommands.conf` and commands in `mycommands.sh` to fit your need. Now your Bot is ready to start ... *If you are new to Bot development read [Bots: An introduction for developers](https://core.telegram.org/bots)* @@ -51,7 +52,7 @@ Update bashbot is almost identical to installing bashbot: Download and extract t 5. Run `./bashbot.sh init`\* to setup your environment after the update 6. Restart your bot `./bashbot.sh start` -`mycommands.sh` will not overwritten, this avoids losing your bot commands on updates. +`mycommands.conf` and `mycommands.sh` will not overwritten, this avoids losing your bot config and commands on updates. *Note*: If you are updating from a pre-1.0 version, update to [Version 1.20](https://github.com/topkecleon/telegram-bot-bash/releases/tags/v1.20) first! @@ -120,6 +121,10 @@ to get an impression how different they are. ### Notes on Changes +#### Config moved to mycommands.conf + +From Version 1.30 on config for new bots is moved to `mycommands.conf`. + #### Support for update from pre-1.0 removed From Version 1.21 on updating from a pre-1.0 version (_no \*.jssh config_) is no more supported! @@ -127,5 +132,5 @@ You must update to [Version 1.20](https://github.com/topkecleon/telegram-bot-bas #### [Next Create Bot](1_firstbot.md) -#### $$VERSION$$ v1.25-dev-23-g8be95a3 +#### $$VERSION$$ v1.25-dev-42-gde24ded diff --git a/doc/2_usage.md b/doc/2_usage.md index 5e4f4e7..fae09b1 100644 --- a/doc/2_usage.md +++ b/doc/2_usage.md @@ -19,8 +19,10 @@ Have FUN! ``` . ├── mycommands.sh # THIS is your bot, place logic and commands here! +├── mycommands.conf # place your bot config and bot messages here! │ -├── mycommands.sh.clean # copy to "mycommands.sh" if you start developing your bot +├── mycommands.conf.dist # copy to "mycommands.conf" if not exist +├── mycommands.sh.clean # copy to "mycommands.sh" to start developing a new bot ├── mycommands.sh.dist # example bot, also used for testing bashbot internally │ ├── count.jssh # count bashbot usage in jssh key-value store @@ -344,5 +346,5 @@ send_action "${CHAT[ID]}" "action" #### [Prev Create Bot](1_firstbot.md) #### [Next Advanced Usage](3_advanced.md) -#### $$VERSION$$ v1.25-dev-26-gc205ae5 +#### $$VERSION$$ v1.25-dev-42-gde24ded