Тёмный

Building a Telegram Bot with Node.js in 10 minutes 

dpiTech
Подписаться 1 тыс.
Просмотров 63 тыс.
50% 1

We are building a very basic Telegram Bot using Node.js, JavaScript and Telegram's Bot API. This tutorial will teach you to
- create a Telegram Bot using the @Botfather account
- use ngrok to develop the bot on a localhost
- setup a Telegram webhook
- receive messages from Telegram using a webhook
- sending messages using the sendMessage API
#telegram #telegrambot #nodejs #node #javascript #bot #tech #coding #programming #tutorial
Github repository
github.com/dpi...
My Twitter
/ pichsenmeister
My website
pichsenmeister...
▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪▫▪
Music used in this video 🎼🎶🎵
Funky Element by Bensound
www.bensound.c...

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 62   
@stxnw
@stxnw 2 года назад
thank u for not telling us what axios, express, and nodemon is for :) i loveee bloat
@BackUp-cz6zn
@BackUp-cz6zn Год назад
i have been trying to do this with python for three hours with no luck. all of the videos were 26-35 minutes videos and less that 6 months ago,but still the code was erroring because of deprecated field or straight up python weirdness.unlike your video.although it was posed last year it still works perfectly, not to mention it's short and to the point.thanks alot man you saved me.
@underworld-of-gaming
@underworld-of-gaming Месяц назад
I'm building a Telegram web app using mern stack, I want that whenever any telegram user opens my telegram bot webapp then I should get his user id in my project, If anyone knows please tell me it will be very helpful 🙏
@michaelvigato3228
@michaelvigato3228 2 года назад
Wow man, fast and quick to the point to easily jumpstart a fun small bot! Super appreicated
@j.k.ravshanovich
@j.k.ravshanovich 2 года назад
How do you use it with database?
@gnaneshmk5397
@gnaneshmk5397 3 года назад
Hii, I've made into few minutes of the tutorial, but getting an error when I try to set up the webhook "Request failed with status code 401". Can someone help? Thanks
@dpitech
@dpitech 3 года назад
That might be because you're providing an invalid API key: core.telegram.org/api/errors Make sure to copy the right key from Botfather and that the environment variable is set up and read correctly from your .env file
@pankajbhadane
@pankajbhadane 3 года назад
how can i fetch users First name and send reply to him + first name
@dpitech
@dpitech 3 года назад
you can grab the first_name from the webhook update payload, located under message.from.first_name. so instead of const text = req.body.message.text you would do const text = req.body.message.from.first_name
@mikayilaliyev442
@mikayilaliyev442 2 года назад
When you send a GIF it throws an error: (node:3004) UnhandledPromiseRejectionWarning: Unhandled promise rejection.
@derellstv
@derellstv 2 года назад
Please help I'm getting the "UnhandledPromiseRejectionWarning"
@ggbin8092
@ggbin8092 13 дней назад
Well done
@ashin6142
@ashin6142 2 года назад
Build a simple script to post a random Wikipedia article along with the summary to a telegram group. Fetch the random wiki page using their API. how to do this task?
@speedtnt7591
@speedtnt7591 2 года назад
I will still appreciate if you show us how to make a managing bot like recognizing the owner and admins and we can send some comments like ban or locking some features.... Stuff like that
@jeetchheda3675
@jeetchheda3675 Год назад
Bro, it all worked out for me, but for some reason on my live server, the response sent back is too slow.😢
@Olejka0007
@Olejka0007 3 года назад
Absolutely helpful, thanks :)
@justyouraveragefox3561
@justyouraveragefox3561 2 года назад
This was so useful, thank you so much!
@0xhiro
@0xhiro 2 года назад
I was able to use this tutorial to build a chatbot in golang with zero javascript. Thanks!!!
@michaelodera2523
@michaelodera2523 2 года назад
I am able to set up everything but cannot fetch and log the message sent on the console
@nightowl1596
@nightowl1596 2 года назад
Im trying to deploy this but find no result so far :(
@shazahamed1798
@shazahamed1798 2 года назад
How. Can I send a telegram document with this method
@karemabdul8644
@karemabdul8644 3 года назад
Si Zebedee maayo kaayo aning Node.js , ka workmate nako.
@tako_ua
@tako_ua 2 года назад
O kurwa. Why in all video guides i am doing everything correct and having some unknown problems, which isn't showed in video. Now when i am running "npm run dev" i got "missing script: dev" but there are "dev": "nodemon index.js" in "package.json"
@nuny-vega
@nuny-vega 2 года назад
you missed npm i --save-dev nodemon
@shaikhsanah3087
@shaikhsanah3087 2 года назад
Thank you for this tutorial!! Can you also make tutorial on how to use inline keyboards of telegram?
@rebazomarsoftwaredeveloper7811
realy awesome , thank you save my time
@Vadym_S
@Vadym_S Год назад
Thx from Ukraine,bro!
@speedtnt7591
@speedtnt7591 2 года назад
May you keep it up and show us how to make a bot for managing a group?
@Mike-xr1fk
@Mike-xr1fk 3 года назад
so helpful, Thanks! what footage did you use in your background video? please share the download link. thanks again :)
@dpitech
@dpitech 3 года назад
thanks! what footage are you referring to?
@rfz6234
@rfz6234 3 года назад
@@dpitech I think he meant the background with the stars...
@dpitech
@dpitech 3 года назад
@@rfz6234 ahh, I think I used this one here: pixabay.com/videos/particles-stars-twinkling-movement-323/
@speedtnt7591
@speedtnt7591 2 года назад
A managing group bot please?
@phobos2830
@phobos2830 3 года назад
how if i didnt using ngrok but glitch?
@dpitech
@dpitech 3 года назад
You can totally use Glitch instead of ngrok. I used Glitch for more than a year, but eventually walked away from it because I prefer my VSCode editor, you can't create private projects on the free plan anymore and it became quite slow in "waking up" (both for the editor and the hosting). Another option would be repl.it, but I didn't try that one yet.
@phobos2830
@phobos2830 3 года назад
@@dpitech ah okay thank you
@dpitech
@dpitech 3 года назад
If you want to build something on glitch, you can import the project on glitch from github (github.com/dpiTech/build-a-telegram-bot) or just clone this glitch project: glitch.com/~build-a-telegram-bot
@Mahdi_Ashouri
@Mahdi_Ashouri 2 года назад
amazing model for teaching things for video i go learn this for my self 😅😉
@zamora322
@zamora322 Год назад
I love it, thanks for sharing.
@charityyoung9407
@charityyoung9407 2 года назад
Can you create a call bot
@0xyz
@0xyz 3 года назад
Thanks for this, How do I prevent my bot from replying to every message when added to a group
@TFCMahmoud
@TFCMahmoud 2 года назад
if you want only a specific person just filter his id and check if the message from id is the same as the id you want
@alirazzaq1541
@alirazzaq1541 2 года назад
thanks, man. really helpful
@CarlosHerreraJugovie
@CarlosHerreraJugovie 2 года назад
Thanks broth...!!! :)
@ahmedfayruz658
@ahmedfayruz658 Год назад
Lesgo man!!
@vmailtk5
@vmailtk5 2 года назад
ty
@c4ex_net
@c4ex_net 2 года назад
thank you
@dirtstyles
@dirtstyles 3 года назад
Code is different on your Github to the tutorial bro?
@dpitech
@dpitech 3 года назад
sorry for that. I was working off a different local branch when recording the video. Updated the code in the repository to match the tutorial. Thanks for pointing that out!
@afiq980
@afiq980 Год назад
Thanks!
@amibangladeshi4031
@amibangladeshi4031 3 года назад
how to get referral list?
@shyngysbatyrbayev7596
@shyngysbatyrbayev7596 2 года назад
very useful, cheers:)
@muslim101f
@muslim101f 3 года назад
That was pretty straight to the point! But do you know why telegram isn't sending me any post message? I've already set the webhook and followed all the steps, but don't know why it doesn't give any response when sending a message tho.
@muslim101f
@muslim101f 3 года назад
Oh it works now :D Again, really so grateful!
@መፅሃፍቶቻችን
@መፅሃፍቶቻችን 3 года назад
@@muslim101f how did you fix it? I am facing the same problem
@muslim101f
@muslim101f 3 года назад
@@መፅሃፍቶቻችን for me the ngrok link was invalid
@arishojaei
@arishojaei 2 года назад
that was amazing, thanks a lot
@ContactmeTHERADBARD101
@ContactmeTHERADBARD101 2 года назад
Easy and straight to the point
@ucielsola
@ucielsola 3 года назад
NEAT!!
@TechyTro
@TechyTro Год назад
Please make a tutorial of a telegram bot for sending NFT minting notifications to group
Далее
Teeth gadget every dentist should have 😬
00:20
Просмотров 975 тыс.
How To Create A Telegram Bot With Python
20:23
Просмотров 627 тыс.
Create a Discord Bot With Node.js
1:17:32
Просмотров 245 тыс.
FormFun - Building a Chrome Extension
6:44
Node.js Ultimate Beginner’s Guide in 7 Easy Steps
16:20
Create Your Own Telegram Bot With Python
20:41
Просмотров 66 тыс.