all repos — telegram-bot-api @ 86db6004365c757b39f7961e114875f2844a3dc5

Golang bindings for the Telegram Bot API

Merge pull request #11 from OvyFlash/bot-api-6.9

BOT API 6.9 implementation
OvyFlash 46941696+OvyFlash@users.noreply.github.com
Sat, 30 Dec 2023 17:19:57 +0200
commit

86db6004365c757b39f7961e114875f2844a3dc5

parent

9966656288231ef1f1ad9043036151259153b421

2 files changed, 37 insertions(+), 2 deletions(-)

jump to
M configs.goconfigs.go

@@ -1462,6 +1462,9 @@ CanInviteUsers bool

CanRestrictMembers bool CanPinMessages bool CanPromoteMembers bool + CanPostStories bool + CanEditStories bool + CanDeleteStories bool CanManageTopics bool }

@@ -1486,6 +1489,9 @@ params.AddBool("can_invite_users", config.CanInviteUsers)

params.AddBool("can_restrict_members", config.CanRestrictMembers) params.AddBool("can_pin_messages", config.CanPinMessages) params.AddBool("can_promote_members", config.CanPromoteMembers) + params.AddBool("can_post_stories", config.CanPostStories) + params.AddBool("can_edit_stories", config.CanEditStories) + params.AddBool("can_delete_stories", config.CanDeleteStories) params.AddBool("can_manage_topics", config.CanManageTopics) return params, nil
M types.gotypes.go

@@ -281,7 +281,7 @@ // in a private chat. Returned only in getChat.

// // optional EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"` - // Expiration date of the emoji status of the chat or the other party + // 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

@@ -1373,10 +1373,21 @@ // WriteAccessAllowed represents a service message about a user allowing a bot

// to write messages after adding the bot to the attachment menu or launching // a Web App from a link. type WriteAccessAllowed struct { - //Name of the Web App which was launched from a link + // FromRequest is true, if the access was granted after + // the user accepted an explicit request from a Web App + // sent by the method requestWriteAccess. + // + // Optional + FromRequest bool `json:"from_request,omitempty"` + // Name of the Web App which was launched from a link // // Optional WebAppName string `json:"web_app_name,omitempty"` + // FromAttachmentMenu is true, if the access was granted when + // the bot was added to the attachment or side menu + // + // Optional + FromAttachmentMenu bool `json:"from_attachment_menu,omitempty"` } // VideoChatScheduled represents a service message about a voice chat scheduled

@@ -1882,6 +1893,9 @@ CanInviteUsers bool `json:"can_invite_users"`

CanPostMessages bool `json:"can_post_messages"` CanEditMessages bool `json:"can_edit_messages"` CanPinMessages bool `json:"can_pin_messages"` + CanPostStories bool `json:"can_post_stories"` + CanEditStories bool `json:"can_edit_stories"` + CanDeleteStories bool `json:"can_delete_stories"` CanManageTopics bool `json:"can_manage_topics"` }

@@ -1975,6 +1989,21 @@ // True, if the user is allowed to pin messages; groups and supergroups only

// // optional CanPinMessages bool `json:"can_pin_messages,omitempty"` + // CanPostStories administrators only. + // True, if the administrator can post stories in the channel; channels only + // + // optional + CanPostStories bool `json:"can_post_stories,omitempty"` + // CanEditStories administrators only. + // True, if the administrator can edit stories posted by other users; channels only + // + // optional + CanEditStories bool `json:"can_edit_stories,omitempty"` + // CanDeleteStories administrators only. + // True, if the administrator can delete stories posted by other users; channels only + // + // optional + CanDeleteStories bool `json:"can_delete_stories,omitempty"` // CanManageTopics administrators and restricted only. // True, if the user is allowed to create, rename, // close, and reopen forum topics; supergroups only