Skip to content

f1she3/fortnite-telegram-bot-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Telegram bot for Fortnite

Intro

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.

Features

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.

Quick guide

  • lambda/ : The code of the lambda functions
  • layers/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 as lambda/mensual-ranking/.env

Thanks