-
Find the bot on Telegram.
Bot handle: @zerowastesgbot
-
Press
/start
.If the
/start
button is not available for you, you can use it as a command (sending it as a message). -
Enter a suitable interval.
When prompted for an interval, enter a suitable number.
For demonstration purposes, we recommended setting it a very small number like
0.001
.Note: Interval here is in hours (0.001 hours = 0.001 * 3600 =
3.6 seconds
). -
Confirm the suitable interval.
The bot will allow you to modify your input in the event of a mistake.
It will also check that your input is a valid input (
valid number
in this case).Once you are satisfied with your interval, press Confirm to proceed.
-
Start the bot.
You will be presented with a choice whether to start the bot or not.
Press
Yes
to begin the reminders. -
Use
/stop
to stop the bot. -
Use
/start
again if you wish to modify your interval.Note that this will stop the bot similar to
/stop
.
-
Dependencies:
$ python -m pip install -r requirements.txt # or if pip is already in your PATH $ pip -r requirements.txt
Additionally you can create a virtual environment for your project:
$ python -m venv venv # Unix $ source venv/bin/activate # Same command as before # Windows $ .\venv\Scripts\activate.bat
-
config.yaml
:You will also need to supply a
config.yaml
file.
The following values have be configured in the file:# ---------------------------------- RUNTIME --------------------------------- # RUNTIME: LIVE_MODE: false FRESH_START: false # -------------------------------- BOT CONFIG -------------------------------- # BOT_TOKENS: LIVE: "" TEST: "" BOT: REMOVE_INLINE_KEYBOARD_MARKUP: true # -------------------------------- LOG CONFIG -------------------------------- # LOG_USER_TO_APP_LOGS: false
-
Create a Telegram bot with BotFather.
After successfully creating your bot, copy the
BOT TOKEN
.Set
config.yaml -> BOT_TOKENS -> LIVE/TEST
to be the token. -
Run the bot.
$ python main.py
You may need to activate
venv
if you have set it up in the earlier steps.