The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create and set up a bot, please consult our Introduction to Bots and Bot FAQ. Recent changes April 14, 2019 Added support for native polls: added the object Poll, the methods sendPoll and stopPoll and the field poll in the Message...
The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create and set up a bot, please consult our Introduction to Bots and Bot FAQ. Recent changes April 14, 2019 Added support for native polls: added the object Poll, the methods sendPoll and stopPoll and the field poll in the Message...
I tried this code in OnInit() to send a message to my channel. but it does not work, can you give me example on how to send message to a channel or group chat?
The lines of code below are executed, but SendMessage returns error code 5203 (Error as a result of HTTP request execution). The bot.GetMe() method returns the same 5203 error.
What could be the problem? Thanks!
bot.Token("<token>"); //set tokenint _res = bot.SendMessage(<id>, "test"); //your ID
Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands and inline requests. You control your bots using HTTPS requests to our bot API. 1. What can I do with bots? To name just a few things, you could use bots to: Get customized notifications and news. A bot can act as a smart...
Hello, I have taken a bot that will share signals through a group. I ran the code through MetaEditor, changed it and can't compile it. I got so many errors
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Good afternoon.
Can the bot receive messages through the channel?
I have assigned the bot as an administrator. New messages it sees, but the text is always a blank line.
Here it is always a blank line.Good afternoon.
Can the bot receive messages through the channel?
I have assigned the bot as an administrator. It sees new messages, but the text is always a blank line.
Here it is always a blank line.In the channel_post field everything comes in https://core.telegram.org/bots/api#update.
It would be nice to refine the class. I will add the channel_post_text field to CCustomMessage. And fill it in GetUpdates().
Only for some reason all these fields are null for chat from a channel.
For a channel you should look at the channel_post field, not the message field. channel_post is also of Message type.
I get the text:
But other fields are not:
The first three fields receive the value. But the last three fields (for fields like Chat and From) do not receive the value. Where to look?
Figured it out.
channel_post.chat_id - can be negative, and I took it for a crooked value.
channel_post.from.first_name - from - optional field, can be without it. In general, everything is here https://core.telegram.org/bots/api#message
I tried this code in OnInit() to send a message to my channel. but it does not work, can you give me example on how to send message to a channel or group chat?
thanks
bot.SendMessage("t.me/BotSignals","Hello",false,false);
Please help me with advice. I added theterminal settings. Through the browser the request is executed successfully https://api.telegram.org/bot<token>/sendMessage?chat_id=<id>&text=test.
The lines of code below are executed, but SendMessage returns error code 5203 (Error as a result of HTTP request execution). The bot.GetMe() method returns the same 5203 error.
What could be the problem? Thanks!