Sending Messages to Discussion on Telegram Channel - telegram

I currently have a telegram channel linked to a telegram group. As a normal user, in the telegram channel, there is an option for me to "Leave a Comment", which allows me to go to the linked group to post something. How do I get my telegram bot to do this instead (i.e. leave a comment in the discussion for the post on the telegram group)?

You should use reply_to_message_id.
For example (for node-telegram-bot-api):
bot.sendMessage(channelDiscussId, text, {reply_to_message_id: msgId});
msgId - a ID message from discuss chat, not main chat.

Related

Is it possible to send message from my account with interval in Telegram?

I need to send message from my own account with my nickname and profile (not from bot account) to any selected contact or group. How can I do that? I found bots with similar behaviour but messages are sent from bot account not from my profile which is what I need.
what you're looking for is a so-called "userbot" or "selfbot", i.e. a bot that works with the Telegram API in contrast to the Telegram Bot API. Searching for Telegram userbot library <your preferred programming language> should probably get you started.

Telegram BOT - How to get chat ID of users in my group?

I've been using a Telegram BOT to send notifications for a group, and for users.
I already know i can get Chat ID by receiving a message from the user on my bot, using getUpdates.
I also know i can get Group ID using the same method...
But what i really need is:
There is three users in my group.
My bot.
Me.
Another user that didn't sent any messages to my bot so it does not appear on getUpdates
Is it possible to get this third user his ID?
PS: I am the group owner, and also added my bot as Admin...
The third user is a normal user.
Can someone help me?
Thanks!
That's not possible with the offical Telegram Bot API
Possible Workarounds:
Hold a list of your own. If a user is joining (new_chat_member), lefting (left_chat_member), somebody is sending a message in the group, and so on. Check Message for more information.
Check if a user is a member of the group with getChatMember.
Also may be helpful: getChatMembersCount and getChatAdministrators

Welcome message by Telegram Bot in group

I have a group on telegram and I want to welcome everybody who joins that group by a message. For that I have created a Bot and added it to my group. Is there any way I can make bot respond to new joining of group.
I have added a description welcome message to Bot but that only shows up when I go to personally chat the bot.
You will receive new_chat_members instead of text in message update.
And you can send welcome when received that :)
you can use the Welcome bot for Telegram
Here is the GitHub repo for that Welcome Bot

ignore positive chat I'd telegram bot

I have webhook a telegram bot for search data my a hosted
How can ignore positive chat I'd by bot I have a bot to search files from my hosted data And get link using telegram I want that bot just work in groups only If any person try to use it in personal chat it will not give reply means not search data and not give a link
Every message has a chat field and each chat has a type see telegram bot api
Type of chat, can be either “private”, “group”, “supergroup” or
“channel”
check if type of chat of message is equal to “group” or “supergroup” then do what you want.
In php can check like below
if($message->chat->type == "group")
...
Can you clear before using this command
if($message->chat->type == "group")
Need other commands in header
Or full command please

Remove user mention in bot message

Is there a posibility to remove the mention of an user in an bot's answer? I developed a telegram bot with the microsoft bot builder framework and only sending the raw message like an echo bot but in group chat there is always this #username metion before every message my bot sends to the group chat. I added my bot via bot father to telegrams bot list.
At the moment this is not a setting the developer can change. Tracking the issue here: https://github.com/Microsoft/BotBuilder/issues/483

Resources