Deploy A Telegram Bot For Free With Cloudflare Workers
HTML-код
- Опубликовано: 16 июн 2024
- Step into the world of serverless computing with this detailed video tutorial on creating a simple echo bot on Telegram using Cloudflare Workers. This tutorial provides a solid foundation for more advanced bot development by demonstrating how to set up a bot on Telegram, communicate with the Telegram server, and host it on Cloudflare Workers. The echo bot, which mirrors back user messages, serves as an excellent starting point for those interested in creating more complex and interactive bots. By the end of this
tutorial, you’ll have a fully functional Telegram echo bot hosted on Cloudflare Workers, ready to be built upon for more advanced functionalities.
Code:tinyurl.com/telegram-bot
0:00 Introduction to setup a telegram bot with cloudflare workers
0:23 Creating a telegram bot.
1:40 Writing the code for the bot.
6:39 Creating account on cloudflare workers
7:28 Deploying the bot script on Cloudflare Workers.
9:29 Testing the bot.
wow, you are amazing , from srilanka 🇱🇰
okay, i used your method and it works like magic. thank you very much
Bro I want more videos like this
Bot is working
hey I use a telegraph dependency, how do i do that with this code. is there a way to upload the full folder?
Did you manage to do it? I'm trying to use webpack but keep getting errors
@@alfredomf1 yes, I used his method and I was able to get it to work perfectly. Its been working ever since. Just do exactly what you see on the video and you'll have the same good result. You don't have to use any telegraph dependency or anything
I could show you my full code if you need more clarification. Just let me know
bro pls do one withpython code
Hi! This channel primarily focuses on JavaScript and web development. For Python-related tutorials, there are many other great resources and channels dedicated to that language.
Will this make my bot 24/7
Yes, your Telegram bot will run 24/7 if it’s set up on Cloudflare Workers.
Please deploy file to link bot
If you are looking for the bot script , you can find it here: tinyurl.com/telegram-bot
Bro i have python script this seems js what to do anything else fr hosting?
Cloudflare Workers does not support Python. If you have a Python script, you should host it on a different platform such as PythonAnywhere, which offers a basic plan for free.
it's hard to understand. Why not use long polling ?
Webhooks offer a more efficient approach as they only transmit data when there’s new data to send, enabling your bot to receive updates in real-time. On the other hand, long polling, while being easier to set up and universally compatible, can be less efficient as the bot is continuously checking with Telegram for any new messages
This ain't working
Please ensure you replace "telegramAuthToken" in the code with your bot's authorization token.
@SimpleCodingTutorials No, I mean this thing Cloudflare Workers doesn't exist anymore
@@JavaSqr Cloudflare Workers is still active . You can access them at this link workers.cloudflare.com