Update calls to sendMessage in examples.
GitOrigin-RevId: 1a8eb0bf50eb4ce3da03c50a0a694e4ba1bbaedc
This commit is contained in:
parent
a3301ae07c
commit
b43dd2be8e
@ -18,7 +18,7 @@ int main() {
|
||||
void *client = td_json_client_create();
|
||||
// somehow share the client with other threads, which will be able to send requests via td_json_client_send
|
||||
|
||||
const bool test_incorrect_queries = true;
|
||||
const bool test_incorrect_queries = false;
|
||||
if (test_incorrect_queries) {
|
||||
td_json_client_execute(nullptr, "{\"@type\":\"setLogVerbosityLevel\", \"new_verbosity_level\":3}");
|
||||
td_json_client_execute(nullptr, "");
|
||||
|
@ -206,7 +206,7 @@ namespace TdExample
|
||||
TdApi.ReplyMarkup replyMarkup = new TdApi.ReplyMarkupInlineKeyboard(new TdApi.InlineKeyboardButton[][] { row, row, row });
|
||||
|
||||
TdApi.InputMessageContent content = new TdApi.InputMessageText(new TdApi.FormattedText(message, null), false, true);
|
||||
_client.Send(new TdApi.SendMessage(chatId, 0, false, false, replyMarkup, content), _defaultHandler);
|
||||
_client.Send(new TdApi.SendMessage(chatId, 0, null, replyMarkup, content), _defaultHandler);
|
||||
}
|
||||
|
||||
static void Main()
|
||||
|
@ -295,7 +295,7 @@ public final class Example {
|
||||
TdApi.ReplyMarkup replyMarkup = new TdApi.ReplyMarkupInlineKeyboard(new TdApi.InlineKeyboardButton[][]{row, row, row});
|
||||
|
||||
TdApi.InputMessageContent content = new TdApi.InputMessageText(new TdApi.FormattedText(message, null), false, true);
|
||||
client.send(new TdApi.SendMessage(chatId, 0, false, false, replyMarkup, content), defaultHandler);
|
||||
client.send(new TdApi.SendMessage(chatId, 0, null, replyMarkup, content), defaultHandler);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
|
@ -182,7 +182,7 @@ EOT
|
||||
* auto get_authorization_state_request = td::td_api::make_object<td::td_api::getAuthorizationState>();
|
||||
* auto message_text = td::td_api::make_object<td::td_api::formattedText>("Hello, world!!!",
|
||||
* std::vector<td::td_api::object_ptr<td::td_api::textEntity>>());
|
||||
* auto send_message_request = td::td_api::make_object<td::td_api::sendMessage>(chat_id, 0, false, false, nullptr,
|
||||
* auto send_message_request = td::td_api::make_object<td::td_api::sendMessage>(chat_id, 0, nullptr, nullptr,
|
||||
* td::td_api::make_object<td::td_api::inputMessageText>(std::move(message_text), false, true));
|
||||
* \\endcode
|
||||
*
|
||||
|
@ -187,7 +187,7 @@ using tl_object_ptr = tl::unique_ptr<Type>;
|
||||
* auto get_authorization_state_request = td::make_tl_object<td::td_api::getAuthorizationState>();
|
||||
* auto message_text = td::make_tl_object<td::td_api::formattedText>("Hello, world!!!",
|
||||
* std::vector<td::tl_object_ptr<td::td_api::textEntity>>());
|
||||
* auto send_message_request = td::make_tl_object<td::td_api::sendMessage>(chat_id, 0, false, false, nullptr,
|
||||
* auto send_message_request = td::make_tl_object<td::td_api::sendMessage>(chat_id, 0, nullptr, nullptr,
|
||||
* td::make_tl_object<td::td_api::inputMessageText>(std::move(message_text), false, true));
|
||||
* \endcode
|
||||
*
|
||||
|
Reference in New Issue
Block a user