Skip to content

stchristian/serverless-ts-telegram-bot-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Telegram Bot Template (TypeScript)

Welcome to the Serverless Telegram Bot Template project! 🚀

This template provides a starting point for developing Telegram bots using the Serverless framework and TypeScript. Building serverless Telegram bots allows you to focus on the bot's functionality without the hassle of managing server infrastructure.

Features

  • Serverless Framework: Utilize the power of the Serverless Framework for deploying and managing your serverless architecture effortlessly.
  • TypeScript Support: Develop your Telegram bot using TypeScript, ensuring a more robust and maintainable codebase.
  • Telegram API Integration: Easily communicate with the Telegram API to create interactive and dynamic bot experiences.
  • Out of the box support for parameter validation with the help of Yup schema validation. Parameters that include multiple words can be put in quotes.

Steps

  1. You must have serverless framework already installed and AWS credentials properly set up. If you don't have it, see here
  2. Use this template to create a new service with the following command
serverless create \
--template-url https://github.com/stchristian/serverless-ts-telegram-bot-template \
--path myNewTelegramBot
  1. Configure telegram token
  2. Set up necessary variables so they are available in the environment (TELEGRAM_TOKEN, TELEGRAM_API_BASE_URL). Use serverless parameteres for the variables. For that you'll need to connect this project to Serverless Dashboard
  3. Add your commands in /src/commands.ts
  4. Run serverless deploy
  5. Copy the url of the endpoint in the console. Set up the webhook endpoint for Telegram API
  6. Send /ping to your bot!

Contributing

If you have ideas for improvements or additional features, feel free to contribute and create a pull request!

Happy coding! 🤖✨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published