Why do I need telegraf when creating a telegram bot? - telegram-bot

Why do I need telegraf when creating a telegram bot?
I am new to creating bots and new to telegraf too. Do I need telegraf to listen to bot commands? And how does telegraf help?
I am just trying to understand what telegraf does in the context of the running of a telegram bot.

😂 😂 I have just seen that there is telegraf and there is telegraf.js. And this two are very different.
I was confused as I thought telegraf is what I had seen being used in some telegram bot code. But it was telegraf.js.

Related

Share telegram bot messages with another user

I have a telegram bot that I send messages to via Python. I would like another user to be able to see these messages as well. Can't seem to figure out how to do it, nor what to do?

Selenium Webhook equivalent / listen to new data from telegram without bot

I have a web scraping project that requires the scraper to wait for when there is new data. I thought about reverse engineering the websocket but that might take some time.
if you know how to work with the telegram websockets to get data without a bot I'd appreciate it
So what I will need to do is get the web scraper to wait for new messages on a telegram chat and only execute action when a new message is detected, it might need work with javascript event listeners or something but I wanted to ask for the most efficient solution for the given problem.
thanks

Telegram bot authentification

A web service that contains all the methods for processing data is stored by Azure. In this case, only my telegram can process this data. Other applications are not allowed. But there is a possibility of expanding the service.
How do I know that the service is used by my telegram bot?
How to authenticate the application.
Well, I tried to use OAuth2.0, but i think it is not correct, because user is already authentificated with telegram, when he use telegram bot. My idea was to send a link to google auththentification in the beginning of bot job. By th way, ok, we know user`s data. May be I can check: Id, login etc. But some hacker can substitute this id
How can I make sure that Webhook requests are coming from Telegram? If
you‘d like to make sure that the Webhook request comes from Telegram,
we recommend using a secret path in the URL you give us, e.g.
www.example.com/your_token. Since nobody else knows your bot’s token,
you can be pretty sure it's us.
Telegram Bot FAQ

How to work (call)by bot telegram with php?instead in telegram app

I build bot telegram.
Is possible to work/call/use bot in php ? Not build it. I want use bot.
i want use bot without telegram app.
is it possible?
Yes, you download php bot source on hosting and using via browser string.
Must have:
Bot token
SSL certificate

How to check, that telegram bot is alive automatically?

I wrote a telegram bot, but it go frizes sometimes, and don't answer to the messages.
How to check the state of bot automaticaly (for exmaple from another server).
I think, that I need something like heartbeat check:
Send a message from non-webhook server.
Catch telegram response
If response not comes in reasonable time, bot is die.
But, I need telegram client on linux server to do it.
Do you have any ideas, how to check telegram bot state?
You need to find out why the bot freezes, the health check is not the answer to your problem. However If you really want to implement some kind of automated health check, you need to use Telegram CLI to send requests to your own bot in fixed intervals and check for incoming messages from that CLI user.
If you are experiencing problem with Telegram's webhook, try long pulling the updates using the getUpdates method. I know a few high traffic bots that use that method, Webhooks have a max amount of concurrent requests so if you just delay them for a few milliseconds, it will start accumulating delay.