Skip to main content

Build Telegram Bots with JavaScript: The Complete Guide

5h 28m 48s
English
Paid

Unlock the power of Telegram with our comprehensive course on building bots using JavaScript and NodeJS. Perfect for those eager to delve into the world of bot creation, this guide equips you with the tools necessary to craft interactive and functional Telegram Bots.

Course Overview

Throughout this course, you will leverage the power of JavaScript and NodeJS to create versatile Telegram Bots using the intuitive Telegraf Framework. Initially, we will tackle the basics, enabling you to understand foundational bot functions and the essential components of the framework.

The Telegram Bots You'll Build

Embark on a journey to develop seven distinct bots, each tailored to hone your skills and deepen your understanding of the Telegraf framework and Telegram Bot API.

  • Echo Bot: Reflects user input, provides help messages, and logs interactions into another chat.
  • Media Bot: Facilitates file sharing, including photos, GIFs, and documents from various sources.
  • Simple API Bot: Utilizes external APIs to send engaging content like pictures of cats or dog breeds upon request.
  • Facts Bot: Extracts and displays data from Google Sheets without the need for the Google API.
  • Crypto Bot: Retrieves up-to-date cryptocurrency data and integrates custom keyboards for interactivity.
  • Channel Bot: Automates content sharing from Instagram, Facebook, or any RSS-supported website to your channel via RSS and Zapier.
  • Search Bot: Enables inline queries to search for images or Wikipedia entries within any chat context.

Advanced Deployment Techniques

Learn to deploy your Telegram Bot using Serverless Architecture with AWS Lambda and AWS API Gateway. This approach ensures scalability and minimizes server management needs, offering cost-effective and reliable hosting solutions.

Course Benefits

By the end of the course, your skillset will include logging functionalities, file handling, API utilization, Google Sheets integration, and more. Moreover, this course provides an excellent foundation for developing more complex bots.

Detailed Course Components

Delve deeper into the specifics of each bot's functionalities and use cases in the sections provided below.

Prerequisites

Before starting this course, ensure you have:

  • A valid Telegram account
  • Basic understanding of JavaScript

Target Audience

  • Beginners interested in creating Telegram bots
  • Individuals aiming to develop complex Telegram Bot functionalities
  • Enthusiasts keen on understanding the Telegram Bot API
  • Students looking to enhance their portfolios

Key Learning Outcomes

