This project is a simple Telegram bot aimed at Fortnite players.
The project is built to be deployed to AWS lambda. It is built on webhooks and the API Gateway.
💵 Using the free tier, you can host a fully-featured telegram bot for free.
The bot currently serves 3 functions :
- ℹ Fetch the latest battle-royale news and posts them to a group
- 📊 Display any player's statistics
- 🥇 Provide a monthly ranking between members of a group
Feel free to fork the project, adapt it to your needs and deploy your own version of this bot to your group.
lambda/
: The code of the lambda functionslayers/python.zip
: the Lambda layer. A layer contains the dependencies required to execute your lamdba functions. Check here for more information about Lambda layers.
For every Lambda function, you should place a .env
file inside the corresponding folder :
lambda/webhook/.env
:
TELEGRAM_TOKEN = "<TELEGRAM TOKEN>"
GROUP_CHAT_ID = "<THE ID OF YOUR GROUP CHAT>"
FORTNITE_API_KEY = "<CHECK HERE https://dash.fortnite-api.com/>"
LAMBDA_WEBHOOK_ENDPOINT = "<API GATEWAY ENDPOINT (ex : https://example.execute-api.eu-west-3.amazonaws.com/default/webhook)>"
LAMBDA_WEBHOOK_TOKEN = "<API GATEWAY TOKEN>"
lambda/mensual-ranking/.env
:
TELEGRAM_TOKEN = "<TELEGRAM TOKEN>"
GROUP_CHAT_ID = "<THE ID OF YOUR GROUP CHAT>"
FORTNITE_API_KEY = "<CHECK HERE https://dash.fortnite-api.com/>"
NEWS_LANG="<LANG (ex : en)>"
lambda/fetch-fortnite-news/.env
: same aslambda/mensual-ranking/.env
- The awesome python-telegram-bot library
- Fortnite-API for their service and their cool python wrapper
- Knowledge Amplifier for their YouTube tutorial about AWS Lambda