Telegram bots not responding - telegram

I have created some new telegram bots to test their functionality. I haven't used them before, but I cannot seem to get them to respond to any commands?
Has anyone come across this issue before?

You have created a telegram bot on telegram. However..
Did you set any webhooks for the bot?
You should set a webhook/polling and write a backend to make it response to your queries.
For reference you can start from here
https://core.telegram.org/bots/api

set the webhook for your bot.
Ex:
http://api.telegram.org/bot<TOKEN>/setWebhook?url=<ENDPOINT>

Related

is there a way to setup a listener for a Telegram Bot?

I would like to listen to a Telegram Bot message -the Bot is sort of a weather Bot, and on every new message, I want to get that message- in a programmatic way.
I tried to use another Bot but Telegram doesn't allow interaction Bot-to-Bot!
I will appreciate any help.
Converting my comment to an answer as OP requested to eleborate it.
I would like to listen to a Telegram Bot message in a programmatic way
This is not possible using the Telegram Bot Api. As you already mentioned, Bot-to-Bot interaction is impossible at this point.
Of course, there are a few ways of achieving your desired outcome, I'll mention 2 of them:
Alter the bot you want listen to, let the Bot trigger a custom endpoint/script that will fit your needs
Using the official Telegram TDLib API, you can create your own Telegram Application, this way, you can programmicaly preform any action that a regular Client might do, this include 'listening' to messages from Bots and triggering any kind of webhook to fit your needs

Is it possible to get all my chat ids in telegram bot api?

I'm writing a bot that will send the same message for many people I've ever communicated in telegram. So I need to get all my old chat_id's.
All I found is just to store chat_id when I receive a new message as here Retrieve all chat ids using Telegram bot
But it doesn't fit me. If is it possible, please tell me, I'd really apreciate it!
It's not possible, as there is no such method listed in the Bot API Docs.

How to send photos with self-destruct timer using Telegram Bot API?

In the Telegram app, you can send photos that self-destruct and can't be screenshotted by clicking on the clock icon before sending them. Is there any way to reproduce this behavior using the Telegram Bot API?
I'm using python-telegram-bot and couldn't find anything in its docs, but i'm not even sure if the API allows it. I could delete the messages after some time using bot.delete_message, however, the important part here is that the images shouldn't be screenshottable.
I'm using python-telegram-bot and couldn't find anything in docs, but i'm not even sure if the API allows it.
Telegram Bot API does not support such method yet.
I could delete the messages after some time using bot.delete_message, however, the important part here is that the images shouldn't be screenshottable.
Yes, bot can delete messages "manually" but there's no way to control the ability of making screenshots.

Automate setcommands in Telegram

Is it possible to automate the setcommands command?
Instead of going to Botfather. Is there any way to doing from my code using Telegram API or anything else?
Telegram Bot API currently doesn't support interacting with other bots. If you really need adding commands to your bot programmatically, go through Telegram API (Don't confuse it with Bot API. This API is used for creating telegram clients, not bots) and contact #BotFather.
However, doing that doesn't seem reasonable. Instead, there might be a simpler approach so you don't need to add commands to your bot programmatically.

Telegram bot doesn't respond in group chats

I made a simple chatbot using Microsoft Bot Framework and integrated it with Telegram.
He works fine whenever I message him privately but whenever I put him in a group with my friends, he doesn't reply, even when I mention him.
/setjoingroups is enabled, and so is /setprivacy.
First make sure it is not caused by Microsoft Bot itself. Then for all normal bots --
Always add a Telegram bot to a group via the bot's info window, instead of inviting the bot to a group via the group's info window.
It's a clear trap for beginners. I'm surprised that Telegram didn't note this in their documentation.
When you configured your bot on Telegram, did you make it an inline bot? It's been my experience that inline bots cannot participate in group chats, but can message privately. If not, please open a GitHub issue here and we'll follow up there.
Beyond all other suggestions like turning off inline functions, setting privacy to disabled and allowing to participate in groups, I also made the bot an admin of my group. And now it processes all messages. That's what's worked for me.
I had this same problem, and I found that I just needed to add the bot as an 'admin' to the chat instead of just a normal member. The telegram bot must have admin privileges to access every message/image that the users of the group-chat send.

Resources