/telegram-serverless-ts-bot-tutorial

Telegram Typescript Serverless Bot Tutorial

Primary LanguageTypeScriptMIT LicenseMIT

Telegram Typescript Serverless Bot Tutorial

GitHub

Blogpost | YouTube

In this tutorial, we will explore how to build a simple Telegram bot using serverless with TypeScript and AWS Lambda. We’ll leverage the power of AWS services such as API Gateway and DynamoDB to create a highly scalable and efficient bot. While there are various tutorials available online, this guide aims to provide a more comprehensive and detailed approach.

Run npm

$ npm i

Deploy the bot CF stack:

$ ./node_modules/.bin/serverless deploy

CURL command for setting the webhook for the bot: (URL given by the serverless deploy output)

$ curl --request POST --url "https://api.telegram.org/bot<BOT_TOKEN>/setWebhook" --header 'content-type: application/json' --data '{"url": "<URL>"}'

Code Walkthrough Video

Code Walkthrough on YouTube