Build Telegram Bots with JavaScript: The Complete Guide

5h 28m 48s
English
Paid
April 18, 2024

Telegram is a cloud-based instant messaging app that provides API to developers to create bots that interact with users. This course aims to provide you with complete set of knowledge on how to build amazing Telegram Bots.

More

In this course, you will be using JavaScript and NodeJS to create Telegram Bots using an EASY-TO-LEARN Modern Framework called Telegraf.

First you will be learning the basic bot functions where you will understand the fundamental building blocks of the framework.

Next we will learn how to build 7 different bots, each focusing on a specific area that will allow you to familiarize yourself with the framework and Telegram Bot API.

The 7 Bots that you will build:

  • Echo Bot - Echos what you type, provides users with a help message, and has logging feature to log information into another chat.

  • Media Bot - Work with files like sending photos, Gifs, and documents from your computer, URL or File ID.

  • Simple API Bot - Invoke external APIs to send users a random fortune cookie, a random image of a cat, an image with a text message that you typed, get an image of a specific dog breed.

  • Facts Bot - Retrieve data from a Google Sheet and output it to the bot without using Google API.

  • Crypto Bot - Retrieves Cryptocurrency information and you will learn how to create interactive menus in your bot using custom keyboards.

  • Channel Bot - Uses RSS and Zapier to automatically send Instagram or Facebook posts into your channel, and this also works for any website that supports RSS.

  • Search Bot - Supports inline query so that anyone in any chat can send an inline query to the bot to search for images or Wikipedia pages.

Finally we will learn how to deploy our bot using the Serverless Architecture with AWS Lambda and AWS API Gateway. The Serverless Architecture will allow your bot to scale automatically and you do not have to worry about it crashing when there are too many users. You also do not have to worry about managing your own server and it is also free and extremely cheap to host with AWS Lambda.

All the bot scripts and codes will be available for you to download and use to maximize your learning and gain the most from the course.

At the end of the course, you will know how to do simple logging into a group chat, send different types of files, use external API, read Google Sheets, create custom keyboards with interactive menus, handle inline queries, and automatically post content from websites like Instagram and Facebook into your channel and many more.

This course also gives you a good stepping stone for you to explore deeper into building more complex bots.

If you would like to see in detail what each bot does, you can check out the sections below.

Requirements:
  • Telegram Account
  • Basic JavaScript
Who this course is for:
  • Beginners who are curious to create Telegram bots
  • Anyone who want to create Telegram Bots with complex functions
  • Anyone who wants to understand and learn Telegram Bot API
  • Students who want to expand their portfolio with Telegram bots

What you'll learn:

  • You will learn Telegraf Framework and Telegram Bot API
  • Basic Bot Functions such as commands, middlewares, context shortcuts, and working with files
  • Learn to implement advanced Telegram Bot API features such as custom keyboards, inline query, switch inline query
  • Learn to create AWS Lambda Function with Layers
  • Learn to use AWS API Gateway to create endpoints
  • Deploy Telegram Bots with Serverless Architecture on AWS
  • Learn to call External APIs and return the processed information to users with bots
  • Learn various APIs such as Cryptocompare, Wiki, Pixabay, and Cat-as-a-service
  • Learn to get data from Google Sheet using JSON
  • Learn Best Practices when coding Telegram Bots such as making the code modular
  • Learn to use RSS and Zapier to create an automatic Channel Posting Bot
  • Learn about Polling and Webhooks

Watch Online Build Telegram Bots with JavaScript: The Complete Guide

Join premium to watch
Go to premium
# Title Duration
1 Introduction 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

Similar courses to Build Telegram Bots with JavaScript: The Complete Guide

Build a Shopping Cart App

Build a Shopping Cart AppReed Barger

Duration 1 hour 41 minutes 52 seconds
Remake Retro Games with JavaScript

Remake Retro Games with JavaScriptudemy

Duration 7 hours 5 minutes 41 seconds