diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 196fd493..c7958bc1 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1584,8 +1584,8 @@ inputMessageVenue venue:venue = InputMessageContent; //@description A message containing a user contact @contact Contact to send inputMessageContact contact:contact = InputMessageContent; -//@description A dice message -inputMessageDice = InputMessageContent; +//@description A dice message @clear_draft True, if a chat message draft should be deleted +inputMessageDice clear_draft:Bool = InputMessageContent; //@description A message with a game; not supported for channels or secret chats @bot_user_id User identifier of the bot that owns the game @game_short_name Short name of the game inputMessageGame bot_user_id:int32 game_short_name:string = InputMessageContent; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 8672a88b..ba6ec274 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 04f6d03b..bb53c27a 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -1475,9 +1475,12 @@ static Result create_input_message_content( content = make_unique(file_id, std::move(caption)); break; } - case td_api::inputMessageDice::ID: + case td_api::inputMessageDice::ID: { + auto input_dice = static_cast(input_message_content.get()); content = make_unique(); + clear_draft = input_dice->clear_draft_; break; + } case td_api::inputMessageDocument::ID: td->documents_manager_->create_document(file_id, string(), thumbnail, std::move(file_name), std::move(mime_type), false); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index a31a79ad..453954cf 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -3123,8 +3123,8 @@ class CliClient final : public Actor { send_message(chat_id, td_api::make_object(as_chat_id(from_chat_id), as_message_id(from_message_id), true, op == "scopy", Random::fast(0, 1) == 0)); - } else if (op == "sdice") { - send_message(args, td_api::make_object()); + } else if (op == "sdice" || op == "sdicecd") { + send_message(args, td_api::make_object(op == "sdicecd")); } else if (op == "sd") { string chat_id; string document_path;