@dailyWord_bot (Check it, it's live 🌐)
This repository contains the source code for @dailyWord_bot, a Telegram Bot that eases learning new words & expressions in German and Spanish.
@dailyWord_bot will send you daily words with examples with a set of sentence examples. You can as well mark/unmark the words that you already know so they won't appear anymore.
The words data bank is updated dynamically with the will of collaborators via a Google Spread Sheet. Do not hesitate reaching out to collaborate! 😊
Just open Telegram and start a conversation with @dailyWord_bot
| What | Tech |
|---|---|
| development | python |
| database | redis |
| deployment | AWS Lambda, Terraform, Docker |
| scheduled tasks | AWS EventBridge (CloudWatch Events) |
| CI | Github Actions to enforce merge checks for tests, static analysis & coverage |
The bot is deployed on AWS using Terraform for infrastructure as code. The infrastructure includes:
- webhook Lambda: Handles incoming Telegram webhook requests
- scheduler Lambda: Runs scheduled tasks (e.g., updating word bank)
The scheduler Lambda is triggered daily at 12:30 PM UTC using AWS EventBridge (CloudWatch Events) with a cron expression: cron(30 12 * * ? *)
Note: AWS EventBridge cron expressions use UTC timezone. To schedule for a different timezone:
- 12:30 PM UTC = 1:30 PM CET (Central European Time)
- 12:30 PM UTC = 2:30 PM CEST (Central European Summer Time)
-
Build the deployment package:
make build
-
Deploy infrastructure with Terraform:
make deploy
-
Set up required environment variables in
terraform.tfvars:bot_token = "your-telegram-bot-token" admin_chat_ids = "comma,separated,admin,ids"