From 50273c947a159739315bf468b26e230e22eb8e06 Mon Sep 17 00:00:00 2001 From: Syfaro Date: Sun, 2 Jan 2022 22:00:12 -0500 Subject: [PATCH] Add ProtectContent field, spoiler type comment. --- configs.go | 2 ++ types.go | 1 + 2 files changed, 3 insertions(+) diff --git a/configs.go b/configs.go index 5e43af4..2023548 100644 --- a/configs.go +++ b/configs.go @@ -266,6 +266,7 @@ func (CloseConfig) params() (Params, error) { type BaseChat struct { ChatID int64 // required ChannelUsername string + ProtectContent bool ReplyToMessageID int ReplyMarkup interface{} DisableNotification bool @@ -279,6 +280,7 @@ func (chat *BaseChat) params() (Params, error) { params.AddNonZero("reply_to_message_id", chat.ReplyToMessageID) params.AddBool("disable_notification", chat.DisableNotification) params.AddBool("allow_sending_without_reply", chat.AllowSendingWithoutReply) + params.AddBool("protect_content", chat.ProtectContent) err := params.AddInterface("reply_markup", chat.ReplyMarkup) diff --git a/types.go b/types.go index 847f1b1..5004892 100644 --- a/types.go +++ b/types.go @@ -712,6 +712,7 @@ type MessageEntity struct { // “italic” (italic text), // “underline” (underlined text), // “strikethrough” (strikethrough text), + // "spoiler" (spoiler message), // “code” (monowidth string), // “pre” (monowidth block), // “text_link” (for clickable text URLs),