BOT API 6.8 implementation
parent
371d8b695f
commit
17d3e395d5
13
configs.go
13
configs.go
|
@ -93,7 +93,7 @@ const (
|
||||||
// this update in the list of allowed_updates to receive these updates.
|
// this update in the list of allowed_updates to receive these updates.
|
||||||
UpdateTypeChatMember = "chat_member"
|
UpdateTypeChatMember = "chat_member"
|
||||||
|
|
||||||
// UpdateTypeChatJoinRequest is request to join the chat has been sent.
|
// UpdateTypeChatJoinRequest is request to join the chat has been sent.
|
||||||
// The bot must have the can_invite_users administrator right in the chat to receive these updates.
|
// The bot must have the can_invite_users administrator right in the chat to receive these updates.
|
||||||
UpdateTypeChatJoinRequest = "chat_join_request"
|
UpdateTypeChatJoinRequest = "chat_join_request"
|
||||||
)
|
)
|
||||||
|
@ -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).
|
||||||
|
|
28
types.go
28
types.go
|
@ -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"`
|
||||||
|
@ -2066,7 +2086,7 @@ type ChatMemberUpdated struct {
|
||||||
//
|
//
|
||||||
// optional
|
// optional
|
||||||
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
|
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
|
||||||
// ViaChatFolderInviteLink is True, if the user joined the chat
|
// ViaChatFolderInviteLink is True, if the user joined the chat
|
||||||
// via a chat folder invite link
|
// via a chat folder invite link
|
||||||
//
|
//
|
||||||
// optional
|
// optional
|
||||||
|
@ -2227,7 +2247,7 @@ type BotCommandScope struct {
|
||||||
UserID int64 `json:"user_id,omitempty"`
|
UserID int64 `json:"user_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//BotName represents the bot's name.
|
// BotName represents the bot's name.
|
||||||
type BotName struct {
|
type BotName struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue