Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ratio1 Telegram Bot Demo

Demo Telegram bot built on Ratio1, starting from the ratio1_tg_bot template.

Features

  • /roll: rolls a dice between 1 and 6.
  • /watch_api <api_url>: subscribes the user to health monitoring for an API. The bot asks for a health endpoint, defaults to /health when the user confirms, validates the final URL, then monitors each unique API endpoint globally every 5 minutes.
  • Persists how many times each user rolled in local bot storage.
  • Every hour, all users that interacted with the bot receive a lucky number between 1 and 100.
  • /ver: prints current bot version.

Required environment variables

  • RATIO1_NODE
  • TELEGRAM_BOT_TOKEN

Deploy/update with GitHub Actions

Workflow: .github/workflows/cd-update-bot.yml

The workflow is triggered by pushes to main when ver.py changes and executes:

python3 ratio1_tg_bot_demo.py

using Ratio1/ratio1-setup-action@v1 with repository secrets.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages