BOT API 6.8 implementation

pull/10/head
OvyFlash 2023-12-30 16:55:43 +02:00
parent 371d8b695f
commit 17d3e395d5
2 changed files with 36 additions and 5 deletions

View File

@ -2697,6 +2697,17 @@ func (config UnhideGeneralForumTopicConfig) method() string {
return "unhideGeneralForumTopic" return "unhideGeneralForumTopic"
} }
// UnpinAllGeneralForumTopicMessagesConfig allows you to to clear
// the list of pinned messages in a General forum topic.
// The bot must be an administrator in the chat for this to work
// and must have the can_pin_messages administrator right in the supergroup.
// Returns True on success.
type UnpinAllGeneralForumTopicMessagesConfig struct{ BaseForum }
func (config UnpinAllGeneralForumTopicMessagesConfig) method() string {
return "unpinAllGeneralForumTopicMessages"
}
// MediaGroupConfig allows you to send a group of media. // MediaGroupConfig allows you to send a group of media.
// //
// Media consist of InputMedia items (InputMediaPhoto, InputMediaVideo). // Media consist of InputMedia items (InputMediaPhoto, InputMediaVideo).

View File

@ -281,6 +281,11 @@ type Chat struct {
// //
// optional // optional
EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"` EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"`
// Expiration date of the emoji status of the chat or the other party
// in a private chat, in Unix time, if any. Returned only in getChat.
//
// optional
EmojiStatusCustomEmojiDate int64 `json:"emoji_status_expiration_date,omitempty"`
// Bio is the bio of the other party in a private chat. Returned only in // Bio is the bio of the other party in a private chat. Returned only in
// getChat // getChat
// //
@ -526,6 +531,10 @@ type Message struct {
// //
// optional // optional
Sticker *Sticker `json:"sticker,omitempty"` Sticker *Sticker `json:"sticker,omitempty"`
// Story message is a forwarded story;
//
// optional
Story *Story `json:"story,omitempty"`
// Video message is a video, information about the video; // Video message is a video, information about the video;
// //
// optional // optional
@ -1032,6 +1041,9 @@ type Document struct {
FileSize int64 `json:"file_size,omitempty"` FileSize int64 `json:"file_size,omitempty"`
} }
// Story represents a message about a forwarded story in the chat.
type Story struct{}
// Video represents a video file. // Video represents a video file.
type Video struct { type Video struct {
// FileID identifier for this file, which can be used to download or reuse // FileID identifier for this file, which can be used to download or reuse
@ -1149,8 +1161,16 @@ type PollOption struct {
type PollAnswer struct { type PollAnswer struct {
// PollID is the unique poll identifier // PollID is the unique poll identifier
PollID string `json:"poll_id"` PollID string `json:"poll_id"`
// User who changed the answer to the poll // Chat that changed the answer to the poll, if the voter is anonymous.
User User `json:"user"` //
// Optional
VoterChat *Chat `json:"voter_chat,omitempty"`
// User who changed the answer to the poll, if the voter isn't anonymous
// For backward compatibility, the field user in such objects
// will contain the user 136817688 (@Channel_Bot).
//
// Optional
User *User `json:"user,omitempty"`
// OptionIDs is the 0-based identifiers of poll options chosen by the user. // OptionIDs is the 0-based identifiers of poll options chosen by the user.
// May be empty if user retracted vote. // May be empty if user retracted vote.
OptionIDs []int `json:"option_ids"` OptionIDs []int `json:"option_ids"`