Discover the essential skills and knowledge you'll gain upon completing the course:

  • Master the Telegraf Framework and Telegram Bot API
  • Integrate advanced bot functions like custom keyboards and inline queries
  • Develop and deploy AWS Lambda Functions with appropriate Layers
  • Create API endpoints using AWS API Gateway
  • Implement Serverless Architecture for bot deployment on AWS
  • Retrieve and process information through External APIs
  • Utilize various toolkits such as Cryptocompare, Wiki, and Pixabay
  • Access and display data from Google Sheets using JSON
  • Adopt best coding practices for modular bot development
  • Leverage RSS and Zapier for automatic content posting
  • Explore polling and webhooks in bot applications

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 129 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 129 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Introduction
All Course Lessons (129)
#Lesson TitleDurationAccess
1
Introduction Demo
02:38
2
Installing NodeJS and Visual Studio Code
01:56
3
Setting Up Workspace
01:11
4
Set Up Nodejs Project
03:05
5
Installing Packages
02:42
6
Create Bot and Bot's Token
02:33
7
About Telegram API
02:38
8
Basic Functions Introduction
01:55
9
Constructor
01:25
10
Important Commands
05:04
11
Telegraf Context
05:33
12
Bot Command Method
02:36
13
Bot Hears Method
02:58
14
Bot On Method
02:04
15
Other Methods
01:31
16
Bot Use Method
00:46
17
About Middleware
02:57
18
Next Function
01:00
19
State
02:24
20
Context Shortcuts
02:16
21
Extra Parameters
01:36
22
Echo Bot Introduction
00:58
23
Echo Bot Set-Up
01:51
24
Start and Help Commands
02:11
25
Echo Functionality
04:20
26
Logging Functionality
02:48
27
Logging Functionality 2
04:15
28
Log Information to Group Chat
03:00
29
Echo Bot Summary
02:21
30
Media Bot Introduction
00:39
31
Media Bot Set-Up
01:23
32
Working With Files
05:03
33
Send Methods
01:01
34
New York Command (Send Photo)
00:52
35
Reply To Message ID
02:11
36
Chat Action
02:24
37
Dubai Command (Send Gif/Animation)
01:26
38
Cities Command (Send Media Group)
04:24
39
List Command (Send Document)
03:01
40
Singapore Command (Send Location)
00:57
41
Get Download Link (Document)
05:09
42
Get Download Link (Photo)
01:44
43
Help Message
01:41
44
Simple API Bot Introduction
00:59
45
Simple API Bot Set-Up
01:51
46
Brief Introduction to HTTP
01:53
47
Fortune Cookie Command (Yerkee API)
03:37
48
Cat Command (Random Cat API)
05:34
49
Cat Command (Cat As A Service API)
02:23
50
Dog Breeds List Command
03:20
51
Dog Command (Exact Result)
04:58
52
Dog Command (Suggestions Filter)
03:35
53
Help Message
01:45
54
Markdown Style
02:27
55
Simple API Bot Summary
03:21
56
Facts Bot Introduction
00:50
57
Facts Bot Set-Up
01:30
58
Google Sheet Set-Up
02:15
59
Google Sheet JSON Link
02:57
60
Get Data Command
04:59
61
Fact Command
05:20
62
Update Command
02:11
63
Facts Bot Summary
01:58
64
Crypto Bot Introduction
01:14
65
Crypto Bot Set-Up
01:35
66
Inline Keyboard Markup
05:13
67
Handle Callback Query
02:31
68
Interactive Menu
05:00
69
Cryptocompare API Key
00:58
70
Start Message With Inline Keyboard
03:36
71
Price Message With Inline Keyboard
03:08
72
Back Button (Callback Query Handler)
01:50
73
Price Buttons (Callback Query Handlers)
10:34
74
Reply Keyboard Markup
04:02
75
Reply Keyboard Handlers
01:15
76
Remove Reply Keyboard
04:26
77
Channel Bot Introduction
00:58
78
Channel and Bot Set-Up
01:05
79
Understanding RSS
02:44
80
Get RSS from Instagram
01:05
81
Zapier - Create Trigger
01:30
82
Zapier - Create Action
01:27
83
Telegram Bot API
02:22
84
Zapier - Writing Fetch API
03:22
85
Get Channel Chat ID
04:20
86
Zapier - Setting InputData & Text Message
02:08
87
Remove Splash Text
01:39
88
Format Link (HTML Style)
01:52
89
Inline Keyboard Button
01:56
90
Switch On Zap!
00:42
91
Facebook - Create another Zap and RSS
03:46
92
Search Bot Introduction
01:40
93
Search Bot Set-Up and Enable Inline Mode
02:16
94
Inline Mode
03:49
95
Pixabay API
01:34
96
Handle Inline Query - Get data (Pixabay)
04:35
97
Handle Inline Query - Answer Query (Pixabay)
05:46
98
Caption & Markdown (Inline Keyboard)
03:18
99
Wikipedia API
02:19
100
Handle Inline Query - Get Data (Wiki)
03:21
101
Handle Inline Query - Answer Query (Wiki)
03:49
102
Switch Inline Query (Inline Keyboard)
01:52
103
Share Button
03:19
104
Enable Both Handlers
04:30
105
Switch Inline Query Current Chat (Inline Keyboard)
01:17
106
Start and Help Commands
04:22
107
Start and Help Inline Query
04:24
108
Set Placeholder with Botfather
01:01
109
Best Practices Introduction
00:25
110
Dotenv File Set-Up
02:10
111
Modular Folder Structure
05:14
112
Config File and Testing
02:49
113
Deployment Introduction
00:25
114
About AWS
01:33
115
Pricing (Lambda and API Gateway)
01:03
116
Polling Vs Webhooks
01:21
117
Polling Flow
01:09
118
Serverless Flow
01:27
119
Why Use Serverless?
01:31
120
Hosting Steps
00:58
121
Create Lambda Function
00:59
122
Create API Gateway Endpoint
02:39
123
Prepare Bot for Lambda - Code
03:40
124
Prepare Bot for Lambda - Layers (Node Modules)
02:57
125
Set Webhook (Bot Deployed)
02:13
126
Things to Take Note
01:31
127
Stop Webhook
00:39
128
Updating Bot
01:22
129
Delete Lambda and API Gateway
01:03
Unlock unlimited learning

Get instant access to all 128 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription