diff --git a/api/getchatadministrators_test.go b/api/getchatadministrators_test.go new file mode 100644 index 0000000..570c18f --- /dev/null +++ b/api/getchatadministrators_test.go @@ -0,0 +1,55 @@ +package api + +import ( + "context" + "testing" + + "github.com/lukaszraczylo/go-telegram/client" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +// TestGetChatAdministrators_DecodesUnionSlice is a regression test for the +// bug where GetChatAdministrators was emitted with the generic client.Call +// against []ChatMember — encoding/json cannot unmarshal a slice of an +// interface, so the call always failed at the parse step. +// +// The fix makes the codegen emit CallRaw + per-element UnmarshalChatMember +// for any method returning []. +func TestGetChatAdministrators_DecodesUnionSlice(t *testing.T) { + body := `{"ok":true,"result":[ + {"status":"creator","user":{"id":1,"is_bot":false,"first_name":"Owner"},"is_anonymous":false}, + {"status":"administrator","user":{"id":2,"is_bot":false,"first_name":"Admin"},"can_be_edited":false,"is_anonymous":false,"can_manage_chat":true,"can_delete_messages":true,"can_manage_video_chats":false,"can_restrict_members":true,"can_promote_members":false,"can_change_info":true,"can_invite_users":true,"can_post_stories":false,"can_edit_stories":false,"can_delete_stories":false} + ]}` + + m := &mockDoer{} + m.On("Do", mock.Anything).Return(newJSONResp(200, body), nil) + bot := client.New("test:token", client.WithHTTPClient(m)) + + admins, err := GetChatAdministrators(context.Background(), bot, + &GetChatAdministratorsParams{ChatID: ChatIDFromInt(-100123)}) + require.NoError(t, err) + require.Len(t, admins, 2) + + owner, ok := admins[0].(*ChatMemberOwner) + require.True(t, ok, "first element must dispatch to ChatMemberOwner, got %T", admins[0]) + require.Equal(t, int64(1), owner.User.ID) + + admin, ok := admins[1].(*ChatMemberAdministrator) + require.True(t, ok, "second element must dispatch to ChatMemberAdministrator, got %T", admins[1]) + require.True(t, admin.CanManageChat) + require.False(t, admin.CanPromoteMembers) +} + +// TestGetChatAdministrators_EmptyArray covers the zero-admin edge case +// (a basic group with no admins, or the bot itself filtered out). +func TestGetChatAdministrators_EmptyArray(t *testing.T) { + m := &mockDoer{} + m.On("Do", mock.Anything).Return(newJSONResp(200, `{"ok":true,"result":[]}`), nil) + bot := client.New("test:token", client.WithHTTPClient(m)) + + admins, err := GetChatAdministrators(context.Background(), bot, + &GetChatAdministratorsParams{ChatID: ChatIDFromInt(-100123)}) + require.NoError(t, err) + require.Empty(t, admins) +} diff --git a/api/methods.gen.go b/api/methods.gen.go index c79f4bc..070576b 100644 --- a/api/methods.gen.go +++ b/api/methods.gen.go @@ -2676,7 +2676,23 @@ type GetChatAdministratorsParams struct { // // Use this method to get a list of administrators in a chat. Returns an Array of ChatMember objects. func GetChatAdministrators(ctx context.Context, b *client.Bot, p *GetChatAdministratorsParams) ([]ChatMember, error) { - return client.Call[*GetChatAdministratorsParams, []ChatMember](ctx, b, "getChatAdministrators", p) + raw, err := client.CallRaw[*GetChatAdministratorsParams](ctx, b, "getChatAdministrators", p) + if err != nil { + return nil, err + } + var elems []json.RawMessage + if err := json.Unmarshal(raw, &elems); err != nil { + return nil, err + } + out := make([]ChatMember, 0, len(elems)) + for _, e := range elems { + v, err := UnmarshalChatMember(e) + if err != nil { + return nil, err + } + out = append(out, v) + } + return out, nil } // GetChatMemberCountParams is the parameter set for GetChatMemberCount. diff --git a/cmd/genapi/emitter.go b/cmd/genapi/emitter.go index 94b7d94..6e3fae6 100644 --- a/cmd/genapi/emitter.go +++ b/cmd/genapi/emitter.go @@ -245,6 +245,19 @@ func funcs(plan *enumPlan) template.FuncMap { s, ok := knownDiscriminators[tr.Name] return ok && len(s.Variants) > 0 }, + "isSealedUnionArrayReturn": func(tr spec.TypeRef) bool { + if tr.Kind != spec.KindArray || tr.ElemType == nil || tr.ElemType.Kind != spec.KindNamed { + return false + } + s, ok := knownDiscriminators[tr.ElemType.Name] + return ok && len(s.Variants) > 0 + }, + "sealedUnionElemName": func(tr spec.TypeRef) string { + if tr.Kind == spec.KindArray && tr.ElemType != nil { + return tr.ElemType.Name + } + return "" + }, "isMaybeInaccessibleMessage": func(name string) bool { return name == "MaybeInaccessibleMessage" }, "discriminatorField": func(name string) string { return knownDiscriminators[name].Field }, "discriminatorMap": func(name string) map[string]string { return knownDiscriminators[name].Variants }, diff --git a/cmd/genapi/methods.tmpl b/cmd/genapi/methods.tmpl index 9c3ff04..fef1f74 100644 --- a/cmd/genapi/methods.tmpl +++ b/cmd/genapi/methods.tmpl @@ -51,6 +51,24 @@ func {{title .Name}}(ctx context.Context, b *client.Bot, p *{{title .Name}}Param return nil, err } return Unmarshal{{.Returns.Name}}(raw) +{{else if isSealedUnionArrayReturn .Returns -}} + raw, err := client.CallRaw[*{{title .Name}}Params](ctx, b, "{{.Name}}", p) + if err != nil { + return nil, err + } + var elems []json.RawMessage + if err := json.Unmarshal(raw, &elems); err != nil { + return nil, err + } + out := make([]{{sealedUnionElemName .Returns}}, 0, len(elems)) + for _, e := range elems { + v, err := Unmarshal{{sealedUnionElemName .Returns}}(e) + if err != nil { + return nil, err + } + out = append(out, v) + } + return out, nil {{else -}} return client.Call[*{{title .Name}}Params, {{returnGoType .Returns}}](ctx, b, "{{.Name}}", p) {{end -}} diff --git a/docs/reference/api.md b/docs/reference/api.md index ea129bc..854a581 100644 --- a/docs/reference/api.md +++ b/docs/reference/api.md @@ -846,7 +846,7 @@ Package api contains the Telegram Bot API object types and method wrappers, gene -## func AddStickerToSet +## func [AddStickerToSet]() ```go func AddStickerToSet(ctx context.Context, b *client.Bot, p *AddStickerToSetParams) (bool, error) @@ -857,7 +857,7 @@ AddStickerToSet calls the addStickerToSet Telegram Bot API method. Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success. -## func AnswerCallbackQuery +## func [AnswerCallbackQuery]() ```go func AnswerCallbackQuery(ctx context.Context, b *client.Bot, p *AnswerCallbackQueryParams) (bool, error) @@ -868,7 +868,7 @@ AnswerCallbackQuery calls the answerCallbackQuery Telegram Bot API method. Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned. Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your\_bot?start=XXXX that open your bot with a parameter. -## func AnswerInlineQuery +## func [AnswerInlineQuery]() ```go func AnswerInlineQuery(ctx context.Context, b *client.Bot, p *AnswerInlineQueryParams) (bool, error) @@ -879,7 +879,7 @@ AnswerInlineQuery calls the answerInlineQuery Telegram Bot API method. Use this method to send answers to an inline query. On success, True is returned.No more than 50 results per query are allowed. -## func AnswerPreCheckoutQuery +## func [AnswerPreCheckoutQuery]() ```go func AnswerPreCheckoutQuery(ctx context.Context, b *client.Bot, p *AnswerPreCheckoutQueryParams) (bool, error) @@ -890,7 +890,7 @@ AnswerPreCheckoutQuery calls the answerPreCheckoutQuery Telegram Bot API method. Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre\_checkout\_query. Use this method to respond to such pre\-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre\-checkout query was sent. -## func AnswerShippingQuery +## func [AnswerShippingQuery]() ```go func AnswerShippingQuery(ctx context.Context, b *client.Bot, p *AnswerShippingQueryParams) (bool, error) @@ -901,7 +901,7 @@ AnswerShippingQuery calls the answerShippingQuery Telegram Bot API method. If you sent an invoice requesting a shipping address and the parameter is\_flexible was specified, the Bot API will send an Update with a shipping\_query field to the bot. Use this method to reply to shipping queries. On success, True is returned. -## func ApproveChatJoinRequest +## func [ApproveChatJoinRequest]() ```go func ApproveChatJoinRequest(ctx context.Context, b *client.Bot, p *ApproveChatJoinRequestParams) (bool, error) @@ -912,7 +912,7 @@ ApproveChatJoinRequest calls the approveChatJoinRequest Telegram Bot API method. Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can\_invite\_users administrator right. Returns True on success. -## func ApproveSuggestedPost +## func [ApproveSuggestedPost]() ```go func ApproveSuggestedPost(ctx context.Context, b *client.Bot, p *ApproveSuggestedPostParams) (bool, error) @@ -923,7 +923,7 @@ ApproveSuggestedPost calls the approveSuggestedPost Telegram Bot API method. Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can\_post\_messages' administrator right in the corresponding channel chat. Returns True on success. -## func BanChatMember +## func [BanChatMember]() ```go func BanChatMember(ctx context.Context, b *client.Bot, p *BanChatMemberParams) (bool, error) @@ -934,7 +934,7 @@ BanChatMember calls the banChatMember Telegram Bot API method. Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. -## func BanChatSenderChat +## func [BanChatSenderChat]() ```go func BanChatSenderChat(ctx context.Context, b *client.Bot, p *BanChatSenderChatParams) (bool, error) @@ -945,7 +945,7 @@ BanChatSenderChat calls the banChatSenderChat Telegram Bot API method. Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success. -## func Close +## func [Close]() ```go func Close(ctx context.Context, b *client.Bot, p *CloseParams) (bool, error) @@ -956,7 +956,7 @@ Close calls the close Telegram Bot API method. Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters. -## func CloseForumTopic +## func [CloseForumTopic]() ```go func CloseForumTopic(ctx context.Context, b *client.Bot, p *CloseForumTopicParams) (bool, error) @@ -967,7 +967,7 @@ CloseForumTopic calls the closeForumTopic Telegram Bot API method. Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights, unless it is the creator of the topic. Returns True on success. -## func CloseGeneralForumTopic +## func [CloseGeneralForumTopic]() ```go func CloseGeneralForumTopic(ctx context.Context, b *client.Bot, p *CloseGeneralForumTopicParams) (bool, error) @@ -978,7 +978,7 @@ CloseGeneralForumTopic calls the closeGeneralForumTopic Telegram Bot API method. Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights. Returns True on success. -## func ConvertGiftToStars +## func [ConvertGiftToStars]() ```go func ConvertGiftToStars(ctx context.Context, b *client.Bot, p *ConvertGiftToStarsParams) (bool, error) @@ -989,7 +989,7 @@ ConvertGiftToStars calls the convertGiftToStars Telegram Bot API method. Converts a given regular gift to Telegram Stars. Requires the can\_convert\_gifts\_to\_stars business bot right. Returns True on success. -## func CreateInvoiceLink +## func [CreateInvoiceLink]() ```go func CreateInvoiceLink(ctx context.Context, b *client.Bot, p *CreateInvoiceLinkParams) (string, error) @@ -1000,7 +1000,7 @@ CreateInvoiceLink calls the createInvoiceLink Telegram Bot API method. Use this method to create a link for an invoice. Returns the created invoice link as String on success. -## func CreateNewStickerSet +## func [CreateNewStickerSet]() ```go func CreateNewStickerSet(ctx context.Context, b *client.Bot, p *CreateNewStickerSetParams) (bool, error) @@ -1011,7 +1011,7 @@ CreateNewStickerSet calls the createNewStickerSet Telegram Bot API method. Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success. -## func DeclineChatJoinRequest +## func [DeclineChatJoinRequest]() ```go func DeclineChatJoinRequest(ctx context.Context, b *client.Bot, p *DeclineChatJoinRequestParams) (bool, error) @@ -1022,7 +1022,7 @@ DeclineChatJoinRequest calls the declineChatJoinRequest Telegram Bot API method. Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can\_invite\_users administrator right. Returns True on success. -## func DeclineSuggestedPost +## func [DeclineSuggestedPost]() ```go func DeclineSuggestedPost(ctx context.Context, b *client.Bot, p *DeclineSuggestedPostParams) (bool, error) @@ -1033,7 +1033,7 @@ DeclineSuggestedPost calls the declineSuggestedPost Telegram Bot API method. Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can\_manage\_direct\_messages' administrator right in the corresponding channel chat. Returns True on success. -## func DeleteAllMessageReactions +## func [DeleteAllMessageReactions]() ```go func DeleteAllMessageReactions(ctx context.Context, b *client.Bot, p *DeleteAllMessageReactionsParams) (bool, error) @@ -1044,7 +1044,7 @@ DeleteAllMessageReactions calls the deleteAllMessageReactions Telegram Bot API m Use this method to remove up to 10000 recent reactions in a group or a supergroup chat added by a given user or chat. The bot must have the 'can\_delete\_messages' administrator right in the chat. Returns True on success. -## func DeleteBusinessMessages +## func [DeleteBusinessMessages]() ```go func DeleteBusinessMessages(ctx context.Context, b *client.Bot, p *DeleteBusinessMessagesParams) (bool, error) @@ -1055,7 +1055,7 @@ DeleteBusinessMessages calls the deleteBusinessMessages Telegram Bot API method. Delete messages on behalf of a business account. Requires the can\_delete\_sent\_messages business bot right to delete messages sent by the bot itself, or the can\_delete\_all\_messages business bot right to delete any message. Returns True on success. -## func DeleteChatPhoto +## func [DeleteChatPhoto]() ```go func DeleteChatPhoto(ctx context.Context, b *client.Bot, p *DeleteChatPhotoParams) (bool, error) @@ -1066,7 +1066,7 @@ DeleteChatPhoto calls the deleteChatPhoto Telegram Bot API method. Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. -## func DeleteChatStickerSet +## func [DeleteChatStickerSet]() ```go func DeleteChatStickerSet(ctx context.Context, b *client.Bot, p *DeleteChatStickerSetParams) (bool, error) @@ -1077,7 +1077,7 @@ DeleteChatStickerSet calls the deleteChatStickerSet Telegram Bot API method. Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can\_set\_sticker\_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. -## func DeleteForumTopic +## func [DeleteForumTopic]() ```go func DeleteForumTopic(ctx context.Context, b *client.Bot, p *DeleteForumTopicParams) (bool, error) @@ -1088,7 +1088,7 @@ DeleteForumTopic calls the deleteForumTopic Telegram Bot API method. Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can\_delete\_messages administrator rights. Returns True on success. -## func DeleteMessage +## func [DeleteMessage]() ```go func DeleteMessage(ctx context.Context, b *client.Bot, p *DeleteMessageParams) (bool, error) @@ -1099,7 +1099,7 @@ DeleteMessage calls the deleteMessage Telegram Bot API method. Use this method to delete a message, including service messages, with the following limitations:\- A message can only be deleted if it was sent less than 48 hours ago.\- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\- Bots can delete outgoing messages in private chats, groups, and supergroups.\- Bots can delete incoming messages in private chats.\- Bots granted can\_post\_messages permissions can delete outgoing messages in channels.\- If the bot is an administrator of a group, it can delete any message there.\- If the bot has can\_delete\_messages administrator right in a supergroup or a channel, it can delete any message there.\- If the bot has can\_manage\_direct\_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.Returns True on success. -## func DeleteMessageReaction +## func [DeleteMessageReaction]() ```go func DeleteMessageReaction(ctx context.Context, b *client.Bot, p *DeleteMessageReactionParams) (bool, error) @@ -1110,7 +1110,7 @@ DeleteMessageReaction calls the deleteMessageReaction Telegram Bot API method. Use this method to remove a reaction from a message in a group or a supergroup chat. The bot must have the 'can\_delete\_messages' administrator right in the chat. Returns True on success. -## func DeleteMessages +## func [DeleteMessages]() ```go func DeleteMessages(ctx context.Context, b *client.Bot, p *DeleteMessagesParams) (bool, error) @@ -1121,7 +1121,7 @@ DeleteMessages calls the deleteMessages Telegram Bot API method. Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success. -## func DeleteMyCommands +## func [DeleteMyCommands]() ```go func DeleteMyCommands(ctx context.Context, b *client.Bot, p *DeleteMyCommandsParams) (bool, error) @@ -1132,7 +1132,7 @@ DeleteMyCommands calls the deleteMyCommands Telegram Bot API method. Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success. -## func DeleteStickerFromSet +## func [DeleteStickerFromSet]() ```go func DeleteStickerFromSet(ctx context.Context, b *client.Bot, p *DeleteStickerFromSetParams) (bool, error) @@ -1143,7 +1143,7 @@ DeleteStickerFromSet calls the deleteStickerFromSet Telegram Bot API method. Use this method to delete a sticker from a set created by the bot. Returns True on success. -## func DeleteStickerSet +## func [DeleteStickerSet]() ```go func DeleteStickerSet(ctx context.Context, b *client.Bot, p *DeleteStickerSetParams) (bool, error) @@ -1154,7 +1154,7 @@ DeleteStickerSet calls the deleteStickerSet Telegram Bot API method. Use this method to delete a sticker set that was created by the bot. Returns True on success. -## func DeleteStory +## func [DeleteStory]() ```go func DeleteStory(ctx context.Context, b *client.Bot, p *DeleteStoryParams) (bool, error) @@ -1165,7 +1165,7 @@ DeleteStory calls the deleteStory Telegram Bot API method. Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can\_manage\_stories business bot right. Returns True on success. -## func DeleteWebhook +## func [DeleteWebhook]() ```go func DeleteWebhook(ctx context.Context, b *client.Bot, p *DeleteWebhookParams) (bool, error) @@ -1176,7 +1176,7 @@ DeleteWebhook calls the deleteWebhook Telegram Bot API method. Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. -## func DownloadFileByPath +## func [DownloadFileByPath]() ```go func DownloadFileByPath(ctx context.Context, b *client.Bot, filePath string) (io.ReadCloser, error) @@ -1185,7 +1185,7 @@ func DownloadFileByPath(ctx context.Context, b *client.Bot, filePath string) (io DownloadFileByPath fetches a file by its file\_path \(typically obtained from a prior File response\). Useful when the caller already has a \*File and wants to skip the GetFile round\-trip. -## func EditForumTopic +## func [EditForumTopic]() ```go func EditForumTopic(ctx context.Context, b *client.Bot, p *EditForumTopicParams) (bool, error) @@ -1196,7 +1196,7 @@ EditForumTopic calls the editForumTopic Telegram Bot API method. Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights, unless it is the creator of the topic. Returns True on success. -## func EditGeneralForumTopic +## func [EditGeneralForumTopic]() ```go func EditGeneralForumTopic(ctx context.Context, b *client.Bot, p *EditGeneralForumTopicParams) (bool, error) @@ -1207,7 +1207,7 @@ EditGeneralForumTopic calls the editGeneralForumTopic Telegram Bot API method. Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights. Returns True on success. -## func EditUserStarSubscription +## func [EditUserStarSubscription]() ```go func EditUserStarSubscription(ctx context.Context, b *client.Bot, p *EditUserStarSubscriptionParams) (bool, error) @@ -1218,7 +1218,7 @@ EditUserStarSubscription calls the editUserStarSubscription Telegram Bot API met Allows the bot to cancel or re\-enable extension of a subscription paid in Telegram Stars. Returns True on success. -## func ExportChatInviteLink +## func [ExportChatInviteLink]() ```go func ExportChatInviteLink(ctx context.Context, b *client.Bot, p *ExportChatInviteLinkParams) (string, error) @@ -1229,7 +1229,7 @@ ExportChatInviteLink calls the exportChatInviteLink Telegram Bot API method. Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success. Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again. -## func GetChatMemberCount +## func [GetChatMemberCount]() ```go func GetChatMemberCount(ctx context.Context, b *client.Bot, p *GetChatMemberCountParams) (int64, error) @@ -1240,7 +1240,7 @@ GetChatMemberCount calls the getChatMemberCount Telegram Bot API method. Use this method to get the number of members in a chat. Returns Int on success. -## func GetManagedBotToken +## func [GetManagedBotToken]() ```go func GetManagedBotToken(ctx context.Context, b *client.Bot, p *GetManagedBotTokenParams) (string, error) @@ -1251,7 +1251,7 @@ GetManagedBotToken calls the getManagedBotToken Telegram Bot API method. Use this method to get the token of a managed bot. Returns the token as String on success. -## func GiftPremiumSubscription +## func [GiftPremiumSubscription]() ```go func GiftPremiumSubscription(ctx context.Context, b *client.Bot, p *GiftPremiumSubscriptionParams) (bool, error) @@ -1262,7 +1262,7 @@ GiftPremiumSubscription calls the giftPremiumSubscription Telegram Bot API metho Gifts a Telegram Premium subscription to the given user. Returns True on success. -## func HideGeneralForumTopic +## func [HideGeneralForumTopic]() ```go func HideGeneralForumTopic(ctx context.Context, b *client.Bot, p *HideGeneralForumTopicParams) (bool, error) @@ -1273,7 +1273,7 @@ HideGeneralForumTopic calls the hideGeneralForumTopic Telegram Bot API method. Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success. -## func LeaveChat +## func [LeaveChat]() ```go func LeaveChat(ctx context.Context, b *client.Bot, p *LeaveChatParams) (bool, error) @@ -1284,7 +1284,7 @@ LeaveChat calls the leaveChat Telegram Bot API method. Use this method for your bot to leave a group, supergroup or channel. Returns True on success. -## func LogOut +## func [LogOut]() ```go func LogOut(ctx context.Context, b *client.Bot, p *LogOutParams) (bool, error) @@ -1295,7 +1295,7 @@ LogOut calls the logOut Telegram Bot API method. Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters. -## func PinChatMessage +## func [PinChatMessage]() ```go func PinChatMessage(ctx context.Context, b *client.Bot, p *PinChatMessageParams) (bool, error) @@ -1306,7 +1306,7 @@ PinChatMessage calls the pinChatMessage Telegram Bot API method. Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non\-service messages can be pinned. Conversely, the bot must be an administrator with the 'can\_pin\_messages' right or the 'can\_edit\_messages' right to pin messages in groups and channels respectively. Returns True on success. -## func PromoteChatMember +## func [PromoteChatMember]() ```go func PromoteChatMember(ctx context.Context, b *client.Bot, p *PromoteChatMemberParams) (bool, error) @@ -1317,7 +1317,7 @@ PromoteChatMember calls the promoteChatMember Telegram Bot API method. Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success. -## func Ptr +## func [Ptr]() ```go func Ptr[T any](v T) *T @@ -1339,7 +1339,7 @@ Limit: api.Ptr(n) ``` -## func ReadBusinessMessage +## func [ReadBusinessMessage]() ```go func ReadBusinessMessage(ctx context.Context, b *client.Bot, p *ReadBusinessMessageParams) (bool, error) @@ -1350,7 +1350,7 @@ ReadBusinessMessage calls the readBusinessMessage Telegram Bot API method. Marks incoming message as read on behalf of a business account. Requires the can\_read\_messages business bot right. Returns True on success. -## func RefundStarPayment +## func [RefundStarPayment]() ```go func RefundStarPayment(ctx context.Context, b *client.Bot, p *RefundStarPaymentParams) (bool, error) @@ -1361,7 +1361,7 @@ RefundStarPayment calls the refundStarPayment Telegram Bot API method. Refunds a successful payment in Telegram Stars. Returns True on success. -## func RemoveBusinessAccountProfilePhoto +## func [RemoveBusinessAccountProfilePhoto]() ```go func RemoveBusinessAccountProfilePhoto(ctx context.Context, b *client.Bot, p *RemoveBusinessAccountProfilePhotoParams) (bool, error) @@ -1372,7 +1372,7 @@ RemoveBusinessAccountProfilePhoto calls the removeBusinessAccountProfilePhoto Te Removes the current profile photo of a managed business account. Requires the can\_edit\_profile\_photo business bot right. Returns True on success. -## func RemoveChatVerification +## func [RemoveChatVerification]() ```go func RemoveChatVerification(ctx context.Context, b *client.Bot, p *RemoveChatVerificationParams) (bool, error) @@ -1383,7 +1383,7 @@ RemoveChatVerification calls the removeChatVerification Telegram Bot API method. Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success. -## func RemoveMyProfilePhoto +## func [RemoveMyProfilePhoto]() ```go func RemoveMyProfilePhoto(ctx context.Context, b *client.Bot, p *RemoveMyProfilePhotoParams) (bool, error) @@ -1394,7 +1394,7 @@ RemoveMyProfilePhoto calls the removeMyProfilePhoto Telegram Bot API method. Removes the profile photo of the bot. Requires no parameters. Returns True on success. -## func RemoveUserVerification +## func [RemoveUserVerification]() ```go func RemoveUserVerification(ctx context.Context, b *client.Bot, p *RemoveUserVerificationParams) (bool, error) @@ -1405,7 +1405,7 @@ RemoveUserVerification calls the removeUserVerification Telegram Bot API method. Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success. -## func ReopenForumTopic +## func [ReopenForumTopic]() ```go func ReopenForumTopic(ctx context.Context, b *client.Bot, p *ReopenForumTopicParams) (bool, error) @@ -1416,7 +1416,7 @@ ReopenForumTopic calls the reopenForumTopic Telegram Bot API method. Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights, unless it is the creator of the topic. Returns True on success. -## func ReopenGeneralForumTopic +## func [ReopenGeneralForumTopic]() ```go func ReopenGeneralForumTopic(ctx context.Context, b *client.Bot, p *ReopenGeneralForumTopicParams) (bool, error) @@ -1427,7 +1427,7 @@ ReopenGeneralForumTopic calls the reopenGeneralForumTopic Telegram Bot API metho Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success. -## func ReplaceManagedBotToken +## func [ReplaceManagedBotToken]() ```go func ReplaceManagedBotToken(ctx context.Context, b *client.Bot, p *ReplaceManagedBotTokenParams) (string, error) @@ -1438,7 +1438,7 @@ ReplaceManagedBotToken calls the replaceManagedBotToken Telegram Bot API method. Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as String on success. -## func ReplaceStickerInSet +## func [ReplaceStickerInSet]() ```go func ReplaceStickerInSet(ctx context.Context, b *client.Bot, p *ReplaceStickerInSetParams) (bool, error) @@ -1449,7 +1449,7 @@ ReplaceStickerInSet calls the replaceStickerInSet Telegram Bot API method. Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success. -## func RestrictChatMember +## func [RestrictChatMember]() ```go func RestrictChatMember(ctx context.Context, b *client.Bot, p *RestrictChatMemberParams) (bool, error) @@ -1460,7 +1460,7 @@ RestrictChatMember calls the restrictChatMember Telegram Bot API method. Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success. -## func SendChatAction +## func [SendChatAction]() ```go func SendChatAction(ctx context.Context, b *client.Bot, p *SendChatActionParams) (bool, error) @@ -1471,7 +1471,7 @@ SendChatAction calls the sendChatAction Telegram Bot API method. Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less \(when a message arrives from your bot, Telegram clients clear its typing status\). Returns True on success. Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload\_photo. The user will see a “sending photo” status for the bot. We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive. -## func SendGift +## func [SendGift]() ```go func SendGift(ctx context.Context, b *client.Bot, p *SendGiftParams) (bool, error) @@ -1482,7 +1482,7 @@ SendGift calls the sendGift Telegram Bot API method. Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success. -## func SendMessageDraft +## func [SendMessageDraft]() ```go func SendMessageDraft(ctx context.Context, b *client.Bot, p *SendMessageDraftParams) (bool, error) @@ -1493,7 +1493,7 @@ SendMessageDraft calls the sendMessageDraft Telegram Bot API method. Use this method to stream a partial message to a user while the message is being generated. Note that the streamed draft is ephemeral and acts as a temporary 30\-second preview \- once the output is finalized, you must call sendMessage with the complete message to persist it in the user's chat. Returns True on success. -## func SetBusinessAccountBio +## func [SetBusinessAccountBio]() ```go func SetBusinessAccountBio(ctx context.Context, b *client.Bot, p *SetBusinessAccountBioParams) (bool, error) @@ -1504,7 +1504,7 @@ SetBusinessAccountBio calls the setBusinessAccountBio Telegram Bot API method. Changes the bio of a managed business account. Requires the can\_change\_bio business bot right. Returns True on success. -## func SetBusinessAccountGiftSettings +## func [SetBusinessAccountGiftSettings]() ```go func SetBusinessAccountGiftSettings(ctx context.Context, b *client.Bot, p *SetBusinessAccountGiftSettingsParams) (bool, error) @@ -1515,7 +1515,7 @@ SetBusinessAccountGiftSettings calls the setBusinessAccountGiftSettings Telegram Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can\_change\_gift\_settings business bot right. Returns True on success. -## func SetBusinessAccountName +## func [SetBusinessAccountName]() ```go func SetBusinessAccountName(ctx context.Context, b *client.Bot, p *SetBusinessAccountNameParams) (bool, error) @@ -1526,7 +1526,7 @@ SetBusinessAccountName calls the setBusinessAccountName Telegram Bot API method. Changes the first and last name of a managed business account. Requires the can\_change\_name business bot right. Returns True on success. -## func SetBusinessAccountProfilePhoto +## func [SetBusinessAccountProfilePhoto]() ```go func SetBusinessAccountProfilePhoto(ctx context.Context, b *client.Bot, p *SetBusinessAccountProfilePhotoParams) (bool, error) @@ -1537,7 +1537,7 @@ SetBusinessAccountProfilePhoto calls the setBusinessAccountProfilePhoto Telegram Changes the profile photo of a managed business account. Requires the can\_edit\_profile\_photo business bot right. Returns True on success. -## func SetBusinessAccountUsername +## func [SetBusinessAccountUsername]() ```go func SetBusinessAccountUsername(ctx context.Context, b *client.Bot, p *SetBusinessAccountUsernameParams) (bool, error) @@ -1548,7 +1548,7 @@ SetBusinessAccountUsername calls the setBusinessAccountUsername Telegram Bot API Changes the username of a managed business account. Requires the can\_change\_username business bot right. Returns True on success. -## func SetChatAdministratorCustomTitle +## func [SetChatAdministratorCustomTitle]() ```go func SetChatAdministratorCustomTitle(ctx context.Context, b *client.Bot, p *SetChatAdministratorCustomTitleParams) (bool, error) @@ -1559,7 +1559,7 @@ SetChatAdministratorCustomTitle calls the setChatAdministratorCustomTitle Telegr Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. -## func SetChatDescription +## func [SetChatDescription]() ```go func SetChatDescription(ctx context.Context, b *client.Bot, p *SetChatDescriptionParams) (bool, error) @@ -1570,7 +1570,7 @@ SetChatDescription calls the setChatDescription Telegram Bot API method. Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. -## func SetChatMemberTag +## func [SetChatMemberTag]() ```go func SetChatMemberTag(ctx context.Context, b *client.Bot, p *SetChatMemberTagParams) (bool, error) @@ -1581,7 +1581,7 @@ SetChatMemberTag calls the setChatMemberTag Telegram Bot API method. Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the can\_manage\_tags administrator right. Returns True on success. -## func SetChatMenuButton +## func [SetChatMenuButton]() ```go func SetChatMenuButton(ctx context.Context, b *client.Bot, p *SetChatMenuButtonParams) (bool, error) @@ -1592,7 +1592,7 @@ SetChatMenuButton calls the setChatMenuButton Telegram Bot API method. Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success. -## func SetChatPermissions +## func [SetChatPermissions]() ```go func SetChatPermissions(ctx context.Context, b *client.Bot, p *SetChatPermissionsParams) (bool, error) @@ -1603,7 +1603,7 @@ SetChatPermissions calls the setChatPermissions Telegram Bot API method. Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can\_restrict\_members administrator rights. Returns True on success. -## func SetChatPhoto +## func [SetChatPhoto]() ```go func SetChatPhoto(ctx context.Context, b *client.Bot, p *SetChatPhotoParams) (bool, error) @@ -1614,7 +1614,7 @@ SetChatPhoto calls the setChatPhoto Telegram Bot API method. Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. -## func SetChatStickerSet +## func [SetChatStickerSet]() ```go func SetChatStickerSet(ctx context.Context, b *client.Bot, p *SetChatStickerSetParams) (bool, error) @@ -1625,7 +1625,7 @@ SetChatStickerSet calls the setChatStickerSet Telegram Bot API method. Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can\_set\_sticker\_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. -## func SetChatTitle +## func [SetChatTitle]() ```go func SetChatTitle(ctx context.Context, b *client.Bot, p *SetChatTitleParams) (bool, error) @@ -1636,7 +1636,7 @@ SetChatTitle calls the setChatTitle Telegram Bot API method. Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. -## func SetCustomEmojiStickerSetThumbnail +## func [SetCustomEmojiStickerSetThumbnail]() ```go func SetCustomEmojiStickerSetThumbnail(ctx context.Context, b *client.Bot, p *SetCustomEmojiStickerSetThumbnailParams) (bool, error) @@ -1647,7 +1647,7 @@ SetCustomEmojiStickerSetThumbnail calls the setCustomEmojiStickerSetThumbnail Te Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success. -## func SetManagedBotAccessSettings +## func [SetManagedBotAccessSettings]() ```go func SetManagedBotAccessSettings(ctx context.Context, b *client.Bot, p *SetManagedBotAccessSettingsParams) (bool, error) @@ -1658,7 +1658,7 @@ SetManagedBotAccessSettings calls the setManagedBotAccessSettings Telegram Bot A Use this method to change the access settings of a managed bot. Returns True on success. -## func SetMessageReaction +## func [SetMessageReaction]() ```go func SetMessageReaction(ctx context.Context, b *client.Bot, p *SetMessageReactionParams) (bool, error) @@ -1669,7 +1669,7 @@ SetMessageReaction calls the setMessageReaction Telegram Bot API method. Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success. -## func SetMyCommands +## func [SetMyCommands]() ```go func SetMyCommands(ctx context.Context, b *client.Bot, p *SetMyCommandsParams) (bool, error) @@ -1680,7 +1680,7 @@ SetMyCommands calls the setMyCommands Telegram Bot API method. Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success. -## func SetMyDefaultAdministratorRights +## func [SetMyDefaultAdministratorRights]() ```go func SetMyDefaultAdministratorRights(ctx context.Context, b *client.Bot, p *SetMyDefaultAdministratorRightsParams) (bool, error) @@ -1691,7 +1691,7 @@ SetMyDefaultAdministratorRights calls the setMyDefaultAdministratorRights Telegr Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success. -## func SetMyDescription +## func [SetMyDescription]() ```go func SetMyDescription(ctx context.Context, b *client.Bot, p *SetMyDescriptionParams) (bool, error) @@ -1702,7 +1702,7 @@ SetMyDescription calls the setMyDescription Telegram Bot API method. Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success. -## func SetMyName +## func [SetMyName]() ```go func SetMyName(ctx context.Context, b *client.Bot, p *SetMyNameParams) (bool, error) @@ -1713,7 +1713,7 @@ SetMyName calls the setMyName Telegram Bot API method. Use this method to change the bot's name. Returns True on success. -## func SetMyProfilePhoto +## func [SetMyProfilePhoto]() ```go func SetMyProfilePhoto(ctx context.Context, b *client.Bot, p *SetMyProfilePhotoParams) (bool, error) @@ -1724,7 +1724,7 @@ SetMyProfilePhoto calls the setMyProfilePhoto Telegram Bot API method. Changes the profile photo of the bot. Returns True on success. -## func SetMyShortDescription +## func [SetMyShortDescription]() ```go func SetMyShortDescription(ctx context.Context, b *client.Bot, p *SetMyShortDescriptionParams) (bool, error) @@ -1735,7 +1735,7 @@ SetMyShortDescription calls the setMyShortDescription Telegram Bot API method. Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success. -## func SetPassportDataErrors +## func [SetPassportDataErrors]() ```go func SetPassportDataErrors(ctx context.Context, b *client.Bot, p *SetPassportDataErrorsParams) (bool, error) @@ -1746,7 +1746,7 @@ SetPassportDataErrors calls the setPassportDataErrors Telegram Bot API method. Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re\-submit their Passport to you until the errors are fixed \(the contents of the field for which you returned the error must change\). Returns True on success. Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. -## func SetStickerEmojiList +## func [SetStickerEmojiList]() ```go func SetStickerEmojiList(ctx context.Context, b *client.Bot, p *SetStickerEmojiListParams) (bool, error) @@ -1757,7 +1757,7 @@ SetStickerEmojiList calls the setStickerEmojiList Telegram Bot API method. Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success. -## func SetStickerKeywords +## func [SetStickerKeywords]() ```go func SetStickerKeywords(ctx context.Context, b *client.Bot, p *SetStickerKeywordsParams) (bool, error) @@ -1768,7 +1768,7 @@ SetStickerKeywords calls the setStickerKeywords Telegram Bot API method. Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success. -## func SetStickerMaskPosition +## func [SetStickerMaskPosition]() ```go func SetStickerMaskPosition(ctx context.Context, b *client.Bot, p *SetStickerMaskPositionParams) (bool, error) @@ -1779,7 +1779,7 @@ SetStickerMaskPosition calls the setStickerMaskPosition Telegram Bot API method. Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success. -## func SetStickerPositionInSet +## func [SetStickerPositionInSet]() ```go func SetStickerPositionInSet(ctx context.Context, b *client.Bot, p *SetStickerPositionInSetParams) (bool, error) @@ -1790,7 +1790,7 @@ SetStickerPositionInSet calls the setStickerPositionInSet Telegram Bot API metho Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success. -## func SetStickerSetThumbnail +## func [SetStickerSetThumbnail]() ```go func SetStickerSetThumbnail(ctx context.Context, b *client.Bot, p *SetStickerSetThumbnailParams) (bool, error) @@ -1801,7 +1801,7 @@ SetStickerSetThumbnail calls the setStickerSetThumbnail Telegram Bot API method. Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success. -## func SetStickerSetTitle +## func [SetStickerSetTitle]() ```go func SetStickerSetTitle(ctx context.Context, b *client.Bot, p *SetStickerSetTitleParams) (bool, error) @@ -1812,7 +1812,7 @@ SetStickerSetTitle calls the setStickerSetTitle Telegram Bot API method. Use this method to set the title of a created sticker set. Returns True on success. -## func SetUserEmojiStatus +## func [SetUserEmojiStatus]() ```go func SetUserEmojiStatus(ctx context.Context, b *client.Bot, p *SetUserEmojiStatusParams) (bool, error) @@ -1823,7 +1823,7 @@ SetUserEmojiStatus calls the setUserEmojiStatus Telegram Bot API method. Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success. -## func SetWebhook +## func [SetWebhook]() ```go func SetWebhook(ctx context.Context, b *client.Bot, p *SetWebhookParams) (bool, error) @@ -1834,7 +1834,7 @@ SetWebhook calls the setWebhook Telegram Bot API method. Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON\-serialized Update. In case of an unsuccessful request \(a request with response HTTP status code different from 2XY\), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success. If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret\_token. If specified, the request will contain a header “X\-Telegram\-Bot\-Api\-Secret\-Token” with the secret token as content. Notes1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.2. To use a self\-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.3. Ports currently supported for webhooks: 443, 80, 88, 8443. If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks. -## func TransferBusinessAccountStars +## func [TransferBusinessAccountStars]() ```go func TransferBusinessAccountStars(ctx context.Context, b *client.Bot, p *TransferBusinessAccountStarsParams) (bool, error) @@ -1845,7 +1845,7 @@ TransferBusinessAccountStars calls the transferBusinessAccountStars Telegram Bot Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can\_transfer\_stars business bot right. Returns True on success. -## func TransferGift +## func [TransferGift]() ```go func TransferGift(ctx context.Context, b *client.Bot, p *TransferGiftParams) (bool, error) @@ -1856,7 +1856,7 @@ TransferGift calls the transferGift Telegram Bot API method. Transfers an owned unique gift to another user. Requires the can\_transfer\_and\_upgrade\_gifts business bot right. Requires can\_transfer\_stars business bot right if the transfer is paid. Returns True on success. -## func UnbanChatMember +## func [UnbanChatMember]() ```go func UnbanChatMember(ctx context.Context, b *client.Bot, p *UnbanChatMemberParams) (bool, error) @@ -1867,7 +1867,7 @@ UnbanChatMember calls the unbanChatMember Telegram Bot API method. Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only\_if\_banned. Returns True on success. -## func UnbanChatSenderChat +## func [UnbanChatSenderChat]() ```go func UnbanChatSenderChat(ctx context.Context, b *client.Bot, p *UnbanChatSenderChatParams) (bool, error) @@ -1878,7 +1878,7 @@ UnbanChatSenderChat calls the unbanChatSenderChat Telegram Bot API method. Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success. -## func UnhideGeneralForumTopic +## func [UnhideGeneralForumTopic]() ```go func UnhideGeneralForumTopic(ctx context.Context, b *client.Bot, p *UnhideGeneralForumTopicParams) (bool, error) @@ -1889,7 +1889,7 @@ UnhideGeneralForumTopic calls the unhideGeneralForumTopic Telegram Bot API metho Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator rights. Returns True on success. -## func UnpinAllChatMessages +## func [UnpinAllChatMessages]() ```go func UnpinAllChatMessages(ctx context.Context, b *client.Bot, p *UnpinAllChatMessagesParams) (bool, error) @@ -1900,7 +1900,7 @@ UnpinAllChatMessages calls the unpinAllChatMessages Telegram Bot API method. Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can\_pin\_messages' right or the 'can\_edit\_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success. -## func UnpinAllForumTopicMessages +## func [UnpinAllForumTopicMessages]() ```go func UnpinAllForumTopicMessages(ctx context.Context, b *client.Bot, p *UnpinAllForumTopicMessagesParams) (bool, error) @@ -1911,7 +1911,7 @@ UnpinAllForumTopicMessages calls the unpinAllForumTopicMessages Telegram Bot API Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat 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. -## func UnpinAllGeneralForumTopicMessages +## func [UnpinAllGeneralForumTopicMessages]() ```go func UnpinAllGeneralForumTopicMessages(ctx context.Context, b *client.Bot, p *UnpinAllGeneralForumTopicMessagesParams) (bool, error) @@ -1922,7 +1922,7 @@ UnpinAllGeneralForumTopicMessages calls the unpinAllGeneralForumTopicMessages Te Use this method 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. -## func UnpinChatMessage +## func [UnpinChatMessage]() ```go func UnpinChatMessage(ctx context.Context, b *client.Bot, p *UnpinChatMessageParams) (bool, error) @@ -1933,7 +1933,7 @@ UnpinChatMessage calls the unpinChatMessage Telegram Bot API method. Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can\_pin\_messages' right or the 'can\_edit\_messages' right to unpin messages in groups and channels respectively. Returns True on success. -## func UpgradeGift +## func [UpgradeGift]() ```go func UpgradeGift(ctx context.Context, b *client.Bot, p *UpgradeGiftParams) (bool, error) @@ -1944,7 +1944,7 @@ UpgradeGift calls the upgradeGift Telegram Bot API method. Upgrades a given regular gift to a unique gift. Requires the can\_transfer\_and\_upgrade\_gifts business bot right. Additionally requires the can\_transfer\_stars business bot right if the upgrade is paid. Returns True on success. -## func VerifyChat +## func [VerifyChat]() ```go func VerifyChat(ctx context.Context, b *client.Bot, p *VerifyChatParams) (bool, error) @@ -1955,7 +1955,7 @@ VerifyChat calls the verifyChat Telegram Bot API method. Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success. -## func VerifyUser +## func [VerifyUser]() ```go func VerifyUser(ctx context.Context, b *client.Bot, p *VerifyUserParams) (bool, error) @@ -1966,7 +1966,7 @@ VerifyUser calls the verifyUser Telegram Bot API method. Verifies a user on behalf of the organization which is represented by the bot. Returns True on success. -## type AcceptedGiftTypes +## type [AcceptedGiftTypes]() This object describes the types of gifts that can be gifted to a user or a chat. @@ -1986,7 +1986,7 @@ type AcceptedGiftTypes struct { ``` -## type AddStickerToSetParams +## type [AddStickerToSetParams]() AddStickerToSetParams is the parameter set for AddStickerToSet. @@ -2004,7 +2004,7 @@ type AddStickerToSetParams struct { ``` -## type AffiliateInfo +## type [AffiliateInfo]() Contains information about the affiliate that received a commission via this transaction. @@ -2024,7 +2024,7 @@ type AffiliateInfo struct { ``` -## type Animation +## type [Animation]() This object represents an animation file \(GIF or H.264/MPEG\-4 AVC video without sound\). @@ -2052,7 +2052,7 @@ type Animation struct { ``` -## type AnswerCallbackQueryParams +## type [AnswerCallbackQueryParams]() AnswerCallbackQueryParams is the parameter set for AnswerCallbackQuery. @@ -2074,7 +2074,7 @@ type AnswerCallbackQueryParams struct { ``` -## type AnswerGuestQueryParams +## type [AnswerGuestQueryParams]() AnswerGuestQueryParams is the parameter set for AnswerGuestQuery. @@ -2090,7 +2090,7 @@ type AnswerGuestQueryParams struct { ``` -## type AnswerInlineQueryParams +## type [AnswerInlineQueryParams]() AnswerInlineQueryParams is the parameter set for AnswerInlineQuery. @@ -2114,7 +2114,7 @@ type AnswerInlineQueryParams struct { ``` -## type AnswerPreCheckoutQueryParams +## type [AnswerPreCheckoutQueryParams]() AnswerPreCheckoutQueryParams is the parameter set for AnswerPreCheckoutQuery. @@ -2132,7 +2132,7 @@ type AnswerPreCheckoutQueryParams struct { ``` -## type AnswerShippingQueryParams +## type [AnswerShippingQueryParams]() AnswerShippingQueryParams is the parameter set for AnswerShippingQuery. @@ -2152,7 +2152,7 @@ type AnswerShippingQueryParams struct { ``` -## type AnswerWebAppQueryParams +## type [AnswerWebAppQueryParams]() AnswerWebAppQueryParams is the parameter set for AnswerWebAppQuery. @@ -2168,7 +2168,7 @@ type AnswerWebAppQueryParams struct { ``` -## type ApproveChatJoinRequestParams +## type [ApproveChatJoinRequestParams]() ApproveChatJoinRequestParams is the parameter set for ApproveChatJoinRequest. @@ -2184,7 +2184,7 @@ type ApproveChatJoinRequestParams struct { ``` -## type ApproveSuggestedPostParams +## type [ApproveSuggestedPostParams]() ApproveSuggestedPostParams is the parameter set for ApproveSuggestedPost. @@ -2202,7 +2202,7 @@ type ApproveSuggestedPostParams struct { ``` -## type Audio +## type [Audio]() This object represents an audio file to be treated as music by the Telegram clients. @@ -2230,7 +2230,7 @@ type Audio struct { ``` -## type BackgroundFill +## type [BackgroundFill]() BackgroundFill is a union type. The following concrete variants implement it: @@ -2247,7 +2247,7 @@ type BackgroundFill interface { ``` -### func UnmarshalBackgroundFill +### func [UnmarshalBackgroundFill]() ```go func UnmarshalBackgroundFill(data []byte) (BackgroundFill, error) @@ -2256,7 +2256,7 @@ func UnmarshalBackgroundFill(data []byte) (BackgroundFill, error) UnmarshalBackgroundFill decodes a BackgroundFill from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type BackgroundFillFreeformGradient +## type [BackgroundFillFreeformGradient]() The background is a freeform gradient that rotates after every message in the chat. @@ -2270,7 +2270,7 @@ type BackgroundFillFreeformGradient struct { ``` -## type BackgroundFillFreeformGradientType +## type [BackgroundFillFreeformGradientType]() @@ -2287,7 +2287,7 @@ const ( ``` -## type BackgroundFillGradient +## type [BackgroundFillGradient]() The background is a gradient fill. @@ -2305,7 +2305,7 @@ type BackgroundFillGradient struct { ``` -## type BackgroundFillGradientType +## type [BackgroundFillGradientType]() @@ -2322,7 +2322,7 @@ const ( ``` -## type BackgroundFillSolid +## type [BackgroundFillSolid]() The background is filled using the selected color. @@ -2336,7 +2336,7 @@ type BackgroundFillSolid struct { ``` -## type BackgroundFillSolidType +## type [BackgroundFillSolidType]() @@ -2353,7 +2353,7 @@ const ( ``` -## type BackgroundType +## type [BackgroundType]() BackgroundType is a union type. The following concrete variants implement it: @@ -2371,7 +2371,7 @@ type BackgroundType interface { ``` -### func UnmarshalBackgroundType +### func [UnmarshalBackgroundType]() ```go func UnmarshalBackgroundType(data []byte) (BackgroundType, error) @@ -2380,7 +2380,7 @@ func UnmarshalBackgroundType(data []byte) (BackgroundType, error) UnmarshalBackgroundType decodes a BackgroundType from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type BackgroundTypeChatTheme +## type [BackgroundTypeChatTheme]() The background is taken directly from a built\-in chat theme. @@ -2394,7 +2394,7 @@ type BackgroundTypeChatTheme struct { ``` -## type BackgroundTypeChatThemeType +## type [BackgroundTypeChatThemeType]() @@ -2411,7 +2411,7 @@ const ( ``` -## type BackgroundTypeFill +## type [BackgroundTypeFill]() The background is automatically filled based on the selected colors. @@ -2427,7 +2427,7 @@ type BackgroundTypeFill struct { ``` -### func \(\*BackgroundTypeFill\) UnmarshalJSON +### func \(\*BackgroundTypeFill\) [UnmarshalJSON]() ```go func (m *BackgroundTypeFill) UnmarshalJSON(data []byte) error @@ -2436,7 +2436,7 @@ func (m *BackgroundTypeFill) UnmarshalJSON(data []byte) error UnmarshalJSON decodes BackgroundTypeFill by dispatching union\-typed fields \(Fill\) through their concrete UnmarshalXxx helpers. -## type BackgroundTypeFillType +## type [BackgroundTypeFillType]() @@ -2453,7 +2453,7 @@ const ( ``` -## type BackgroundTypePattern +## type [BackgroundTypePattern]() The background is a .PNG or .TGV \(gzipped subset of SVG with MIME type “application/x\-tgwallpattern”\) pattern to be combined with the background fill chosen by the user. @@ -2475,7 +2475,7 @@ type BackgroundTypePattern struct { ``` -### func \(\*BackgroundTypePattern\) UnmarshalJSON +### func \(\*BackgroundTypePattern\) [UnmarshalJSON]() ```go func (m *BackgroundTypePattern) UnmarshalJSON(data []byte) error @@ -2484,7 +2484,7 @@ func (m *BackgroundTypePattern) UnmarshalJSON(data []byte) error UnmarshalJSON decodes BackgroundTypePattern by dispatching union\-typed fields \(Fill\) through their concrete UnmarshalXxx helpers. -## type BackgroundTypePatternType +## type [BackgroundTypePatternType]() @@ -2501,7 +2501,7 @@ const ( ``` -## type BackgroundTypeWallpaper +## type [BackgroundTypeWallpaper]() The background is a wallpaper in the JPEG format. @@ -2521,7 +2521,7 @@ type BackgroundTypeWallpaper struct { ``` -## type BackgroundTypeWallpaperType +## type [BackgroundTypeWallpaperType]() @@ -2538,7 +2538,7 @@ const ( ``` -## type BanChatMemberParams +## type [BanChatMemberParams]() BanChatMemberParams is the parameter set for BanChatMember. @@ -2558,7 +2558,7 @@ type BanChatMemberParams struct { ``` -## type BanChatSenderChatParams +## type [BanChatSenderChatParams]() BanChatSenderChatParams is the parameter set for BanChatSenderChat. @@ -2574,7 +2574,7 @@ type BanChatSenderChatParams struct { ``` -## type Birthdate +## type [Birthdate]() Describes the birthdate of a user. @@ -2590,7 +2590,7 @@ type Birthdate struct { ``` -## type BotAccessSettings +## type [BotAccessSettings]() This object describes the access settings of a bot. @@ -2604,7 +2604,7 @@ type BotAccessSettings struct { ``` -### func GetManagedBotAccessSettings +### func [GetManagedBotAccessSettings]() ```go func GetManagedBotAccessSettings(ctx context.Context, b *client.Bot, p *GetManagedBotAccessSettingsParams) (*BotAccessSettings, error) @@ -2615,7 +2615,7 @@ GetManagedBotAccessSettings calls the getManagedBotAccessSettings Telegram Bot A Use this method to get the access settings of a managed bot. Returns a BotAccessSettings object on success. -## type BotCommand +## type [BotCommand]() This object represents a bot command. @@ -2629,7 +2629,7 @@ type BotCommand struct { ``` -### func GetMyCommands +### func [GetMyCommands]() ```go func GetMyCommands(ctx context.Context, b *client.Bot, p *GetMyCommandsParams) ([]BotCommand, error) @@ -2640,7 +2640,7 @@ GetMyCommands calls the getMyCommands Telegram Bot API method. Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned. -## type BotCommandScope +## type [BotCommandScope]() BotCommandScope is a union type. The following concrete variants implement it: @@ -2661,7 +2661,7 @@ type BotCommandScope interface { ``` -## type BotCommandScopeAllChatAdministrators +## type [BotCommandScopeAllChatAdministrators]() Represents the scope of bot commands, covering all group and supergroup chat administrators. @@ -2673,7 +2673,7 @@ type BotCommandScopeAllChatAdministrators struct { ``` -## type BotCommandScopeAllGroupChats +## type [BotCommandScopeAllGroupChats]() Represents the scope of bot commands, covering all group and supergroup chats. @@ -2685,7 +2685,7 @@ type BotCommandScopeAllGroupChats struct { ``` -## type BotCommandScopeAllPrivateChats +## type [BotCommandScopeAllPrivateChats]() Represents the scope of bot commands, covering all private chats. @@ -2697,7 +2697,7 @@ type BotCommandScopeAllPrivateChats struct { ``` -## type BotCommandScopeChat +## type [BotCommandScopeChat]() Represents the scope of bot commands, covering a specific chat. @@ -2711,7 +2711,7 @@ type BotCommandScopeChat struct { ``` -## type BotCommandScopeChatAdministrators +## type [BotCommandScopeChatAdministrators]() Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat. @@ -2725,7 +2725,7 @@ type BotCommandScopeChatAdministrators struct { ``` -## type BotCommandScopeChatMember +## type [BotCommandScopeChatMember]() Represents the scope of bot commands, covering a specific member of a group or supergroup chat. @@ -2741,7 +2741,7 @@ type BotCommandScopeChatMember struct { ``` -## type BotCommandScopeDefault +## type [BotCommandScopeDefault]() Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user. @@ -2753,7 +2753,7 @@ type BotCommandScopeDefault struct { ``` -## type BotDescription +## type [BotDescription]() This object represents the bot's description. @@ -2765,7 +2765,7 @@ type BotDescription struct { ``` -### func GetMyDescription +### func [GetMyDescription]() ```go func GetMyDescription(ctx context.Context, b *client.Bot, p *GetMyDescriptionParams) (*BotDescription, error) @@ -2776,7 +2776,7 @@ GetMyDescription calls the getMyDescription Telegram Bot API method. Use this method to get the current bot description for the given user language. Returns BotDescription on success. -## type BotName +## type [BotName]() This object represents the bot's name. @@ -2788,7 +2788,7 @@ type BotName struct { ``` -### func GetMyName +### func [GetMyName]() ```go func GetMyName(ctx context.Context, b *client.Bot, p *GetMyNameParams) (*BotName, error) @@ -2799,7 +2799,7 @@ GetMyName calls the getMyName Telegram Bot API method. Use this method to get the current bot name for the given user language. Returns BotName on success. -## type BotShortDescription +## type [BotShortDescription]() This object represents the bot's short description. @@ -2811,7 +2811,7 @@ type BotShortDescription struct { ``` -### func GetMyShortDescription +### func [GetMyShortDescription]() ```go func GetMyShortDescription(ctx context.Context, b *client.Bot, p *GetMyShortDescriptionParams) (*BotShortDescription, error) @@ -2822,7 +2822,7 @@ GetMyShortDescription calls the getMyShortDescription Telegram Bot API method. Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success. -## type BusinessBotRights +## type [BusinessBotRights]() Represents the rights of a business bot. @@ -2860,7 +2860,7 @@ type BusinessBotRights struct { ``` -## type BusinessConnection +## type [BusinessConnection]() Describes the connection of the bot with a business account. @@ -2882,7 +2882,7 @@ type BusinessConnection struct { ``` -### func GetBusinessConnection +### func [GetBusinessConnection]() ```go func GetBusinessConnection(ctx context.Context, b *client.Bot, p *GetBusinessConnectionParams) (*BusinessConnection, error) @@ -2893,7 +2893,7 @@ GetBusinessConnection calls the getBusinessConnection Telegram Bot API method. Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success. -## type BusinessIntro +## type [BusinessIntro]() Contains information about the start page settings of a Telegram Business account. @@ -2909,7 +2909,7 @@ type BusinessIntro struct { ``` -## type BusinessLocation +## type [BusinessLocation]() Contains information about the location of a Telegram Business account. @@ -2923,7 +2923,7 @@ type BusinessLocation struct { ``` -## type BusinessMessagesDeleted +## type [BusinessMessagesDeleted]() This object is received when messages are deleted from a connected business account. @@ -2939,7 +2939,7 @@ type BusinessMessagesDeleted struct { ``` -## type BusinessOpeningHours +## type [BusinessOpeningHours]() Describes the opening hours of a business. @@ -2953,7 +2953,7 @@ type BusinessOpeningHours struct { ``` -## type BusinessOpeningHoursInterval +## type [BusinessOpeningHoursInterval]() Describes an interval of time during which a business is open. @@ -2967,7 +2967,7 @@ type BusinessOpeningHoursInterval struct { ``` -## type CallbackGame +## type [CallbackGame]() A placeholder, currently holds no information. Use BotFather to set up your game. @@ -2977,7 +2977,7 @@ type CallbackGame struct { ``` -## type CallbackQuery +## type [CallbackQuery]() This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot \(in inline mode\), the field inline\_message\_id will be present. Exactly one of the fields data or game\_short\_name will be present. NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed \(e.g., without specifying any of the optional parameters\). @@ -3001,7 +3001,7 @@ type CallbackQuery struct { ``` -### func \(\*CallbackQuery\) UnmarshalJSON +### func \(\*CallbackQuery\) [UnmarshalJSON]() ```go func (m *CallbackQuery) UnmarshalJSON(data []byte) error @@ -3010,7 +3010,7 @@ func (m *CallbackQuery) UnmarshalJSON(data []byte) error UnmarshalJSON decodes CallbackQuery by dispatching union\-typed fields \(Message\) through their concrete UnmarshalXxx helpers. -## type Chat +## type [Chat]() This object represents a chat. @@ -3036,7 +3036,7 @@ type Chat struct { ``` -## type ChatAdministratorRights +## type [ChatAdministratorRights]() Represents the rights of an administrator in a chat. @@ -3080,7 +3080,7 @@ type ChatAdministratorRights struct { ``` -### func GetMyDefaultAdministratorRights +### func [GetMyDefaultAdministratorRights]() ```go func GetMyDefaultAdministratorRights(ctx context.Context, b *client.Bot, p *GetMyDefaultAdministratorRightsParams) (*ChatAdministratorRights, error) @@ -3091,7 +3091,7 @@ GetMyDefaultAdministratorRights calls the getMyDefaultAdministratorRights Telegr Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success. -## type ChatBackground +## type [ChatBackground]() This object represents a chat background. @@ -3103,7 +3103,7 @@ type ChatBackground struct { ``` -### func \(\*ChatBackground\) UnmarshalJSON +### func \(\*ChatBackground\) [UnmarshalJSON]() ```go func (m *ChatBackground) UnmarshalJSON(data []byte) error @@ -3112,7 +3112,7 @@ func (m *ChatBackground) UnmarshalJSON(data []byte) error UnmarshalJSON decodes ChatBackground by dispatching union\-typed fields \(Type\) through their concrete UnmarshalXxx helpers. -## type ChatBoost +## type [ChatBoost]() This object contains information about a chat boost. @@ -3130,7 +3130,7 @@ type ChatBoost struct { ``` -### func \(\*ChatBoost\) UnmarshalJSON +### func \(\*ChatBoost\) [UnmarshalJSON]() ```go func (m *ChatBoost) UnmarshalJSON(data []byte) error @@ -3139,7 +3139,7 @@ func (m *ChatBoost) UnmarshalJSON(data []byte) error UnmarshalJSON decodes ChatBoost by dispatching union\-typed fields \(Source\) through their concrete UnmarshalXxx helpers. -## type ChatBoostAdded +## type [ChatBoostAdded]() This object represents a service message about a user boosting a chat. @@ -3151,7 +3151,7 @@ type ChatBoostAdded struct { ``` -## type ChatBoostRemoved +## type [ChatBoostRemoved]() This object represents a boost removed from a chat. @@ -3169,7 +3169,7 @@ type ChatBoostRemoved struct { ``` -### func \(\*ChatBoostRemoved\) UnmarshalJSON +### func \(\*ChatBoostRemoved\) [UnmarshalJSON]() ```go func (m *ChatBoostRemoved) UnmarshalJSON(data []byte) error @@ -3178,7 +3178,7 @@ func (m *ChatBoostRemoved) UnmarshalJSON(data []byte) error UnmarshalJSON decodes ChatBoostRemoved by dispatching union\-typed fields \(Source\) through their concrete UnmarshalXxx helpers. -## type ChatBoostSource +## type [ChatBoostSource]() ChatBoostSource is a union type. The following concrete variants implement it: @@ -3195,7 +3195,7 @@ type ChatBoostSource interface { ``` -### func UnmarshalChatBoostSource +### func [UnmarshalChatBoostSource]() ```go func UnmarshalChatBoostSource(data []byte) (ChatBoostSource, error) @@ -3204,7 +3204,7 @@ func UnmarshalChatBoostSource(data []byte) (ChatBoostSource, error) UnmarshalChatBoostSource decodes a ChatBoostSource from JSON by inspecting the "source" field and dispatching to the correct concrete type. -## type ChatBoostSourceGiftCode +## type [ChatBoostSourceGiftCode]() The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. @@ -3218,7 +3218,7 @@ type ChatBoostSourceGiftCode struct { ``` -## type ChatBoostSourceGiftCodeSource +## type [ChatBoostSourceGiftCodeSource]() @@ -3235,7 +3235,7 @@ const ( ``` -## type ChatBoostSourceGiveaway +## type [ChatBoostSourceGiveaway]() The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize\_star\_count / 500 times for one year for Telegram Star giveaways. @@ -3255,7 +3255,7 @@ type ChatBoostSourceGiveaway struct { ``` -## type ChatBoostSourceGiveawaySource +## type [ChatBoostSourceGiveawaySource]() @@ -3272,7 +3272,7 @@ const ( ``` -## type ChatBoostSourcePremium +## type [ChatBoostSourcePremium]() The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. @@ -3286,7 +3286,7 @@ type ChatBoostSourcePremium struct { ``` -## type ChatBoostSourcePremiumSource +## type [ChatBoostSourcePremiumSource]() @@ -3303,7 +3303,7 @@ const ( ``` -## type ChatBoostUpdated +## type [ChatBoostUpdated]() This object represents a boost added to a chat or changed. @@ -3317,7 +3317,7 @@ type ChatBoostUpdated struct { ``` -## type ChatFullInfo +## type [ChatFullInfo]() This object contains full information about a chat. @@ -3429,7 +3429,7 @@ type ChatFullInfo struct { ``` -### func GetChat +### func [GetChat]() ```go func GetChat(ctx context.Context, b *client.Bot, p *GetChatParams) (*ChatFullInfo, error) @@ -3440,7 +3440,7 @@ GetChat calls the getChat Telegram Bot API method. Use this method to get up\-to\-date information about the chat. Returns a ChatFullInfo object on success. -### func \(\*ChatFullInfo\) UnmarshalJSON +### func \(\*ChatFullInfo\) [UnmarshalJSON]() ```go func (m *ChatFullInfo) UnmarshalJSON(data []byte) error @@ -3449,7 +3449,7 @@ func (m *ChatFullInfo) UnmarshalJSON(data []byte) error UnmarshalJSON decodes ChatFullInfo by dispatching union\-typed fields \(AvailableReactions\) through their concrete UnmarshalXxx helpers. -## type ChatID +## type [ChatID]() ChatID identifies a chat by either numeric id or "@username". The Telegram Bot API spells the same field as either an integer or a string; ChatID preserves both forms with explicit constructors and a custom MarshalJSON so callers never see \`any\` at the source level. @@ -3460,7 +3460,7 @@ type ChatID struct { ``` -### func ChatIDFromInt +### func [ChatIDFromInt]() ```go func ChatIDFromInt(id int64) ChatID @@ -3469,7 +3469,7 @@ func ChatIDFromInt(id int64) ChatID ChatIDFromInt builds a ChatID for a numeric chat identifier \(e.g. \-1001234567890\). -### func ChatIDFromUsername +### func [ChatIDFromUsername]() ```go func ChatIDFromUsername(name string) ChatID @@ -3478,7 +3478,7 @@ func ChatIDFromUsername(name string) ChatID ChatIDFromUsername builds a ChatID for a public chat \(e.g. "@channel"\). The leading "@" is required by Telegram for usernames. -### func \(ChatID\) IsZero +### func \(ChatID\) [IsZero]() ```go func (c ChatID) IsZero() bool @@ -3487,7 +3487,7 @@ func (c ChatID) IsZero() bool IsZero reports whether c carries no value. -### func \(ChatID\) MarshalJSON +### func \(ChatID\) [MarshalJSON]() ```go func (c ChatID) MarshalJSON() ([]byte, error) @@ -3496,7 +3496,7 @@ func (c ChatID) MarshalJSON() ([]byte, error) MarshalJSON emits either a JSON number \(integer form\) or a JSON string \(@username form\). Empty values marshal as "null". -### func \(ChatID\) String +### func \(ChatID\) [String]() ```go func (c ChatID) String() string @@ -3505,7 +3505,7 @@ func (c ChatID) String() string String returns the wire form \(decimal integer or "@name"\) for use in multipart bodies. -### func \(\*ChatID\) UnmarshalJSON +### func \(\*ChatID\) [UnmarshalJSON]() ```go func (c *ChatID) UnmarshalJSON(data []byte) error @@ -3514,7 +3514,7 @@ func (c *ChatID) UnmarshalJSON(data []byte) error UnmarshalJSON accepts either a JSON number or a JSON string. -## type ChatInviteLink +## type [ChatInviteLink]() Represents an invite link for a chat. @@ -3546,7 +3546,7 @@ type ChatInviteLink struct { ``` -### func CreateChatInviteLink +### func [CreateChatInviteLink]() ```go func CreateChatInviteLink(ctx context.Context, b *client.Bot, p *CreateChatInviteLinkParams) (*ChatInviteLink, error) @@ -3557,7 +3557,7 @@ CreateChatInviteLink calls the createChatInviteLink Telegram Bot API method. Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object. -### func CreateChatSubscriptionInviteLink +### func [CreateChatSubscriptionInviteLink]() ```go func CreateChatSubscriptionInviteLink(ctx context.Context, b *client.Bot, p *CreateChatSubscriptionInviteLinkParams) (*ChatInviteLink, error) @@ -3568,7 +3568,7 @@ CreateChatSubscriptionInviteLink calls the createChatSubscriptionInviteLink Tele Use this method to create a subscription invite link for a channel chat. The bot must have the can\_invite\_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object. -### func EditChatInviteLink +### func [EditChatInviteLink]() ```go func EditChatInviteLink(ctx context.Context, b *client.Bot, p *EditChatInviteLinkParams) (*ChatInviteLink, error) @@ -3579,7 +3579,7 @@ EditChatInviteLink calls the editChatInviteLink Telegram Bot API method. Use this method to edit a non\-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object. -### func EditChatSubscriptionInviteLink +### func [EditChatSubscriptionInviteLink]() ```go func EditChatSubscriptionInviteLink(ctx context.Context, b *client.Bot, p *EditChatSubscriptionInviteLinkParams) (*ChatInviteLink, error) @@ -3590,7 +3590,7 @@ EditChatSubscriptionInviteLink calls the editChatSubscriptionInviteLink Telegram Use this method to edit a subscription invite link created by the bot. The bot must have the can\_invite\_users administrator rights. Returns the edited invite link as a ChatInviteLink object. -### func RevokeChatInviteLink +### func [RevokeChatInviteLink]() ```go func RevokeChatInviteLink(ctx context.Context, b *client.Bot, p *RevokeChatInviteLinkParams) (*ChatInviteLink, error) @@ -3601,7 +3601,7 @@ RevokeChatInviteLink calls the revokeChatInviteLink Telegram Bot API method. Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object. -## type ChatJoinRequest +## type [ChatJoinRequest]() Represents a join request sent to a chat. @@ -3623,7 +3623,7 @@ type ChatJoinRequest struct { ``` -## type ChatLocation +## type [ChatLocation]() Represents a location to which a chat is connected. @@ -3637,7 +3637,7 @@ type ChatLocation struct { ``` -## type ChatMember +## type [ChatMember]() ChatMember is a union type. The following concrete variants implement it: @@ -3657,7 +3657,7 @@ type ChatMember interface { ``` -### func GetChatAdministrators +### func [GetChatAdministrators]() ```go func GetChatAdministrators(ctx context.Context, b *client.Bot, p *GetChatAdministratorsParams) ([]ChatMember, error) @@ -3668,7 +3668,7 @@ GetChatAdministrators calls the getChatAdministrators Telegram Bot API method. Use this method to get a list of administrators in a chat. Returns an Array of ChatMember objects. -### func GetChatMember +### func [GetChatMember]() ```go func GetChatMember(ctx context.Context, b *client.Bot, p *GetChatMemberParams) (ChatMember, error) @@ -3679,7 +3679,7 @@ GetChatMember calls the getChatMember Telegram Bot API method. Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success. -### func UnmarshalChatMember +### func [UnmarshalChatMember]() ```go func UnmarshalChatMember(data []byte) (ChatMember, error) @@ -3688,7 +3688,7 @@ func UnmarshalChatMember(data []byte) (ChatMember, error) UnmarshalChatMember decodes a ChatMember from JSON by inspecting the "status" field and dispatching to the correct concrete type. -## type ChatMemberAdministrator +## type [ChatMemberAdministrator]() Represents a chat member that has some additional privileges. @@ -3740,7 +3740,7 @@ type ChatMemberAdministrator struct { ``` -## type ChatMemberAdministratorStatus +## type [ChatMemberAdministratorStatus]() @@ -3757,7 +3757,7 @@ const ( ``` -## type ChatMemberBanned +## type [ChatMemberBanned]() Represents a chat member that was banned in the chat and can't return to the chat or view chat messages. @@ -3773,7 +3773,7 @@ type ChatMemberBanned struct { ``` -## type ChatMemberBannedStatus +## type [ChatMemberBannedStatus]() @@ -3790,7 +3790,7 @@ const ( ``` -## type ChatMemberLeft +## type [ChatMemberLeft]() Represents a chat member that isn't currently a member of the chat, but may join it themselves. @@ -3804,7 +3804,7 @@ type ChatMemberLeft struct { ``` -## type ChatMemberLeftStatus +## type [ChatMemberLeftStatus]() @@ -3821,7 +3821,7 @@ const ( ``` -## type ChatMemberMember +## type [ChatMemberMember]() Represents a chat member that has no additional privileges or restrictions. @@ -3839,7 +3839,7 @@ type ChatMemberMember struct { ``` -## type ChatMemberMemberStatus +## type [ChatMemberMemberStatus]() @@ -3856,7 +3856,7 @@ const ( ``` -## type ChatMemberOwner +## type [ChatMemberOwner]() Represents a chat member that owns the chat and has all administrator privileges. @@ -3874,7 +3874,7 @@ type ChatMemberOwner struct { ``` -## type ChatMemberOwnerStatus +## type [ChatMemberOwnerStatus]() @@ -3891,7 +3891,7 @@ const ( ``` -## type ChatMemberRestricted +## type [ChatMemberRestricted]() Represents a chat member that is under certain restrictions in the chat. Supergroups only. @@ -3943,7 +3943,7 @@ type ChatMemberRestricted struct { ``` -## type ChatMemberRestrictedStatus +## type [ChatMemberRestrictedStatus]() @@ -3960,7 +3960,7 @@ const ( ``` -## type ChatMemberUpdated +## type [ChatMemberUpdated]() This object represents changes in the status of a chat member. @@ -3986,7 +3986,7 @@ type ChatMemberUpdated struct { ``` -### func \(\*ChatMemberUpdated\) UnmarshalJSON +### func \(\*ChatMemberUpdated\) [UnmarshalJSON]() ```go func (m *ChatMemberUpdated) UnmarshalJSON(data []byte) error @@ -3995,7 +3995,7 @@ func (m *ChatMemberUpdated) UnmarshalJSON(data []byte) error UnmarshalJSON decodes ChatMemberUpdated by dispatching union\-typed fields \(OldChatMember, NewChatMember\) through their concrete UnmarshalXxx helpers. -## type ChatOwnerChanged +## type [ChatOwnerChanged]() Describes a service message about an ownership change in the chat. @@ -4007,7 +4007,7 @@ type ChatOwnerChanged struct { ``` -## type ChatOwnerLeft +## type [ChatOwnerLeft]() Describes a service message about the chat owner leaving the chat. @@ -4019,7 +4019,7 @@ type ChatOwnerLeft struct { ``` -## type ChatPermissions +## type [ChatPermissions]() Describes actions that a non\-administrator user is allowed to take in a chat. @@ -4061,7 +4061,7 @@ type ChatPermissions struct { ``` -## type ChatPhoto +## type [ChatPhoto]() This object represents a chat photo. @@ -4079,7 +4079,7 @@ type ChatPhoto struct { ``` -## type ChatShared +## type [ChatShared]() This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button. @@ -4099,7 +4099,7 @@ type ChatShared struct { ``` -## type ChatType +## type [ChatType]() @@ -4119,7 +4119,7 @@ const ( ``` -## type Checklist +## type [Checklist]() Describes a checklist. @@ -4139,7 +4139,7 @@ type Checklist struct { ``` -## type ChecklistTask +## type [ChecklistTask]() Describes a task in a checklist. @@ -4161,7 +4161,7 @@ type ChecklistTask struct { ``` -## type ChecklistTasksAdded +## type [ChecklistTasksAdded]() Describes a service message about tasks added to a checklist. @@ -4175,7 +4175,7 @@ type ChecklistTasksAdded struct { ``` -## type ChecklistTasksDone +## type [ChecklistTasksDone]() Describes a service message about checklist tasks marked as done or not done. @@ -4191,7 +4191,7 @@ type ChecklistTasksDone struct { ``` -## type ChosenInlineResult +## type [ChosenInlineResult]() Represents a result of an inline query that was chosen by the user and sent to their chat partner. Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates. @@ -4211,7 +4211,7 @@ type ChosenInlineResult struct { ``` -## type CloseForumTopicParams +## type [CloseForumTopicParams]() CloseForumTopicParams is the parameter set for CloseForumTopic. @@ -4227,7 +4227,7 @@ type CloseForumTopicParams struct { ``` -## type CloseGeneralForumTopicParams +## type [CloseGeneralForumTopicParams]() CloseGeneralForumTopicParams is the parameter set for CloseGeneralForumTopic. @@ -4241,7 +4241,7 @@ type CloseGeneralForumTopicParams struct { ``` -## type CloseParams +## type [CloseParams]() CloseParams is the parameter set for Close. @@ -4253,7 +4253,7 @@ type CloseParams struct { ``` -## type Contact +## type [Contact]() This object represents a phone contact. @@ -4273,7 +4273,7 @@ type Contact struct { ``` -## type ConvertGiftToStarsParams +## type [ConvertGiftToStarsParams]() ConvertGiftToStarsParams is the parameter set for ConvertGiftToStars. @@ -4289,7 +4289,7 @@ type ConvertGiftToStarsParams struct { ``` -## type CopyMessageParams +## type [CopyMessageParams]() CopyMessageParams is the parameter set for CopyMessage. @@ -4335,7 +4335,7 @@ type CopyMessageParams struct { ``` -## type CopyMessagesParams +## type [CopyMessagesParams]() CopyMessagesParams is the parameter set for CopyMessages. @@ -4363,7 +4363,7 @@ type CopyMessagesParams struct { ``` -## type CopyTextButton +## type [CopyTextButton]() This object represents an inline keyboard button that copies specified text to the clipboard. @@ -4375,7 +4375,7 @@ type CopyTextButton struct { ``` -## type CreateChatInviteLinkParams +## type [CreateChatInviteLinkParams]() CreateChatInviteLinkParams is the parameter set for CreateChatInviteLink. @@ -4397,7 +4397,7 @@ type CreateChatInviteLinkParams struct { ``` -## type CreateChatSubscriptionInviteLinkParams +## type [CreateChatSubscriptionInviteLinkParams]() CreateChatSubscriptionInviteLinkParams is the parameter set for CreateChatSubscriptionInviteLink. @@ -4417,7 +4417,7 @@ type CreateChatSubscriptionInviteLinkParams struct { ``` -## type CreateForumTopicParams +## type [CreateForumTopicParams]() CreateForumTopicParams is the parameter set for CreateForumTopic. @@ -4437,7 +4437,7 @@ type CreateForumTopicParams struct { ``` -## type CreateInvoiceLinkParams +## type [CreateInvoiceLinkParams]() CreateInvoiceLinkParams is the parameter set for CreateInvoiceLink. @@ -4493,7 +4493,7 @@ type CreateInvoiceLinkParams struct { ``` -## type CreateNewStickerSetParams +## type [CreateNewStickerSetParams]() CreateNewStickerSetParams is the parameter set for CreateNewStickerSet. @@ -4517,7 +4517,7 @@ type CreateNewStickerSetParams struct { ``` -## type DeclineChatJoinRequestParams +## type [DeclineChatJoinRequestParams]() DeclineChatJoinRequestParams is the parameter set for DeclineChatJoinRequest. @@ -4533,7 +4533,7 @@ type DeclineChatJoinRequestParams struct { ``` -## type DeclineSuggestedPostParams +## type [DeclineSuggestedPostParams]() DeclineSuggestedPostParams is the parameter set for DeclineSuggestedPost. @@ -4551,7 +4551,7 @@ type DeclineSuggestedPostParams struct { ``` -## type DeleteAllMessageReactionsParams +## type [DeleteAllMessageReactionsParams]() DeleteAllMessageReactionsParams is the parameter set for DeleteAllMessageReactions. @@ -4569,7 +4569,7 @@ type DeleteAllMessageReactionsParams struct { ``` -## type DeleteBusinessMessagesParams +## type [DeleteBusinessMessagesParams]() DeleteBusinessMessagesParams is the parameter set for DeleteBusinessMessages. @@ -4585,7 +4585,7 @@ type DeleteBusinessMessagesParams struct { ``` -## type DeleteChatPhotoParams +## type [DeleteChatPhotoParams]() DeleteChatPhotoParams is the parameter set for DeleteChatPhoto. @@ -4599,7 +4599,7 @@ type DeleteChatPhotoParams struct { ``` -## type DeleteChatStickerSetParams +## type [DeleteChatStickerSetParams]() DeleteChatStickerSetParams is the parameter set for DeleteChatStickerSet. @@ -4613,7 +4613,7 @@ type DeleteChatStickerSetParams struct { ``` -## type DeleteForumTopicParams +## type [DeleteForumTopicParams]() DeleteForumTopicParams is the parameter set for DeleteForumTopic. @@ -4629,7 +4629,7 @@ type DeleteForumTopicParams struct { ``` -## type DeleteMessageParams +## type [DeleteMessageParams]() DeleteMessageParams is the parameter set for DeleteMessage. @@ -4645,7 +4645,7 @@ type DeleteMessageParams struct { ``` -## type DeleteMessageReactionParams +## type [DeleteMessageReactionParams]() DeleteMessageReactionParams is the parameter set for DeleteMessageReaction. @@ -4665,7 +4665,7 @@ type DeleteMessageReactionParams struct { ``` -## type DeleteMessagesParams +## type [DeleteMessagesParams]() DeleteMessagesParams is the parameter set for DeleteMessages. @@ -4681,7 +4681,7 @@ type DeleteMessagesParams struct { ``` -## type DeleteMyCommandsParams +## type [DeleteMyCommandsParams]() DeleteMyCommandsParams is the parameter set for DeleteMyCommands. @@ -4697,7 +4697,7 @@ type DeleteMyCommandsParams struct { ``` -## type DeleteStickerFromSetParams +## type [DeleteStickerFromSetParams]() DeleteStickerFromSetParams is the parameter set for DeleteStickerFromSet. @@ -4711,7 +4711,7 @@ type DeleteStickerFromSetParams struct { ``` -## type DeleteStickerSetParams +## type [DeleteStickerSetParams]() DeleteStickerSetParams is the parameter set for DeleteStickerSet. @@ -4725,7 +4725,7 @@ type DeleteStickerSetParams struct { ``` -## type DeleteStoryParams +## type [DeleteStoryParams]() DeleteStoryParams is the parameter set for DeleteStory. @@ -4741,7 +4741,7 @@ type DeleteStoryParams struct { ``` -## type DeleteWebhookParams +## type [DeleteWebhookParams]() DeleteWebhookParams is the parameter set for DeleteWebhook. @@ -4755,7 +4755,7 @@ type DeleteWebhookParams struct { ``` -## type Dice +## type [Dice]() This object represents an animated emoji that displays a random value. @@ -4769,7 +4769,7 @@ type Dice struct { ``` -## type DirectMessagePriceChanged +## type [DirectMessagePriceChanged]() Describes a service message about a change in the price of direct messages sent to a channel chat. @@ -4783,7 +4783,7 @@ type DirectMessagePriceChanged struct { ``` -## type DirectMessagesTopic +## type [DirectMessagesTopic]() Describes a topic of a direct messages chat. @@ -4797,7 +4797,7 @@ type DirectMessagesTopic struct { ``` -## type Document +## type [Document]() This object represents a general file \(as opposed to photos, voice messages and audio files\). @@ -4819,7 +4819,7 @@ type Document struct { ``` -## type EditChatInviteLinkParams +## type [EditChatInviteLinkParams]() EditChatInviteLinkParams is the parameter set for EditChatInviteLink. @@ -4843,7 +4843,7 @@ type EditChatInviteLinkParams struct { ``` -## type EditChatSubscriptionInviteLinkParams +## type [EditChatSubscriptionInviteLinkParams]() EditChatSubscriptionInviteLinkParams is the parameter set for EditChatSubscriptionInviteLink. @@ -4861,7 +4861,7 @@ type EditChatSubscriptionInviteLinkParams struct { ``` -## type EditForumTopicParams +## type [EditForumTopicParams]() EditForumTopicParams is the parameter set for EditForumTopic. @@ -4881,7 +4881,7 @@ type EditForumTopicParams struct { ``` -## type EditGeneralForumTopicParams +## type [EditGeneralForumTopicParams]() EditGeneralForumTopicParams is the parameter set for EditGeneralForumTopic. @@ -4897,7 +4897,7 @@ type EditGeneralForumTopicParams struct { ``` -## type EditMessageCaptionParams +## type [EditMessageCaptionParams]() EditMessageCaptionParams is the parameter set for EditMessageCaption. @@ -4927,7 +4927,7 @@ type EditMessageCaptionParams struct { ``` -## type EditMessageChecklistParams +## type [EditMessageChecklistParams]() EditMessageChecklistParams is the parameter set for EditMessageChecklist. @@ -4949,7 +4949,7 @@ type EditMessageChecklistParams struct { ``` -## type EditMessageLiveLocationParams +## type [EditMessageLiveLocationParams]() EditMessageLiveLocationParams is the parameter set for EditMessageLiveLocation. @@ -4983,7 +4983,7 @@ type EditMessageLiveLocationParams struct { ``` -## type EditMessageMediaParams +## type [EditMessageMediaParams]() EditMessageMediaParams is the parameter set for EditMessageMedia. @@ -5007,7 +5007,7 @@ type EditMessageMediaParams struct { ``` -### func \(\*EditMessageMediaParams\) HasFile +### func \(\*EditMessageMediaParams\) [HasFile]() ```go func (p *EditMessageMediaParams) HasFile() bool @@ -5016,7 +5016,7 @@ func (p *EditMessageMediaParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*EditMessageMediaParams\) MultipartFields +### func \(\*EditMessageMediaParams\) [MultipartFields]() ```go func (p *EditMessageMediaParams) MultipartFields() map[string]string @@ -5025,7 +5025,7 @@ func (p *EditMessageMediaParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*EditMessageMediaParams\) MultipartFiles +### func \(\*EditMessageMediaParams\) [MultipartFiles]() ```go func (p *EditMessageMediaParams) MultipartFiles() []client.MultipartFile @@ -5034,7 +5034,7 @@ func (p *EditMessageMediaParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type EditMessageReplyMarkupParams +## type [EditMessageReplyMarkupParams]() EditMessageReplyMarkupParams is the parameter set for EditMessageReplyMarkup. @@ -5056,7 +5056,7 @@ type EditMessageReplyMarkupParams struct { ``` -## type EditMessageTextParams +## type [EditMessageTextParams]() EditMessageTextParams is the parameter set for EditMessageText. @@ -5086,7 +5086,7 @@ type EditMessageTextParams struct { ``` -## type EditStoryParams +## type [EditStoryParams]() EditStoryParams is the parameter set for EditStory. @@ -5112,7 +5112,7 @@ type EditStoryParams struct { ``` -## type EditUserStarSubscriptionParams +## type [EditUserStarSubscriptionParams]() EditUserStarSubscriptionParams is the parameter set for EditUserStarSubscription. @@ -5130,7 +5130,7 @@ type EditUserStarSubscriptionParams struct { ``` -## type EncryptedCredentials +## type [EncryptedCredentials]() Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes. @@ -5146,7 +5146,7 @@ type EncryptedCredentials struct { ``` -## type EncryptedPassportElement +## type [EncryptedPassportElement]() Describes documents or other Telegram Passport elements shared with the bot by the user. @@ -5176,7 +5176,7 @@ type EncryptedPassportElement struct { ``` -## type EncryptedPassportElementType +## type [EncryptedPassportElementType]() @@ -5205,7 +5205,7 @@ const ( ``` -## type ExportChatInviteLinkParams +## type [ExportChatInviteLinkParams]() ExportChatInviteLinkParams is the parameter set for ExportChatInviteLink. @@ -5219,7 +5219,7 @@ type ExportChatInviteLinkParams struct { ``` -## type ExternalReplyInfo +## type [ExternalReplyInfo]() This object contains information about a message that is being replied to, which may come from another chat or forum topic. @@ -5281,7 +5281,7 @@ type ExternalReplyInfo struct { ``` -### func \(\*ExternalReplyInfo\) UnmarshalJSON +### func \(\*ExternalReplyInfo\) [UnmarshalJSON]() ```go func (m *ExternalReplyInfo) UnmarshalJSON(data []byte) error @@ -5290,7 +5290,7 @@ func (m *ExternalReplyInfo) UnmarshalJSON(data []byte) error UnmarshalJSON decodes ExternalReplyInfo by dispatching union\-typed fields \(Origin\) through their concrete UnmarshalXxx helpers. -## type File +## type [File]() This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot\/\. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile. The maximum file size to download is 20 MB @@ -5308,7 +5308,7 @@ type File struct { ``` -### func DownloadFile +### func [DownloadFile]() ```go func DownloadFile(ctx context.Context, b *client.Bot, fileID string) (io.ReadCloser, *File, error) @@ -5321,7 +5321,7 @@ The returned io.ReadCloser must be closed by the caller. The size of the file is For files larger than 20 MB, Telegram requires a self\-hosted Bot API server \(default api.telegram.org has a 20 MB limit on getFile\). -### func GetFile +### func [GetFile]() ```go func GetFile(ctx context.Context, b *client.Bot, p *GetFileParams) (*File, error) @@ -5332,7 +5332,7 @@ GetFile calls the getFile Telegram Bot API method. Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot\/\, where \ is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again. Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name \(if available\) when the File object is received. -### func UploadStickerFile +### func [UploadStickerFile]() ```go func UploadStickerFile(ctx context.Context, b *client.Bot, p *UploadStickerFileParams) (*File, error) @@ -5343,7 +5343,7 @@ UploadStickerFile calls the uploadStickerFile Telegram Bot API method. Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods \(the file can be used multiple times\). Returns the uploaded File on success. -## type ForceReply +## type [ForceReply]() Upon receiving a message with this object, Telegram clients will display a reply interface to the user \(act as if the user has selected the bot's message and tapped 'Reply'\). This can be extremely useful if you want to create user\-friendly step\-by\-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a user account. Example: A poll bot for groups runs in privacy mode \(only receives commands, replies to its messages and mentions\). There could be two ways to create a new poll: The last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions \- without any extra work for the user. @@ -5359,7 +5359,7 @@ type ForceReply struct { ``` -## type ForumTopic +## type [ForumTopic]() This object represents a forum topic. @@ -5379,7 +5379,7 @@ type ForumTopic struct { ``` -### func CreateForumTopic +### func [CreateForumTopic]() ```go func CreateForumTopic(ctx context.Context, b *client.Bot, p *CreateForumTopicParams) (*ForumTopic, error) @@ -5390,7 +5390,7 @@ CreateForumTopic calls the createForumTopic Telegram Bot API method. Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can\_manage\_topics administrator right. Returns information about the created topic as a ForumTopic object. -## type ForumTopicClosed +## type [ForumTopicClosed]() This object represents a service message about a forum topic closed in the chat. Currently holds no information. @@ -5400,7 +5400,7 @@ type ForumTopicClosed struct { ``` -## type ForumTopicCreated +## type [ForumTopicCreated]() This object represents a service message about a new forum topic created in the chat. @@ -5418,7 +5418,7 @@ type ForumTopicCreated struct { ``` -## type ForumTopicEdited +## type [ForumTopicEdited]() This object represents a service message about an edited forum topic. @@ -5432,7 +5432,7 @@ type ForumTopicEdited struct { ``` -## type ForumTopicReopened +## type [ForumTopicReopened]() This object represents a service message about a forum topic reopened in the chat. Currently holds no information. @@ -5442,7 +5442,7 @@ type ForumTopicReopened struct { ``` -## type ForwardMessageParams +## type [ForwardMessageParams]() ForwardMessageParams is the parameter set for ForwardMessage. @@ -5474,7 +5474,7 @@ type ForwardMessageParams struct { ``` -## type ForwardMessagesParams +## type [ForwardMessagesParams]() ForwardMessagesParams is the parameter set for ForwardMessages. @@ -5500,7 +5500,7 @@ type ForwardMessagesParams struct { ``` -## type Game +## type [Game]() This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. @@ -5522,7 +5522,7 @@ type Game struct { ``` -## type GameHighScore +## type [GameHighScore]() This object represents one row of the high scores table for a game. And that's about all we've got for now.If you've got any questions, please check out our Bot FAQ » @@ -5538,7 +5538,7 @@ type GameHighScore struct { ``` -### func GetGameHighScores +### func [GetGameHighScores]() ```go func GetGameHighScores(ctx context.Context, b *client.Bot, p *GetGameHighScoresParams) ([]GameHighScore, error) @@ -5549,7 +5549,7 @@ GetGameHighScores calls the getGameHighScores Telegram Bot API method. Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects. This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. -## type GeneralForumTopicHidden +## type [GeneralForumTopicHidden]() This object represents a service message about General forum topic hidden in the chat. Currently holds no information. @@ -5559,7 +5559,7 @@ type GeneralForumTopicHidden struct { ``` -## type GeneralForumTopicUnhidden +## type [GeneralForumTopicUnhidden]() This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. @@ -5569,7 +5569,7 @@ type GeneralForumTopicUnhidden struct { ``` -## type GetAvailableGiftsParams +## type [GetAvailableGiftsParams]() GetAvailableGiftsParams is the parameter set for GetAvailableGifts. @@ -5581,7 +5581,7 @@ type GetAvailableGiftsParams struct { ``` -## type GetBusinessAccountGiftsParams +## type [GetBusinessAccountGiftsParams]() GetBusinessAccountGiftsParams is the parameter set for GetBusinessAccountGifts. @@ -5615,7 +5615,7 @@ type GetBusinessAccountGiftsParams struct { ``` -## type GetBusinessAccountStarBalanceParams +## type [GetBusinessAccountStarBalanceParams]() GetBusinessAccountStarBalanceParams is the parameter set for GetBusinessAccountStarBalance. @@ -5629,7 +5629,7 @@ type GetBusinessAccountStarBalanceParams struct { ``` -## type GetBusinessConnectionParams +## type [GetBusinessConnectionParams]() GetBusinessConnectionParams is the parameter set for GetBusinessConnection. @@ -5643,7 +5643,7 @@ type GetBusinessConnectionParams struct { ``` -## type GetChatAdministratorsParams +## type [GetChatAdministratorsParams]() GetChatAdministratorsParams is the parameter set for GetChatAdministrators. @@ -5659,7 +5659,7 @@ type GetChatAdministratorsParams struct { ``` -## type GetChatGiftsParams +## type [GetChatGiftsParams]() GetChatGiftsParams is the parameter set for GetChatGifts. @@ -5693,7 +5693,7 @@ type GetChatGiftsParams struct { ``` -## type GetChatMemberCountParams +## type [GetChatMemberCountParams]() GetChatMemberCountParams is the parameter set for GetChatMemberCount. @@ -5707,7 +5707,7 @@ type GetChatMemberCountParams struct { ``` -## type GetChatMemberParams +## type [GetChatMemberParams]() GetChatMemberParams is the parameter set for GetChatMember. @@ -5723,7 +5723,7 @@ type GetChatMemberParams struct { ``` -## type GetChatMenuButtonParams +## type [GetChatMenuButtonParams]() GetChatMenuButtonParams is the parameter set for GetChatMenuButton. @@ -5737,7 +5737,7 @@ type GetChatMenuButtonParams struct { ``` -## type GetChatParams +## type [GetChatParams]() GetChatParams is the parameter set for GetChat. @@ -5751,7 +5751,7 @@ type GetChatParams struct { ``` -## type GetCustomEmojiStickersParams +## type [GetCustomEmojiStickersParams]() GetCustomEmojiStickersParams is the parameter set for GetCustomEmojiStickers. @@ -5765,7 +5765,7 @@ type GetCustomEmojiStickersParams struct { ``` -## type GetFileParams +## type [GetFileParams]() GetFileParams is the parameter set for GetFile. @@ -5779,7 +5779,7 @@ type GetFileParams struct { ``` -## type GetForumTopicIconStickersParams +## type [GetForumTopicIconStickersParams]() GetForumTopicIconStickersParams is the parameter set for GetForumTopicIconStickers. @@ -5791,7 +5791,7 @@ type GetForumTopicIconStickersParams struct { ``` -## type GetGameHighScoresParams +## type [GetGameHighScoresParams]() GetGameHighScoresParams is the parameter set for GetGameHighScores. @@ -5811,7 +5811,7 @@ type GetGameHighScoresParams struct { ``` -## type GetManagedBotAccessSettingsParams +## type [GetManagedBotAccessSettingsParams]() GetManagedBotAccessSettingsParams is the parameter set for GetManagedBotAccessSettings. @@ -5825,7 +5825,7 @@ type GetManagedBotAccessSettingsParams struct { ``` -## type GetManagedBotTokenParams +## type [GetManagedBotTokenParams]() GetManagedBotTokenParams is the parameter set for GetManagedBotToken. @@ -5839,7 +5839,7 @@ type GetManagedBotTokenParams struct { ``` -## type GetMeParams +## type [GetMeParams]() GetMeParams is the parameter set for GetMe. @@ -5851,7 +5851,7 @@ type GetMeParams struct { ``` -## type GetMyCommandsParams +## type [GetMyCommandsParams]() GetMyCommandsParams is the parameter set for GetMyCommands. @@ -5867,7 +5867,7 @@ type GetMyCommandsParams struct { ``` -## type GetMyDefaultAdministratorRightsParams +## type [GetMyDefaultAdministratorRightsParams]() GetMyDefaultAdministratorRightsParams is the parameter set for GetMyDefaultAdministratorRights. @@ -5881,7 +5881,7 @@ type GetMyDefaultAdministratorRightsParams struct { ``` -## type GetMyDescriptionParams +## type [GetMyDescriptionParams]() GetMyDescriptionParams is the parameter set for GetMyDescription. @@ -5895,7 +5895,7 @@ type GetMyDescriptionParams struct { ``` -## type GetMyNameParams +## type [GetMyNameParams]() GetMyNameParams is the parameter set for GetMyName. @@ -5909,7 +5909,7 @@ type GetMyNameParams struct { ``` -## type GetMyShortDescriptionParams +## type [GetMyShortDescriptionParams]() GetMyShortDescriptionParams is the parameter set for GetMyShortDescription. @@ -5923,7 +5923,7 @@ type GetMyShortDescriptionParams struct { ``` -## type GetMyStarBalanceParams +## type [GetMyStarBalanceParams]() GetMyStarBalanceParams is the parameter set for GetMyStarBalance. @@ -5935,7 +5935,7 @@ type GetMyStarBalanceParams struct { ``` -## type GetStarTransactionsParams +## type [GetStarTransactionsParams]() GetStarTransactionsParams is the parameter set for GetStarTransactions. @@ -5951,7 +5951,7 @@ type GetStarTransactionsParams struct { ``` -## type GetStickerSetParams +## type [GetStickerSetParams]() GetStickerSetParams is the parameter set for GetStickerSet. @@ -5965,7 +5965,7 @@ type GetStickerSetParams struct { ``` -## type GetUpdatesParams +## type [GetUpdatesParams]() GetUpdatesParams is the parameter set for GetUpdates. @@ -5985,7 +5985,7 @@ type GetUpdatesParams struct { ``` -## type GetUserChatBoostsParams +## type [GetUserChatBoostsParams]() GetUserChatBoostsParams is the parameter set for GetUserChatBoosts. @@ -6001,7 +6001,7 @@ type GetUserChatBoostsParams struct { ``` -## type GetUserGiftsParams +## type [GetUserGiftsParams]() GetUserGiftsParams is the parameter set for GetUserGifts. @@ -6031,7 +6031,7 @@ type GetUserGiftsParams struct { ``` -## type GetUserPersonalChatMessagesParams +## type [GetUserPersonalChatMessagesParams]() GetUserPersonalChatMessagesParams is the parameter set for GetUserPersonalChatMessages. @@ -6047,7 +6047,7 @@ type GetUserPersonalChatMessagesParams struct { ``` -## type GetUserProfileAudiosParams +## type [GetUserProfileAudiosParams]() GetUserProfileAudiosParams is the parameter set for GetUserProfileAudios. @@ -6065,7 +6065,7 @@ type GetUserProfileAudiosParams struct { ``` -## type GetUserProfilePhotosParams +## type [GetUserProfilePhotosParams]() GetUserProfilePhotosParams is the parameter set for GetUserProfilePhotos. @@ -6083,7 +6083,7 @@ type GetUserProfilePhotosParams struct { ``` -## type GetWebhookInfoParams +## type [GetWebhookInfoParams]() GetWebhookInfoParams is the parameter set for GetWebhookInfo. @@ -6095,7 +6095,7 @@ type GetWebhookInfoParams struct { ``` -## type Gift +## type [Gift]() This object represents a gift that can be sent by the bot. @@ -6131,7 +6131,7 @@ type Gift struct { ``` -## type GiftBackground +## type [GiftBackground]() This object describes the background of a gift. @@ -6147,7 +6147,7 @@ type GiftBackground struct { ``` -## type GiftInfo +## type [GiftInfo]() Describes a service message about a regular gift that was sent or received. @@ -6177,7 +6177,7 @@ type GiftInfo struct { ``` -## type GiftPremiumSubscriptionParams +## type [GiftPremiumSubscriptionParams]() GiftPremiumSubscriptionParams is the parameter set for GiftPremiumSubscription. @@ -6201,7 +6201,7 @@ type GiftPremiumSubscriptionParams struct { ``` -## type Gifts +## type [Gifts]() This object represent a list of gifts. @@ -6213,7 +6213,7 @@ type Gifts struct { ``` -### func GetAvailableGifts +### func [GetAvailableGifts]() ```go func GetAvailableGifts(ctx context.Context, b *client.Bot, p *GetAvailableGiftsParams) (*Gifts, error) @@ -6224,7 +6224,7 @@ GetAvailableGifts calls the getAvailableGifts Telegram Bot API method. Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object. -## type Giveaway +## type [Giveaway]() This object represents a message about a scheduled giveaway. @@ -6252,7 +6252,7 @@ type Giveaway struct { ``` -## type GiveawayCompleted +## type [GiveawayCompleted]() This object represents a service message about the completion of a giveaway without public winners. @@ -6270,7 +6270,7 @@ type GiveawayCompleted struct { ``` -## type GiveawayCreated +## type [GiveawayCreated]() This object represents a service message about the creation of a scheduled giveaway. @@ -6282,7 +6282,7 @@ type GiveawayCreated struct { ``` -## type GiveawayWinners +## type [GiveawayWinners]() This object represents a message about the completion of a giveaway with public winners. @@ -6316,7 +6316,7 @@ type GiveawayWinners struct { ``` -## type HideGeneralForumTopicParams +## type [HideGeneralForumTopicParams]() HideGeneralForumTopicParams is the parameter set for HideGeneralForumTopic. @@ -6330,7 +6330,7 @@ type HideGeneralForumTopicParams struct { ``` -## type InaccessibleMessage +## type [InaccessibleMessage]() This object describes a message that was deleted or is otherwise inaccessible to the bot. @@ -6346,7 +6346,7 @@ type InaccessibleMessage struct { ``` -## type InlineKeyboardButton +## type [InlineKeyboardButton]() This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon\_custom\_emoji\_id, and style must be used to specify the type of the button. @@ -6382,7 +6382,7 @@ type InlineKeyboardButton struct { ``` -## type InlineKeyboardMarkup +## type [InlineKeyboardMarkup]() This object represents an inline keyboard that appears right next to the message it belongs to. @@ -6394,7 +6394,7 @@ type InlineKeyboardMarkup struct { ``` -## type InlineQuery +## type [InlineQuery]() This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. @@ -6416,7 +6416,7 @@ type InlineQuery struct { ``` -## type InlineQueryChatType +## type [InlineQueryChatType]() @@ -6437,7 +6437,7 @@ const ( ``` -## type InlineQueryResult +## type [InlineQueryResult]() InlineQueryResult is a union type. The following concrete variants implement it: @@ -6471,7 +6471,7 @@ type InlineQueryResult interface { ``` -## type InlineQueryResultArticle +## type [InlineQueryResultArticle]() Represents a link to an article or web page. @@ -6501,7 +6501,7 @@ type InlineQueryResultArticle struct { ``` -## type InlineQueryResultAudio +## type [InlineQueryResultAudio]() Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the audio. @@ -6533,7 +6533,7 @@ type InlineQueryResultAudio struct { ``` -## type InlineQueryResultCachedAudio +## type [InlineQueryResultCachedAudio]() Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the audio. @@ -6559,7 +6559,7 @@ type InlineQueryResultCachedAudio struct { ``` -## type InlineQueryResultCachedDocument +## type [InlineQueryResultCachedDocument]() Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the file. @@ -6589,7 +6589,7 @@ type InlineQueryResultCachedDocument struct { ``` -## type InlineQueryResultCachedGif +## type [InlineQueryResultCachedGif]() Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input\_message\_content to send a message with specified content instead of the animation. @@ -6619,7 +6619,7 @@ type InlineQueryResultCachedGif struct { ``` -## type InlineQueryResultCachedMpeg4Gif +## type [InlineQueryResultCachedMpeg4Gif]() Represents a link to a video animation \(H.264/MPEG\-4 AVC video without sound\) stored on the Telegram servers. By default, this animated MPEG\-4 file will be sent by the user with an optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the animation. @@ -6649,7 +6649,7 @@ type InlineQueryResultCachedMpeg4Gif struct { ``` -## type InlineQueryResultCachedPhoto +## type [InlineQueryResultCachedPhoto]() Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the photo. @@ -6681,7 +6681,7 @@ type InlineQueryResultCachedPhoto struct { ``` -## type InlineQueryResultCachedSticker +## type [InlineQueryResultCachedSticker]() Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the sticker. @@ -6701,7 +6701,7 @@ type InlineQueryResultCachedSticker struct { ``` -## type InlineQueryResultCachedVideo +## type [InlineQueryResultCachedVideo]() Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the video. @@ -6733,7 +6733,7 @@ type InlineQueryResultCachedVideo struct { ``` -## type InlineQueryResultCachedVoice +## type [InlineQueryResultCachedVoice]() Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the voice message. @@ -6761,7 +6761,7 @@ type InlineQueryResultCachedVoice struct { ``` -## type InlineQueryResultContact +## type [InlineQueryResultContact]() Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the contact. @@ -6793,7 +6793,7 @@ type InlineQueryResultContact struct { ``` -## type InlineQueryResultDocument +## type [InlineQueryResultDocument]() Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method. @@ -6831,7 +6831,7 @@ type InlineQueryResultDocument struct { ``` -## type InlineQueryResultDocumentMimeType +## type [InlineQueryResultDocumentMimeType]() @@ -6849,7 +6849,7 @@ const ( ``` -## type InlineQueryResultGame +## type [InlineQueryResultGame]() Represents a Game. @@ -6867,7 +6867,7 @@ type InlineQueryResultGame struct { ``` -## type InlineQueryResultGif +## type [InlineQueryResultGif]() Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the animation. @@ -6907,7 +6907,7 @@ type InlineQueryResultGif struct { ``` -## type InlineQueryResultGifThumbnailMimeType +## type [InlineQueryResultGifThumbnailMimeType]() @@ -6926,7 +6926,7 @@ const ( ``` -## type InlineQueryResultLocation +## type [InlineQueryResultLocation]() Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the location. @@ -6964,7 +6964,7 @@ type InlineQueryResultLocation struct { ``` -## type InlineQueryResultMpeg4Gif +## type [InlineQueryResultMpeg4Gif]() Represents a link to a video animation \(H.264/MPEG\-4 AVC video without sound\). By default, this animated MPEG\-4 file will be sent by the user with optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the animation. @@ -7004,7 +7004,7 @@ type InlineQueryResultMpeg4Gif struct { ``` -## type InlineQueryResultPhoto +## type [InlineQueryResultPhoto]() Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the photo. @@ -7042,7 +7042,7 @@ type InlineQueryResultPhoto struct { ``` -## type InlineQueryResultVenue +## type [InlineQueryResultVenue]() Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the venue. @@ -7082,7 +7082,7 @@ type InlineQueryResultVenue struct { ``` -## type InlineQueryResultVideo +## type [InlineQueryResultVideo]() Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the video. If an InlineQueryResultVideo message contains an embedded video \(e.g., YouTube\), you must replace its content using input\_message\_content. @@ -7124,7 +7124,7 @@ type InlineQueryResultVideo struct { ``` -## type InlineQueryResultVoice +## type [InlineQueryResultVoice]() Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input\_message\_content to send a message with the specified content instead of the the voice message. @@ -7154,7 +7154,7 @@ type InlineQueryResultVoice struct { ``` -## type InlineQueryResultsButton +## type [InlineQueryResultsButton]() This object represents a button to be shown above inline query results. You must use exactly one of the optional fields. @@ -7170,7 +7170,7 @@ type InlineQueryResultsButton struct { ``` -## type InputChecklist +## type [InputChecklist]() Describes a checklist to create. @@ -7192,7 +7192,7 @@ type InputChecklist struct { ``` -## type InputChecklistTask +## type [InputChecklistTask]() Describes a task to add to a checklist. @@ -7210,7 +7210,7 @@ type InputChecklistTask struct { ``` -## type InputContactMessageContent +## type [InputContactMessageContent]() Represents the content of a contact message to be sent as the result of an inline query. @@ -7228,7 +7228,7 @@ type InputContactMessageContent struct { ``` -## type InputFile +## type [InputFile]() InputFile carries either a file path \(for upload\) or a Telegram file\_id / URL string \(for reuse\). When PathOrID names a local file, the request is sent as multipart/form\-data; otherwise the value is sent inline. @@ -7246,7 +7246,7 @@ type InputFile struct { ``` -### func \(\*InputFile\) IsLocalUpload +### func \(\*InputFile\) [IsLocalUpload]() ```go func (f *InputFile) IsLocalUpload() bool @@ -7255,7 +7255,7 @@ func (f *InputFile) IsLocalUpload() bool IsLocalUpload reports whether this InputFile triggers a multipart upload. -## type InputInvoiceMessageContent +## type [InputInvoiceMessageContent]() Represents the content of an invoice message to be sent as the result of an inline query. @@ -7305,7 +7305,7 @@ type InputInvoiceMessageContent struct { ``` -## type InputLocationMessageContent +## type [InputLocationMessageContent]() Represents the content of a location message to be sent as the result of an inline query. @@ -7327,7 +7327,7 @@ type InputLocationMessageContent struct { ``` -## type InputMedia +## type [InputMedia]() InputMedia is a union type. The following concrete variants implement it: @@ -7347,7 +7347,7 @@ type InputMedia interface { ``` -## type InputMediaAnimation +## type [InputMediaAnimation]() Represents an animation file \(GIF or H.264/MPEG\-4 AVC video without sound\) to be sent. @@ -7379,7 +7379,7 @@ type InputMediaAnimation struct { ``` -## type InputMediaAudio +## type [InputMediaAudio]() Represents an audio file to be treated as music to be sent. @@ -7407,7 +7407,7 @@ type InputMediaAudio struct { ``` -## type InputMediaDocument +## type [InputMediaDocument]() Represents a general file to be sent. @@ -7431,7 +7431,7 @@ type InputMediaDocument struct { ``` -## type InputMediaLivePhoto +## type [InputMediaLivePhoto]() Represents a live photo to be sent. @@ -7457,7 +7457,7 @@ type InputMediaLivePhoto struct { ``` -## type InputMediaLocation +## type [InputMediaLocation]() Represents a location to be sent. @@ -7475,7 +7475,7 @@ type InputMediaLocation struct { ``` -## type InputMediaPhoto +## type [InputMediaPhoto]() Represents a photo to be sent. @@ -7499,7 +7499,7 @@ type InputMediaPhoto struct { ``` -## type InputMediaSticker +## type [InputMediaSticker]() Represents a sticker file to be sent. @@ -7515,7 +7515,7 @@ type InputMediaSticker struct { ``` -## type InputMediaVenue +## type [InputMediaVenue]() Represents a venue to be sent. @@ -7543,7 +7543,7 @@ type InputMediaVenue struct { ``` -## type InputMediaVideo +## type [InputMediaVideo]() Represents a video to be sent. @@ -7581,7 +7581,7 @@ type InputMediaVideo struct { ``` -## type InputMessageContent +## type [InputMessageContent]() InputMessageContent is a union type. The following concrete variants implement it: @@ -7600,7 +7600,7 @@ type InputMessageContent interface { ``` -## type InputPaidMedia +## type [InputPaidMedia]() InputPaidMedia is a union type. The following concrete variants implement it: @@ -7617,7 +7617,7 @@ type InputPaidMedia interface { ``` -## type InputPaidMediaLivePhoto +## type [InputPaidMediaLivePhoto]() The paid media to send is a live photo. @@ -7633,7 +7633,7 @@ type InputPaidMediaLivePhoto struct { ``` -## type InputPaidMediaPhoto +## type [InputPaidMediaPhoto]() The paid media to send is a photo. @@ -7647,7 +7647,7 @@ type InputPaidMediaPhoto struct { ``` -## type InputPaidMediaVideo +## type [InputPaidMediaVideo]() The paid media to send is a video. @@ -7675,7 +7675,7 @@ type InputPaidMediaVideo struct { ``` -## type InputPollMedia +## type [InputPollMedia]() InputPollMedia is a union type. The following concrete variants implement it: @@ -7697,7 +7697,7 @@ type InputPollMedia interface { ``` -## type InputPollOption +## type [InputPollOption]() This object contains information about one answer option in a poll to be sent. @@ -7715,7 +7715,7 @@ type InputPollOption struct { ``` -## type InputPollOptionMedia +## type [InputPollOptionMedia]() InputPollOptionMedia is a union type. The following concrete variants implement it: @@ -7736,7 +7736,7 @@ type InputPollOptionMedia interface { ``` -## type InputProfilePhoto +## type [InputProfilePhoto]() InputProfilePhoto is a union type. The following concrete variants implement it: @@ -7752,7 +7752,7 @@ type InputProfilePhoto interface { ``` -## type InputProfilePhotoAnimated +## type [InputProfilePhotoAnimated]() An animated profile photo in the MPEG4 format. @@ -7768,7 +7768,7 @@ type InputProfilePhotoAnimated struct { ``` -## type InputProfilePhotoStatic +## type [InputProfilePhotoStatic]() A static profile photo in the .JPG format. @@ -7782,7 +7782,7 @@ type InputProfilePhotoStatic struct { ``` -## type InputSticker +## type [InputSticker]() This object describes a sticker to be added to a sticker set. @@ -7802,7 +7802,7 @@ type InputSticker struct { ``` -## type InputStickerFormat +## type [InputStickerFormat]() @@ -7821,7 +7821,7 @@ const ( ``` -## type InputStoryContent +## type [InputStoryContent]() InputStoryContent is a union type. The following concrete variants implement it: @@ -7837,7 +7837,7 @@ type InputStoryContent interface { ``` -## type InputStoryContentPhoto +## type [InputStoryContentPhoto]() Describes a photo to post as a story. @@ -7851,7 +7851,7 @@ type InputStoryContentPhoto struct { ``` -## type InputStoryContentVideo +## type [InputStoryContentVideo]() Describes a video to post as a story. @@ -7871,7 +7871,7 @@ type InputStoryContentVideo struct { ``` -## type InputTextMessageContent +## type [InputTextMessageContent]() Represents the content of a text message to be sent as the result of an inline query. @@ -7889,7 +7889,7 @@ type InputTextMessageContent struct { ``` -## type InputVenueMessageContent +## type [InputVenueMessageContent]() Represents the content of a venue message to be sent as the result of an inline query. @@ -7915,7 +7915,7 @@ type InputVenueMessageContent struct { ``` -## type Invoice +## type [Invoice]() This object contains basic information about an invoice. @@ -7935,7 +7935,7 @@ type Invoice struct { ``` -## type KeyboardButton +## type [KeyboardButton]() This object represents one button of the reply keyboard. At most one of the fields other than text, icon\_custom\_emoji\_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text. @@ -7965,7 +7965,7 @@ type KeyboardButton struct { ``` -## type KeyboardButtonPollType +## type [KeyboardButtonPollType]() This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. @@ -7977,7 +7977,7 @@ type KeyboardButtonPollType struct { ``` -## type KeyboardButtonRequestChat +## type [KeyboardButtonRequestChat]() This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats ». @@ -8009,7 +8009,7 @@ type KeyboardButtonRequestChat struct { ``` -## type KeyboardButtonRequestManagedBot +## type [KeyboardButtonRequestManagedBot]() This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update managed\_bot and a Message with the field managed\_bot\_created. @@ -8025,7 +8025,7 @@ type KeyboardButtonRequestManagedBot struct { ``` -## type KeyboardButtonRequestUsers +## type [KeyboardButtonRequestUsers]() This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users » @@ -8049,7 +8049,7 @@ type KeyboardButtonRequestUsers struct { ``` -## type KeyboardButtonStyle +## type [KeyboardButtonStyle]() @@ -8068,7 +8068,7 @@ const ( ``` -## type LabeledPrice +## type [LabeledPrice]() This object represents a portion of the price for goods or services. @@ -8082,7 +8082,7 @@ type LabeledPrice struct { ``` -## type LeaveChatParams +## type [LeaveChatParams]() LeaveChatParams is the parameter set for LeaveChat. @@ -8096,7 +8096,7 @@ type LeaveChatParams struct { ``` -## type LinkPreviewOptions +## type [LinkPreviewOptions]() Describes the options used for link preview generation. @@ -8116,7 +8116,7 @@ type LinkPreviewOptions struct { ``` -## type LivePhoto +## type [LivePhoto]() This object represents a live photo. @@ -8142,7 +8142,7 @@ type LivePhoto struct { ``` -## type Location +## type [Location]() This object represents a point on the map. @@ -8164,7 +8164,7 @@ type Location struct { ``` -## type LocationAddress +## type [LocationAddress]() Describes the physical address of a location. @@ -8182,7 +8182,7 @@ type LocationAddress struct { ``` -## type LogOutParams +## type [LogOutParams]() LogOutParams is the parameter set for LogOut. @@ -8194,7 +8194,7 @@ type LogOutParams struct { ``` -## type LoginUrl +## type [LoginUrl]() This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in: Telegram apps support these buttons as of version 5.7. Sample bot: @discussbot @@ -8212,7 +8212,7 @@ type LoginUrl struct { ``` -## type ManagedBotCreated +## type [ManagedBotCreated]() This object contains information about the bot that was created to be managed by the current bot. @@ -8224,7 +8224,7 @@ type ManagedBotCreated struct { ``` -## type ManagedBotUpdated +## type [ManagedBotUpdated]() This object contains information about the creation, token update, or owner update of a bot that is managed by the current bot. @@ -8238,7 +8238,7 @@ type ManagedBotUpdated struct { ``` -## type MaskPosition +## type [MaskPosition]() This object describes the position on faces where a mask should be placed by default. @@ -8256,7 +8256,7 @@ type MaskPosition struct { ``` -## type MaskPositionPoint +## type [MaskPositionPoint]() @@ -8276,7 +8276,7 @@ const ( ``` -## type MaybeInaccessibleMessage +## type [MaybeInaccessibleMessage]() MaybeInaccessibleMessage is a union type. The following concrete variants implement it: @@ -8292,7 +8292,7 @@ type MaybeInaccessibleMessage interface { ``` -### func UnmarshalMaybeInaccessibleMessage +### func [UnmarshalMaybeInaccessibleMessage]() ```go func UnmarshalMaybeInaccessibleMessage(data []byte) (MaybeInaccessibleMessage, error) @@ -8301,7 +8301,7 @@ func UnmarshalMaybeInaccessibleMessage(data []byte) (MaybeInaccessibleMessage, e UnmarshalMaybeInaccessibleMessage decodes a JSON object into the correct MaybeInaccessibleMessage variant. Telegram uses the date field as a discriminator: date == 0 indicates InaccessibleMessage; any other value indicates a real Message. -## type MeCache +## type [MeCache]() MeCache caches the result of GetMe across calls. Construct one per Bot and call Get to retrieve the cached User on subsequent invocations. @@ -8319,7 +8319,7 @@ type MeCache struct { ``` -### func \(\*MeCache\) Get +### func \(\*MeCache\) [Get]() ```go func (c *MeCache) Get(ctx context.Context, b *client.Bot) (*User, error) @@ -8328,7 +8328,7 @@ func (c *MeCache) Get(ctx context.Context, b *client.Bot) (*User, error) Get returns the User from a cached GetMe call. If the cache is empty, it calls GetMe and populates the cache on success. -### func \(\*MeCache\) Reset +### func \(\*MeCache\) [Reset]() ```go func (c *MeCache) Reset() @@ -8337,7 +8337,7 @@ func (c *MeCache) Reset() Reset clears the cache. Useful in tests or after the bot's identity is known to have changed \(very rare\). -## type MenuButton +## type [MenuButton]() MenuButton is a union type. The following concrete variants implement it: @@ -8354,7 +8354,7 @@ type MenuButton interface { ``` -### func GetChatMenuButton +### func [GetChatMenuButton]() ```go func GetChatMenuButton(ctx context.Context, b *client.Bot, p *GetChatMenuButtonParams) (MenuButton, error) @@ -8365,7 +8365,7 @@ GetChatMenuButton calls the getChatMenuButton Telegram Bot API method. Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success. -### func UnmarshalMenuButton +### func [UnmarshalMenuButton]() ```go func UnmarshalMenuButton(data []byte) (MenuButton, error) @@ -8374,7 +8374,7 @@ func UnmarshalMenuButton(data []byte) (MenuButton, error) UnmarshalMenuButton decodes a MenuButton from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type MenuButtonCommands +## type [MenuButtonCommands]() Represents a menu button, which opens the bot's list of commands. @@ -8386,7 +8386,7 @@ type MenuButtonCommands struct { ``` -## type MenuButtonDefault +## type [MenuButtonDefault]() Describes that no specific value for the menu button was set. @@ -8398,7 +8398,7 @@ type MenuButtonDefault struct { ``` -## type MenuButtonWebApp +## type [MenuButtonWebApp]() Represents a menu button, which launches a Web App. @@ -8414,7 +8414,7 @@ type MenuButtonWebApp struct { ``` -## type Message +## type [Message]() This object represents a message. @@ -8652,7 +8652,7 @@ type Message struct { ``` -### func EditMessageChecklist +### func [EditMessageChecklist]() ```go func EditMessageChecklist(ctx context.Context, b *client.Bot, p *EditMessageChecklistParams) (*Message, error) @@ -8663,7 +8663,7 @@ EditMessageChecklist calls the editMessageChecklist Telegram Bot API method. Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned. -### func ForwardMessage +### func [ForwardMessage]() ```go func ForwardMessage(ctx context.Context, b *client.Bot, p *ForwardMessageParams) (*Message, error) @@ -8674,7 +8674,7 @@ ForwardMessage calls the forwardMessage Telegram Bot API method. Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned. -### func GetUserPersonalChatMessages +### func [GetUserPersonalChatMessages]() ```go func GetUserPersonalChatMessages(ctx context.Context, b *client.Bot, p *GetUserPersonalChatMessagesParams) ([]Message, error) @@ -8685,7 +8685,7 @@ GetUserPersonalChatMessages calls the getUserPersonalChatMessages Telegram Bot A Use this method to get the last messages from the personal chat \(i.e., the chat currently added to their profile\) of a given user. On success, an array of Message objects is returned. -### func SendAnimation +### func [SendAnimation]() ```go func SendAnimation(ctx context.Context, b *client.Bot, p *SendAnimationParams) (*Message, error) @@ -8696,7 +8696,7 @@ SendAnimation calls the sendAnimation Telegram Bot API method. Use this method to send animation files \(GIF or H.264/MPEG\-4 AVC video without sound\). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. -### func SendAudio +### func [SendAudio]() ```go func SendAudio(ctx context.Context, b *client.Bot, p *SendAudioParams) (*Message, error) @@ -8707,7 +8707,7 @@ SendAudio calls the sendAudio Telegram Bot API method. Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the sendVoice method instead. -### func SendChecklist +### func [SendChecklist]() ```go func SendChecklist(ctx context.Context, b *client.Bot, p *SendChecklistParams) (*Message, error) @@ -8718,7 +8718,7 @@ SendChecklist calls the sendChecklist Telegram Bot API method. Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned. -### func SendContact +### func [SendContact]() ```go func SendContact(ctx context.Context, b *client.Bot, p *SendContactParams) (*Message, error) @@ -8729,7 +8729,7 @@ SendContact calls the sendContact Telegram Bot API method. Use this method to send phone contacts. On success, the sent Message is returned. -### func SendDice +### func [SendDice]() ```go func SendDice(ctx context.Context, b *client.Bot, p *SendDiceParams) (*Message, error) @@ -8740,7 +8740,7 @@ SendDice calls the sendDice Telegram Bot API method. Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned. -### func SendDocument +### func [SendDocument]() ```go func SendDocument(ctx context.Context, b *client.Bot, p *SendDocumentParams) (*Message, error) @@ -8751,7 +8751,7 @@ SendDocument calls the sendDocument Telegram Bot API method. Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. -### func SendGame +### func [SendGame]() ```go func SendGame(ctx context.Context, b *client.Bot, p *SendGameParams) (*Message, error) @@ -8762,7 +8762,7 @@ SendGame calls the sendGame Telegram Bot API method. Use this method to send a game. On success, the sent Message is returned. -### func SendInvoice +### func [SendInvoice]() ```go func SendInvoice(ctx context.Context, b *client.Bot, p *SendInvoiceParams) (*Message, error) @@ -8773,7 +8773,7 @@ SendInvoice calls the sendInvoice Telegram Bot API method. Use this method to send invoices. On success, the sent Message is returned. -### func SendLivePhoto +### func [SendLivePhoto]() ```go func SendLivePhoto(ctx context.Context, b *client.Bot, p *SendLivePhotoParams) (*Message, error) @@ -8784,7 +8784,7 @@ SendLivePhoto calls the sendLivePhoto Telegram Bot API method. Use this method to send live photos. On success, the sent Message is returned. -### func SendLocation +### func [SendLocation]() ```go func SendLocation(ctx context.Context, b *client.Bot, p *SendLocationParams) (*Message, error) @@ -8795,7 +8795,7 @@ SendLocation calls the sendLocation Telegram Bot API method. Use this method to send point on the map. On success, the sent Message is returned. -### func SendMediaGroup +### func [SendMediaGroup]() ```go func SendMediaGroup(ctx context.Context, b *client.Bot, p *SendMediaGroupParams) ([]Message, error) @@ -8806,7 +8806,7 @@ SendMediaGroup calls the sendMediaGroup Telegram Bot API method. Use this method to send a group of photos, live photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned. -### func SendMessage +### func [SendMessage]() ```go func SendMessage(ctx context.Context, b *client.Bot, p *SendMessageParams) (*Message, error) @@ -8817,7 +8817,7 @@ SendMessage calls the sendMessage Telegram Bot API method. Use this method to send text messages. On success, the sent Message is returned. -### func SendPaidMedia +### func [SendPaidMedia]() ```go func SendPaidMedia(ctx context.Context, b *client.Bot, p *SendPaidMediaParams) (*Message, error) @@ -8828,7 +8828,7 @@ SendPaidMedia calls the sendPaidMedia Telegram Bot API method. Use this method to send paid media. On success, the sent Message is returned. -### func SendPhoto +### func [SendPhoto]() ```go func SendPhoto(ctx context.Context, b *client.Bot, p *SendPhotoParams) (*Message, error) @@ -8839,7 +8839,7 @@ SendPhoto calls the sendPhoto Telegram Bot API method. Use this method to send photos. On success, the sent Message is returned. -### func SendPoll +### func [SendPoll]() ```go func SendPoll(ctx context.Context, b *client.Bot, p *SendPollParams) (*Message, error) @@ -8850,7 +8850,7 @@ SendPoll calls the sendPoll Telegram Bot API method. Use this method to send a native poll. On success, the sent Message is returned. -### func SendSticker +### func [SendSticker]() ```go func SendSticker(ctx context.Context, b *client.Bot, p *SendStickerParams) (*Message, error) @@ -8861,7 +8861,7 @@ SendSticker calls the sendSticker Telegram Bot API method. Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned. -### func SendVenue +### func [SendVenue]() ```go func SendVenue(ctx context.Context, b *client.Bot, p *SendVenueParams) (*Message, error) @@ -8872,7 +8872,7 @@ SendVenue calls the sendVenue Telegram Bot API method. Use this method to send information about a venue. On success, the sent Message is returned. -### func SendVideo +### func [SendVideo]() ```go func SendVideo(ctx context.Context, b *client.Bot, p *SendVideoParams) (*Message, error) @@ -8883,7 +8883,7 @@ SendVideo calls the sendVideo Telegram Bot API method. Use this method to send video files, Telegram clients support MPEG4 videos \(other formats may be sent as Document\). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. -### func SendVideoNote +### func [SendVideoNote]() ```go func SendVideoNote(ctx context.Context, b *client.Bot, p *SendVideoNoteParams) (*Message, error) @@ -8894,7 +8894,7 @@ SendVideoNote calls the sendVideoNote Telegram Bot API method. As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned. -### func SendVoice +### func [SendVoice]() ```go func SendVoice(ctx context.Context, b *client.Bot, p *SendVoiceParams) (*Message, error) @@ -8905,7 +8905,7 @@ SendVoice calls the sendVoice Telegram Bot API method. Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format \(other formats may be sent as Audio or Document\). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. -### func \(\*Message\) GetSender +### func \(\*Message\) [GetSender]() ```go func (m *Message) GetSender() *Sender @@ -8914,7 +8914,7 @@ func (m *Message) GetSender() *Sender GetSender constructs a Sender for a Message. The result is never nil. -### func \(\*Message\) UnmarshalJSON +### func \(\*Message\) [UnmarshalJSON]() ```go func (m *Message) UnmarshalJSON(data []byte) error @@ -8923,7 +8923,7 @@ func (m *Message) UnmarshalJSON(data []byte) error UnmarshalJSON decodes Message by dispatching union\-typed fields \(ForwardOrigin, PinnedMessage\) through their concrete UnmarshalXxx helpers. -## type MessageAutoDeleteTimerChanged +## type [MessageAutoDeleteTimerChanged]() This object represents a service message about a change in auto\-delete timer settings. @@ -8935,7 +8935,7 @@ type MessageAutoDeleteTimerChanged struct { ``` -## type MessageEntity +## type [MessageEntity]() This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. @@ -8963,7 +8963,7 @@ type MessageEntity struct { ``` -## type MessageEntityType +## type [MessageEntityType]() @@ -8999,7 +8999,7 @@ const ( ``` -## type MessageId +## type [MessageId]() This object represents a unique message identifier. @@ -9011,7 +9011,7 @@ type MessageId struct { ``` -### func CopyMessage +### func [CopyMessage]() ```go func CopyMessage(ctx context.Context, b *client.Bot, p *CopyMessageParams) (*MessageId, error) @@ -9022,7 +9022,7 @@ CopyMessage calls the copyMessage Telegram Bot API method. Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct\_option\_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. -### func CopyMessages +### func [CopyMessages]() ```go func CopyMessages(ctx context.Context, b *client.Bot, p *CopyMessagesParams) ([]MessageId, error) @@ -9033,7 +9033,7 @@ CopyMessages calls the copyMessages Telegram Bot API method. Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct\_option\_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. -### func ForwardMessages +### func [ForwardMessages]() ```go func ForwardMessages(ctx context.Context, b *client.Bot, p *ForwardMessagesParams) ([]MessageId, error) @@ -9044,7 +9044,7 @@ ForwardMessages calls the forwardMessages Telegram Bot API method. Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned. -## type MessageOrBool +## type [MessageOrBool]() MessageOrBool wraps the "Message or True" return shape Telegram uses on edit methods \(editMessageText, editMessageCaption, etc.\). When the bot edits a regular chat message, Message is non\-nil; when it edits an inline message, OK is true. @@ -9056,7 +9056,7 @@ type MessageOrBool struct { ``` -### func EditMessageCaption +### func [EditMessageCaption]() ```go func EditMessageCaption(ctx context.Context, b *client.Bot, p *EditMessageCaptionParams) (*MessageOrBool, error) @@ -9067,7 +9067,7 @@ EditMessageCaption calls the editMessageCaption Telegram Bot API method. Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent. -### func EditMessageLiveLocation +### func [EditMessageLiveLocation]() ```go func EditMessageLiveLocation(ctx context.Context, b *client.Bot, p *EditMessageLiveLocationParams) (*MessageOrBool, error) @@ -9078,7 +9078,7 @@ EditMessageLiveLocation calls the editMessageLiveLocation Telegram Bot API metho Use this method to edit live location messages. A location can be edited until its live\_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. -### func EditMessageMedia +### func [EditMessageMedia]() ```go func EditMessageMedia(ctx context.Context, b *client.Bot, p *EditMessageMediaParams) (*MessageOrBool, error) @@ -9089,7 +9089,7 @@ EditMessageMedia calls the editMessageMedia Telegram Bot API method. Use this method to edit animation, audio, document, live photo, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo, a live photo, or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file\_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent. -### func EditMessageReplyMarkup +### func [EditMessageReplyMarkup]() ```go func EditMessageReplyMarkup(ctx context.Context, b *client.Bot, p *EditMessageReplyMarkupParams) (*MessageOrBool, error) @@ -9100,7 +9100,7 @@ EditMessageReplyMarkup calls the editMessageReplyMarkup Telegram Bot API method. Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent. -### func EditMessageText +### func [EditMessageText]() ```go func EditMessageText(ctx context.Context, b *client.Bot, p *EditMessageTextParams) (*MessageOrBool, error) @@ -9111,7 +9111,7 @@ EditMessageText calls the editMessageText Telegram Bot API method. Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent. -### func SetGameScore +### func [SetGameScore]() ```go func SetGameScore(ctx context.Context, b *client.Bot, p *SetGameScoreParams) (*MessageOrBool, error) @@ -9122,7 +9122,7 @@ SetGameScore calls the setGameScore Telegram Bot API method. Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False. -### func StopMessageLiveLocation +### func [StopMessageLiveLocation]() ```go func StopMessageLiveLocation(ctx context.Context, b *client.Bot, p *StopMessageLiveLocationParams) (*MessageOrBool, error) @@ -9133,7 +9133,7 @@ StopMessageLiveLocation calls the stopMessageLiveLocation Telegram Bot API metho Use this method to stop updating a live location message before live\_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned. -### func \(\*MessageOrBool\) UnmarshalJSON +### func \(\*MessageOrBool\) [UnmarshalJSON]() ```go func (m *MessageOrBool) UnmarshalJSON(data []byte) error @@ -9142,7 +9142,7 @@ func (m *MessageOrBool) UnmarshalJSON(data []byte) error UnmarshalJSON decodes either \{...\} into Message or \`true\`/\`false\` into OK. -## type MessageOrigin +## type [MessageOrigin]() MessageOrigin is a union type. The following concrete variants implement it: @@ -9160,7 +9160,7 @@ type MessageOrigin interface { ``` -### func UnmarshalMessageOrigin +### func [UnmarshalMessageOrigin]() ```go func UnmarshalMessageOrigin(data []byte) (MessageOrigin, error) @@ -9169,7 +9169,7 @@ func UnmarshalMessageOrigin(data []byte) (MessageOrigin, error) UnmarshalMessageOrigin decodes a MessageOrigin from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type MessageOriginChannel +## type [MessageOriginChannel]() The message was originally sent to a channel chat. @@ -9189,7 +9189,7 @@ type MessageOriginChannel struct { ``` -## type MessageOriginChannelType +## type [MessageOriginChannelType]() @@ -9206,7 +9206,7 @@ const ( ``` -## type MessageOriginChat +## type [MessageOriginChat]() The message was originally sent on behalf of a chat to a group chat. @@ -9224,7 +9224,7 @@ type MessageOriginChat struct { ``` -## type MessageOriginChatType +## type [MessageOriginChatType]() @@ -9241,7 +9241,7 @@ const ( ``` -## type MessageOriginHiddenUser +## type [MessageOriginHiddenUser]() The message was originally sent by an unknown user. @@ -9257,7 +9257,7 @@ type MessageOriginHiddenUser struct { ``` -## type MessageOriginHiddenUserType +## type [MessageOriginHiddenUserType]() @@ -9274,7 +9274,7 @@ const ( ``` -## type MessageOriginUser +## type [MessageOriginUser]() The message was originally sent by a known user. @@ -9290,7 +9290,7 @@ type MessageOriginUser struct { ``` -## type MessageOriginUserType +## type [MessageOriginUserType]() @@ -9307,7 +9307,7 @@ const ( ``` -## type MessageReactionCountUpdated +## type [MessageReactionCountUpdated]() This object represents reaction changes on a message with anonymous reactions. @@ -9325,7 +9325,7 @@ type MessageReactionCountUpdated struct { ``` -## type MessageReactionUpdated +## type [MessageReactionUpdated]() This object represents a change of a reaction on a message performed by a user. @@ -9349,7 +9349,7 @@ type MessageReactionUpdated struct { ``` -### func \(\*MessageReactionUpdated\) GetSender +### func \(\*MessageReactionUpdated\) [GetSender]() ```go func (mru *MessageReactionUpdated) GetSender() *Sender @@ -9358,7 +9358,7 @@ func (mru *MessageReactionUpdated) GetSender() *Sender GetSender constructs a Sender for a MessageReactionUpdated. -### func \(\*MessageReactionUpdated\) UnmarshalJSON +### func \(\*MessageReactionUpdated\) [UnmarshalJSON]() ```go func (m *MessageReactionUpdated) UnmarshalJSON(data []byte) error @@ -9367,7 +9367,7 @@ func (m *MessageReactionUpdated) UnmarshalJSON(data []byte) error UnmarshalJSON decodes MessageReactionUpdated by dispatching union\-typed fields \(OldReaction, NewReaction\) through their concrete UnmarshalXxx helpers. -## type OrderInfo +## type [OrderInfo]() This object represents information about an order. @@ -9385,7 +9385,7 @@ type OrderInfo struct { ``` -## type OwnedGift +## type [OwnedGift]() OwnedGift is a union type. The following concrete variants implement it: @@ -9401,7 +9401,7 @@ type OwnedGift interface { ``` -### func UnmarshalOwnedGift +### func [UnmarshalOwnedGift]() ```go func UnmarshalOwnedGift(data []byte) (OwnedGift, error) @@ -9410,7 +9410,7 @@ func UnmarshalOwnedGift(data []byte) (OwnedGift, error) UnmarshalOwnedGift decodes a OwnedGift from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type OwnedGiftRegular +## type [OwnedGiftRegular]() Describes a regular gift owned by a user or a chat. @@ -9450,7 +9450,7 @@ type OwnedGiftRegular struct { ``` -## type OwnedGiftRegularType +## type [OwnedGiftRegularType]() @@ -9467,7 +9467,7 @@ const ( ``` -## type OwnedGiftUnique +## type [OwnedGiftUnique]() Describes a unique gift received and owned by a user or a chat. @@ -9495,7 +9495,7 @@ type OwnedGiftUnique struct { ``` -## type OwnedGiftUniqueType +## type [OwnedGiftUniqueType]() @@ -9512,7 +9512,7 @@ const ( ``` -## type OwnedGifts +## type [OwnedGifts]() Contains the list of gifts received and owned by a user or a chat. @@ -9528,7 +9528,7 @@ type OwnedGifts struct { ``` -### func GetBusinessAccountGifts +### func [GetBusinessAccountGifts]() ```go func GetBusinessAccountGifts(ctx context.Context, b *client.Bot, p *GetBusinessAccountGiftsParams) (*OwnedGifts, error) @@ -9539,7 +9539,7 @@ GetBusinessAccountGifts calls the getBusinessAccountGifts Telegram Bot API metho Returns the gifts received and owned by a managed business account. Requires the can\_view\_gifts\_and\_stars business bot right. Returns OwnedGifts on success. -### func GetChatGifts +### func [GetChatGifts]() ```go func GetChatGifts(ctx context.Context, b *client.Bot, p *GetChatGiftsParams) (*OwnedGifts, error) @@ -9550,7 +9550,7 @@ GetChatGifts calls the getChatGifts Telegram Bot API method. Returns the gifts owned by a chat. Returns OwnedGifts on success. -### func GetUserGifts +### func [GetUserGifts]() ```go func GetUserGifts(ctx context.Context, b *client.Bot, p *GetUserGiftsParams) (*OwnedGifts, error) @@ -9561,7 +9561,7 @@ GetUserGifts calls the getUserGifts Telegram Bot API method. Returns the gifts owned and hosted by a user. Returns OwnedGifts on success. -### func \(\*OwnedGifts\) UnmarshalJSON +### func \(\*OwnedGifts\) [UnmarshalJSON]() ```go func (m *OwnedGifts) UnmarshalJSON(data []byte) error @@ -9570,7 +9570,7 @@ func (m *OwnedGifts) UnmarshalJSON(data []byte) error UnmarshalJSON decodes OwnedGifts by dispatching union\-typed fields \(Gifts\) through their concrete UnmarshalXxx helpers. -## type PaidMedia +## type [PaidMedia]() PaidMedia is a union type. The following concrete variants implement it: @@ -9588,7 +9588,7 @@ type PaidMedia interface { ``` -### func UnmarshalPaidMedia +### func [UnmarshalPaidMedia]() ```go func UnmarshalPaidMedia(data []byte) (PaidMedia, error) @@ -9597,7 +9597,7 @@ func UnmarshalPaidMedia(data []byte) (PaidMedia, error) UnmarshalPaidMedia decodes a PaidMedia from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type PaidMediaInfo +## type [PaidMediaInfo]() Describes the paid media added to a message. @@ -9611,7 +9611,7 @@ type PaidMediaInfo struct { ``` -### func \(\*PaidMediaInfo\) UnmarshalJSON +### func \(\*PaidMediaInfo\) [UnmarshalJSON]() ```go func (m *PaidMediaInfo) UnmarshalJSON(data []byte) error @@ -9620,7 +9620,7 @@ func (m *PaidMediaInfo) UnmarshalJSON(data []byte) error UnmarshalJSON decodes PaidMediaInfo by dispatching union\-typed fields \(PaidMedia\) through their concrete UnmarshalXxx helpers. -## type PaidMediaLivePhoto +## type [PaidMediaLivePhoto]() The paid media is a live photo. @@ -9634,7 +9634,7 @@ type PaidMediaLivePhoto struct { ``` -## type PaidMediaLivePhotoType +## type [PaidMediaLivePhotoType]() @@ -9651,7 +9651,7 @@ const ( ``` -## type PaidMediaPhoto +## type [PaidMediaPhoto]() The paid media is a photo. @@ -9665,7 +9665,7 @@ type PaidMediaPhoto struct { ``` -## type PaidMediaPhotoType +## type [PaidMediaPhotoType]() @@ -9682,7 +9682,7 @@ const ( ``` -## type PaidMediaPreview +## type [PaidMediaPreview]() The paid media isn't available before the payment. @@ -9700,7 +9700,7 @@ type PaidMediaPreview struct { ``` -## type PaidMediaPreviewType +## type [PaidMediaPreviewType]() @@ -9717,7 +9717,7 @@ const ( ``` -## type PaidMediaPurchased +## type [PaidMediaPurchased]() This object contains information about a paid media purchase. @@ -9731,7 +9731,7 @@ type PaidMediaPurchased struct { ``` -## type PaidMediaVideo +## type [PaidMediaVideo]() The paid media is a video. @@ -9745,7 +9745,7 @@ type PaidMediaVideo struct { ``` -## type PaidMediaVideoType +## type [PaidMediaVideoType]() @@ -9762,7 +9762,7 @@ const ( ``` -## type PaidMessagePriceChanged +## type [PaidMessagePriceChanged]() Describes a service message about a change in the price of paid messages within a chat. @@ -9774,7 +9774,7 @@ type PaidMessagePriceChanged struct { ``` -## type ParseMode +## type [ParseMode]() @@ -9793,7 +9793,7 @@ const ( ``` -## type PassportData +## type [PassportData]() Describes Telegram Passport data shared with the bot by the user. @@ -9807,7 +9807,7 @@ type PassportData struct { ``` -## type PassportElementError +## type [PassportElementError]() PassportElementError is a union type. The following concrete variants implement it: @@ -9830,7 +9830,7 @@ type PassportElementError interface { ``` -## type PassportElementErrorDataField +## type [PassportElementErrorDataField]() Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. @@ -9850,7 +9850,7 @@ type PassportElementErrorDataField struct { ``` -## type PassportElementErrorDataFieldType +## type [PassportElementErrorDataFieldType]() @@ -9872,7 +9872,7 @@ const ( ``` -## type PassportElementErrorFile +## type [PassportElementErrorFile]() Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. @@ -9890,7 +9890,7 @@ type PassportElementErrorFile struct { ``` -## type PassportElementErrorFileType +## type [PassportElementErrorFileType]() @@ -9911,7 +9911,7 @@ const ( ``` -## type PassportElementErrorFiles +## type [PassportElementErrorFiles]() Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. @@ -9929,7 +9929,7 @@ type PassportElementErrorFiles struct { ``` -## type PassportElementErrorFrontSide +## type [PassportElementErrorFrontSide]() Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. @@ -9947,7 +9947,7 @@ type PassportElementErrorFrontSide struct { ``` -## type PassportElementErrorReverseSide +## type [PassportElementErrorReverseSide]() Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. @@ -9965,7 +9965,7 @@ type PassportElementErrorReverseSide struct { ``` -## type PassportElementErrorReverseSideType +## type [PassportElementErrorReverseSideType]() @@ -9983,7 +9983,7 @@ const ( ``` -## type PassportElementErrorSelfie +## type [PassportElementErrorSelfie]() Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. @@ -10001,7 +10001,7 @@ type PassportElementErrorSelfie struct { ``` -## type PassportElementErrorSelfieType +## type [PassportElementErrorSelfieType]() @@ -10021,7 +10021,7 @@ const ( ``` -## type PassportElementErrorTranslationFile +## type [PassportElementErrorTranslationFile]() Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. @@ -10039,7 +10039,7 @@ type PassportElementErrorTranslationFile struct { ``` -## type PassportElementErrorTranslationFileType +## type [PassportElementErrorTranslationFileType]() @@ -10064,7 +10064,7 @@ const ( ``` -## type PassportElementErrorTranslationFiles +## type [PassportElementErrorTranslationFiles]() Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. @@ -10082,7 +10082,7 @@ type PassportElementErrorTranslationFiles struct { ``` -## type PassportElementErrorUnspecified +## type [PassportElementErrorUnspecified]() Represents an issue in an unspecified place. The error is considered resolved when new data is added. @@ -10100,7 +10100,7 @@ type PassportElementErrorUnspecified struct { ``` -## type PassportFile +## type [PassportFile]() This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. @@ -10118,7 +10118,7 @@ type PassportFile struct { ``` -## type PhotoSize +## type [PhotoSize]() This object represents one size of a photo or a file / sticker thumbnail. @@ -10138,7 +10138,7 @@ type PhotoSize struct { ``` -## type PinChatMessageParams +## type [PinChatMessageParams]() PinChatMessageParams is the parameter set for PinChatMessage. @@ -10158,7 +10158,7 @@ type PinChatMessageParams struct { ``` -## type Poll +## type [Poll]() This object contains information about a poll. @@ -10210,7 +10210,7 @@ type Poll struct { ``` -### func StopPoll +### func [StopPoll]() ```go func StopPoll(ctx context.Context, b *client.Bot, p *StopPollParams) (*Poll, error) @@ -10221,7 +10221,7 @@ StopPoll calls the stopPoll Telegram Bot API method. Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned. -## type PollAnswer +## type [PollAnswer]() This object represents an answer of a user in a non\-anonymous poll. @@ -10241,7 +10241,7 @@ type PollAnswer struct { ``` -### func \(\*PollAnswer\) GetSender +### func \(\*PollAnswer\) [GetSender]() ```go func (pa *PollAnswer) GetSender() *Sender @@ -10250,7 +10250,7 @@ func (pa *PollAnswer) GetSender() *Sender GetSender constructs a Sender for a PollAnswer. -## type PollMedia +## type [PollMedia]() At most one of the optional fields can be present in any given object. @@ -10278,7 +10278,7 @@ type PollMedia struct { ``` -## type PollOption +## type [PollOption]() This object contains information about one answer option in a poll. @@ -10304,7 +10304,7 @@ type PollOption struct { ``` -## type PollOptionAdded +## type [PollOptionAdded]() Describes a service message about an option added to a poll. @@ -10322,7 +10322,7 @@ type PollOptionAdded struct { ``` -### func \(\*PollOptionAdded\) UnmarshalJSON +### func \(\*PollOptionAdded\) [UnmarshalJSON]() ```go func (m *PollOptionAdded) UnmarshalJSON(data []byte) error @@ -10331,7 +10331,7 @@ func (m *PollOptionAdded) UnmarshalJSON(data []byte) error UnmarshalJSON decodes PollOptionAdded by dispatching union\-typed fields \(PollMessage\) through their concrete UnmarshalXxx helpers. -## type PollOptionDeleted +## type [PollOptionDeleted]() Describes a service message about an option deleted from a poll. @@ -10349,7 +10349,7 @@ type PollOptionDeleted struct { ``` -### func \(\*PollOptionDeleted\) UnmarshalJSON +### func \(\*PollOptionDeleted\) [UnmarshalJSON]() ```go func (m *PollOptionDeleted) UnmarshalJSON(data []byte) error @@ -10358,7 +10358,7 @@ func (m *PollOptionDeleted) UnmarshalJSON(data []byte) error UnmarshalJSON decodes PollOptionDeleted by dispatching union\-typed fields \(PollMessage\) through their concrete UnmarshalXxx helpers. -## type PollType +## type [PollType]() @@ -10376,7 +10376,7 @@ const ( ``` -## type PostStoryParams +## type [PostStoryParams]() PostStoryParams is the parameter set for PostStory. @@ -10406,7 +10406,7 @@ type PostStoryParams struct { ``` -## type PreCheckoutQuery +## type [PreCheckoutQuery]() This object contains information about an incoming pre\-checkout query. @@ -10430,7 +10430,7 @@ type PreCheckoutQuery struct { ``` -## type PreparedInlineMessage +## type [PreparedInlineMessage]() Describes an inline message to be sent by a user of a Mini App. @@ -10444,7 +10444,7 @@ type PreparedInlineMessage struct { ``` -### func SavePreparedInlineMessage +### func [SavePreparedInlineMessage]() ```go func SavePreparedInlineMessage(ctx context.Context, b *client.Bot, p *SavePreparedInlineMessageParams) (*PreparedInlineMessage, error) @@ -10455,7 +10455,7 @@ SavePreparedInlineMessage calls the savePreparedInlineMessage Telegram Bot API m Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object. -## type PreparedKeyboardButton +## type [PreparedKeyboardButton]() Describes a keyboard button to be used by a user of a Mini App. @@ -10467,7 +10467,7 @@ type PreparedKeyboardButton struct { ``` -### func SavePreparedKeyboardButton +### func [SavePreparedKeyboardButton]() ```go func SavePreparedKeyboardButton(ctx context.Context, b *client.Bot, p *SavePreparedKeyboardButtonParams) (*PreparedKeyboardButton, error) @@ -10478,7 +10478,7 @@ SavePreparedKeyboardButton calls the savePreparedKeyboardButton Telegram Bot API Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButton object. -## type PromoteChatMemberParams +## type [PromoteChatMemberParams]() PromoteChatMemberParams is the parameter set for PromoteChatMember. @@ -10528,7 +10528,7 @@ type PromoteChatMemberParams struct { ``` -## type ProximityAlertTriggered +## type [ProximityAlertTriggered]() This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. @@ -10544,7 +10544,7 @@ type ProximityAlertTriggered struct { ``` -## type ReactionCount +## type [ReactionCount]() Represents a reaction added to a message along with the number of times it was added. @@ -10558,7 +10558,7 @@ type ReactionCount struct { ``` -### func \(\*ReactionCount\) UnmarshalJSON +### func \(\*ReactionCount\) [UnmarshalJSON]() ```go func (m *ReactionCount) UnmarshalJSON(data []byte) error @@ -10567,7 +10567,7 @@ func (m *ReactionCount) UnmarshalJSON(data []byte) error UnmarshalJSON decodes ReactionCount by dispatching union\-typed fields \(Type\) through their concrete UnmarshalXxx helpers. -## type ReactionType +## type [ReactionType]() ReactionType is a union type. The following concrete variants implement it: @@ -10584,7 +10584,7 @@ type ReactionType interface { ``` -### func UnmarshalReactionType +### func [UnmarshalReactionType]() ```go func UnmarshalReactionType(data []byte) (ReactionType, error) @@ -10593,7 +10593,7 @@ func UnmarshalReactionType(data []byte) (ReactionType, error) UnmarshalReactionType decodes a ReactionType from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type ReactionTypeCustomEmoji +## type [ReactionTypeCustomEmoji]() The reaction is based on a custom emoji. @@ -10607,7 +10607,7 @@ type ReactionTypeCustomEmoji struct { ``` -## type ReactionTypeCustomEmojiType +## type [ReactionTypeCustomEmojiType]() @@ -10624,7 +10624,7 @@ const ( ``` -## type ReactionTypeEmoji +## type [ReactionTypeEmoji]() The reaction is based on an emoji. @@ -10638,7 +10638,7 @@ type ReactionTypeEmoji struct { ``` -## type ReactionTypeEmojiType +## type [ReactionTypeEmojiType]() @@ -10655,7 +10655,7 @@ const ( ``` -## type ReactionTypePaid +## type [ReactionTypePaid]() The reaction is paid. @@ -10667,7 +10667,7 @@ type ReactionTypePaid struct { ``` -## type ReactionTypePaidType +## type [ReactionTypePaidType]() @@ -10684,7 +10684,7 @@ const ( ``` -## type ReadBusinessMessageParams +## type [ReadBusinessMessageParams]() ReadBusinessMessageParams is the parameter set for ReadBusinessMessage. @@ -10702,7 +10702,7 @@ type ReadBusinessMessageParams struct { ``` -## type RefundStarPaymentParams +## type [RefundStarPaymentParams]() RefundStarPaymentParams is the parameter set for RefundStarPayment. @@ -10718,7 +10718,7 @@ type RefundStarPaymentParams struct { ``` -## type RefundedPayment +## type [RefundedPayment]() This object contains basic information about a refunded payment. @@ -10738,7 +10738,7 @@ type RefundedPayment struct { ``` -## type RefundedPaymentCurrency +## type [RefundedPaymentCurrency]() @@ -10755,7 +10755,7 @@ const ( ``` -## type RemoveBusinessAccountProfilePhotoParams +## type [RemoveBusinessAccountProfilePhotoParams]() RemoveBusinessAccountProfilePhotoParams is the parameter set for RemoveBusinessAccountProfilePhoto. @@ -10771,7 +10771,7 @@ type RemoveBusinessAccountProfilePhotoParams struct { ``` -## type RemoveChatVerificationParams +## type [RemoveChatVerificationParams]() RemoveChatVerificationParams is the parameter set for RemoveChatVerification. @@ -10785,7 +10785,7 @@ type RemoveChatVerificationParams struct { ``` -## type RemoveMyProfilePhotoParams +## type [RemoveMyProfilePhotoParams]() RemoveMyProfilePhotoParams is the parameter set for RemoveMyProfilePhoto. @@ -10797,7 +10797,7 @@ type RemoveMyProfilePhotoParams struct { ``` -## type RemoveUserVerificationParams +## type [RemoveUserVerificationParams]() RemoveUserVerificationParams is the parameter set for RemoveUserVerification. @@ -10811,7 +10811,7 @@ type RemoveUserVerificationParams struct { ``` -## type ReopenForumTopicParams +## type [ReopenForumTopicParams]() ReopenForumTopicParams is the parameter set for ReopenForumTopic. @@ -10827,7 +10827,7 @@ type ReopenForumTopicParams struct { ``` -## type ReopenGeneralForumTopicParams +## type [ReopenGeneralForumTopicParams]() ReopenGeneralForumTopicParams is the parameter set for ReopenGeneralForumTopic. @@ -10841,7 +10841,7 @@ type ReopenGeneralForumTopicParams struct { ``` -## type ReplaceManagedBotTokenParams +## type [ReplaceManagedBotTokenParams]() ReplaceManagedBotTokenParams is the parameter set for ReplaceManagedBotToken. @@ -10855,7 +10855,7 @@ type ReplaceManagedBotTokenParams struct { ``` -## type ReplaceStickerInSetParams +## type [ReplaceStickerInSetParams]() ReplaceStickerInSetParams is the parameter set for ReplaceStickerInSet. @@ -10875,7 +10875,7 @@ type ReplaceStickerInSetParams struct { ``` -## type ReplyKeyboardMarkup +## type [ReplyKeyboardMarkup]() This object represents a custom keyboard with reply options \(see Introduction to bots for details and examples\). Not supported in channels and for messages sent on behalf of a business account. @@ -10897,7 +10897,7 @@ type ReplyKeyboardMarkup struct { ``` -## type ReplyKeyboardRemove +## type [ReplyKeyboardRemove]() Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter\-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one\-time keyboards that are hidden immediately after the user presses a button \(see ReplyKeyboardMarkup\). Not supported in channels and for messages sent on behalf of a business account. @@ -10911,7 +10911,7 @@ type ReplyKeyboardRemove struct { ``` -## type ReplyParameters +## type [ReplyParameters]() Describes reply parameters for the message that is being sent. @@ -10939,7 +10939,7 @@ type ReplyParameters struct { ``` -## type RepostStoryParams +## type [RepostStoryParams]() RepostStoryParams is the parameter set for RepostStory. @@ -10963,7 +10963,7 @@ type RepostStoryParams struct { ``` -## type ResponseParameters +## type [ResponseParameters]() ResponseParameters is the optional metadata Telegram includes on certain failures. The most common is RetryAfter \(seconds\) on 429 responses. @@ -10977,7 +10977,7 @@ type ResponseParameters struct { ``` -## type RestrictChatMemberParams +## type [RestrictChatMemberParams]() RestrictChatMemberParams is the parameter set for RestrictChatMember. @@ -10999,7 +10999,7 @@ type RestrictChatMemberParams struct { ``` -## type RevenueWithdrawalState +## type [RevenueWithdrawalState]() RevenueWithdrawalState is a union type. The following concrete variants implement it: @@ -11016,7 +11016,7 @@ type RevenueWithdrawalState interface { ``` -### func UnmarshalRevenueWithdrawalState +### func [UnmarshalRevenueWithdrawalState]() ```go func UnmarshalRevenueWithdrawalState(data []byte) (RevenueWithdrawalState, error) @@ -11025,7 +11025,7 @@ func UnmarshalRevenueWithdrawalState(data []byte) (RevenueWithdrawalState, error UnmarshalRevenueWithdrawalState decodes a RevenueWithdrawalState from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type RevenueWithdrawalStateFailed +## type [RevenueWithdrawalStateFailed]() The withdrawal failed and the transaction was refunded. @@ -11037,7 +11037,7 @@ type RevenueWithdrawalStateFailed struct { ``` -## type RevenueWithdrawalStateFailedType +## type [RevenueWithdrawalStateFailedType]() @@ -11054,7 +11054,7 @@ const ( ``` -## type RevenueWithdrawalStatePending +## type [RevenueWithdrawalStatePending]() The withdrawal is in progress. @@ -11066,7 +11066,7 @@ type RevenueWithdrawalStatePending struct { ``` -## type RevenueWithdrawalStatePendingType +## type [RevenueWithdrawalStatePendingType]() @@ -11083,7 +11083,7 @@ const ( ``` -## type RevenueWithdrawalStateSucceeded +## type [RevenueWithdrawalStateSucceeded]() The withdrawal succeeded. @@ -11099,7 +11099,7 @@ type RevenueWithdrawalStateSucceeded struct { ``` -## type RevenueWithdrawalStateSucceededType +## type [RevenueWithdrawalStateSucceededType]() @@ -11116,7 +11116,7 @@ const ( ``` -## type RevokeChatInviteLinkParams +## type [RevokeChatInviteLinkParams]() RevokeChatInviteLinkParams is the parameter set for RevokeChatInviteLink. @@ -11132,7 +11132,7 @@ type RevokeChatInviteLinkParams struct { ``` -## type SavePreparedInlineMessageParams +## type [SavePreparedInlineMessageParams]() SavePreparedInlineMessageParams is the parameter set for SavePreparedInlineMessage. @@ -11156,7 +11156,7 @@ type SavePreparedInlineMessageParams struct { ``` -## type SavePreparedKeyboardButtonParams +## type [SavePreparedKeyboardButtonParams]() SavePreparedKeyboardButtonParams is the parameter set for SavePreparedKeyboardButton. @@ -11172,7 +11172,7 @@ type SavePreparedKeyboardButtonParams struct { ``` -## type SendAnimationParams +## type [SendAnimationParams]() SendAnimationParams is the parameter set for SendAnimation. @@ -11226,7 +11226,7 @@ type SendAnimationParams struct { ``` -### func \(\*SendAnimationParams\) HasFile +### func \(\*SendAnimationParams\) [HasFile]() ```go func (p *SendAnimationParams) HasFile() bool @@ -11235,7 +11235,7 @@ func (p *SendAnimationParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendAnimationParams\) MultipartFields +### func \(\*SendAnimationParams\) [MultipartFields]() ```go func (p *SendAnimationParams) MultipartFields() map[string]string @@ -11244,7 +11244,7 @@ func (p *SendAnimationParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendAnimationParams\) MultipartFiles +### func \(\*SendAnimationParams\) [MultipartFiles]() ```go func (p *SendAnimationParams) MultipartFiles() []client.MultipartFile @@ -11253,7 +11253,7 @@ func (p *SendAnimationParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendAudioParams +## type [SendAudioParams]() SendAudioParams is the parameter set for SendAudio. @@ -11303,7 +11303,7 @@ type SendAudioParams struct { ``` -### func \(\*SendAudioParams\) HasFile +### func \(\*SendAudioParams\) [HasFile]() ```go func (p *SendAudioParams) HasFile() bool @@ -11312,7 +11312,7 @@ func (p *SendAudioParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendAudioParams\) MultipartFields +### func \(\*SendAudioParams\) [MultipartFields]() ```go func (p *SendAudioParams) MultipartFields() map[string]string @@ -11321,7 +11321,7 @@ func (p *SendAudioParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendAudioParams\) MultipartFiles +### func \(\*SendAudioParams\) [MultipartFiles]() ```go func (p *SendAudioParams) MultipartFiles() []client.MultipartFile @@ -11330,7 +11330,7 @@ func (p *SendAudioParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendChatActionParams +## type [SendChatActionParams]() SendChatActionParams is the parameter set for SendChatAction. @@ -11350,7 +11350,7 @@ type SendChatActionParams struct { ``` -## type SendChecklistParams +## type [SendChecklistParams]() SendChecklistParams is the parameter set for SendChecklist. @@ -11378,7 +11378,7 @@ type SendChecklistParams struct { ``` -## type SendContactParams +## type [SendContactParams]() SendContactParams is the parameter set for SendContact. @@ -11420,7 +11420,7 @@ type SendContactParams struct { ``` -## type SendDiceParams +## type [SendDiceParams]() SendDiceParams is the parameter set for SendDice. @@ -11456,7 +11456,7 @@ type SendDiceParams struct { ``` -## type SendDocumentParams +## type [SendDocumentParams]() SendDocumentParams is the parameter set for SendDocument. @@ -11502,7 +11502,7 @@ type SendDocumentParams struct { ``` -### func \(\*SendDocumentParams\) HasFile +### func \(\*SendDocumentParams\) [HasFile]() ```go func (p *SendDocumentParams) HasFile() bool @@ -11511,7 +11511,7 @@ func (p *SendDocumentParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendDocumentParams\) MultipartFields +### func \(\*SendDocumentParams\) [MultipartFields]() ```go func (p *SendDocumentParams) MultipartFields() map[string]string @@ -11520,7 +11520,7 @@ func (p *SendDocumentParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendDocumentParams\) MultipartFiles +### func \(\*SendDocumentParams\) [MultipartFiles]() ```go func (p *SendDocumentParams) MultipartFiles() []client.MultipartFile @@ -11529,7 +11529,7 @@ func (p *SendDocumentParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendGameParams +## type [SendGameParams]() SendGameParams is the parameter set for SendGame. @@ -11561,7 +11561,7 @@ type SendGameParams struct { ``` -## type SendGiftParams +## type [SendGiftParams]() SendGiftParams is the parameter set for SendGift. @@ -11587,7 +11587,7 @@ type SendGiftParams struct { ``` -## type SendInvoiceParams +## type [SendInvoiceParams]() SendInvoiceParams is the parameter set for SendInvoice. @@ -11661,7 +11661,7 @@ type SendInvoiceParams struct { ``` -## type SendLivePhotoParams +## type [SendLivePhotoParams]() SendLivePhotoParams is the parameter set for SendLivePhoto. @@ -11709,7 +11709,7 @@ type SendLivePhotoParams struct { ``` -### func \(\*SendLivePhotoParams\) HasFile +### func \(\*SendLivePhotoParams\) [HasFile]() ```go func (p *SendLivePhotoParams) HasFile() bool @@ -11718,7 +11718,7 @@ func (p *SendLivePhotoParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendLivePhotoParams\) MultipartFields +### func \(\*SendLivePhotoParams\) [MultipartFields]() ```go func (p *SendLivePhotoParams) MultipartFields() map[string]string @@ -11727,7 +11727,7 @@ func (p *SendLivePhotoParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendLivePhotoParams\) MultipartFiles +### func \(\*SendLivePhotoParams\) [MultipartFiles]() ```go func (p *SendLivePhotoParams) MultipartFiles() []client.MultipartFile @@ -11736,7 +11736,7 @@ func (p *SendLivePhotoParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendLocationParams +## type [SendLocationParams]() SendLocationParams is the parameter set for SendLocation. @@ -11782,7 +11782,7 @@ type SendLocationParams struct { ``` -## type SendMediaGroupParams +## type [SendMediaGroupParams]() SendMediaGroupParams is the parameter set for SendMediaGroup. @@ -11814,7 +11814,7 @@ type SendMediaGroupParams struct { ``` -### func \(\*SendMediaGroupParams\) HasFile +### func \(\*SendMediaGroupParams\) [HasFile]() ```go func (p *SendMediaGroupParams) HasFile() bool @@ -11823,7 +11823,7 @@ func (p *SendMediaGroupParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendMediaGroupParams\) MultipartFields +### func \(\*SendMediaGroupParams\) [MultipartFields]() ```go func (p *SendMediaGroupParams) MultipartFields() map[string]string @@ -11832,7 +11832,7 @@ func (p *SendMediaGroupParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendMediaGroupParams\) MultipartFiles +### func \(\*SendMediaGroupParams\) [MultipartFiles]() ```go func (p *SendMediaGroupParams) MultipartFiles() []client.MultipartFile @@ -11841,7 +11841,7 @@ func (p *SendMediaGroupParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendMessageDraftParams +## type [SendMessageDraftParams]() SendMessageDraftParams is the parameter set for SendMessageDraft. @@ -11865,7 +11865,7 @@ type SendMessageDraftParams struct { ``` -## type SendMessageParams +## type [SendMessageParams]() SendMessageParams is the parameter set for SendMessage. @@ -11907,7 +11907,7 @@ type SendMessageParams struct { ``` -## type SendPaidMediaParams +## type [SendPaidMediaParams]() SendPaidMediaParams is the parameter set for SendPaidMedia. @@ -11953,7 +11953,7 @@ type SendPaidMediaParams struct { ``` -### func \(\*SendPaidMediaParams\) HasFile +### func \(\*SendPaidMediaParams\) [HasFile]() ```go func (p *SendPaidMediaParams) HasFile() bool @@ -11962,7 +11962,7 @@ func (p *SendPaidMediaParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendPaidMediaParams\) MultipartFields +### func \(\*SendPaidMediaParams\) [MultipartFields]() ```go func (p *SendPaidMediaParams) MultipartFields() map[string]string @@ -11971,7 +11971,7 @@ func (p *SendPaidMediaParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendPaidMediaParams\) MultipartFiles +### func \(\*SendPaidMediaParams\) [MultipartFiles]() ```go func (p *SendPaidMediaParams) MultipartFiles() []client.MultipartFile @@ -11980,7 +11980,7 @@ func (p *SendPaidMediaParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendPhotoParams +## type [SendPhotoParams]() SendPhotoParams is the parameter set for SendPhoto. @@ -12026,7 +12026,7 @@ type SendPhotoParams struct { ``` -### func \(\*SendPhotoParams\) HasFile +### func \(\*SendPhotoParams\) [HasFile]() ```go func (p *SendPhotoParams) HasFile() bool @@ -12035,7 +12035,7 @@ func (p *SendPhotoParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendPhotoParams\) MultipartFields +### func \(\*SendPhotoParams\) [MultipartFields]() ```go func (p *SendPhotoParams) MultipartFields() map[string]string @@ -12044,7 +12044,7 @@ func (p *SendPhotoParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendPhotoParams\) MultipartFiles +### func \(\*SendPhotoParams\) [MultipartFiles]() ```go func (p *SendPhotoParams) MultipartFiles() []client.MultipartFile @@ -12053,7 +12053,7 @@ func (p *SendPhotoParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendPollParams +## type [SendPollParams]() SendPollParams is the parameter set for SendPoll. @@ -12133,7 +12133,7 @@ type SendPollParams struct { ``` -## type SendStickerParams +## type [SendStickerParams]() SendStickerParams is the parameter set for SendSticker. @@ -12171,7 +12171,7 @@ type SendStickerParams struct { ``` -### func \(\*SendStickerParams\) HasFile +### func \(\*SendStickerParams\) [HasFile]() ```go func (p *SendStickerParams) HasFile() bool @@ -12180,7 +12180,7 @@ func (p *SendStickerParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendStickerParams\) MultipartFields +### func \(\*SendStickerParams\) [MultipartFields]() ```go func (p *SendStickerParams) MultipartFields() map[string]string @@ -12189,7 +12189,7 @@ func (p *SendStickerParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendStickerParams\) MultipartFiles +### func \(\*SendStickerParams\) [MultipartFiles]() ```go func (p *SendStickerParams) MultipartFiles() []client.MultipartFile @@ -12198,7 +12198,7 @@ func (p *SendStickerParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendVenueParams +## type [SendVenueParams]() SendVenueParams is the parameter set for SendVenue. @@ -12248,7 +12248,7 @@ type SendVenueParams struct { ``` -## type SendVideoNoteParams +## type [SendVideoNoteParams]() SendVideoNoteParams is the parameter set for SendVideoNote. @@ -12290,7 +12290,7 @@ type SendVideoNoteParams struct { ``` -### func \(\*SendVideoNoteParams\) HasFile +### func \(\*SendVideoNoteParams\) [HasFile]() ```go func (p *SendVideoNoteParams) HasFile() bool @@ -12299,7 +12299,7 @@ func (p *SendVideoNoteParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendVideoNoteParams\) MultipartFields +### func \(\*SendVideoNoteParams\) [MultipartFields]() ```go func (p *SendVideoNoteParams) MultipartFields() map[string]string @@ -12308,7 +12308,7 @@ func (p *SendVideoNoteParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendVideoNoteParams\) MultipartFiles +### func \(\*SendVideoNoteParams\) [MultipartFiles]() ```go func (p *SendVideoNoteParams) MultipartFiles() []client.MultipartFile @@ -12317,7 +12317,7 @@ func (p *SendVideoNoteParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendVideoParams +## type [SendVideoParams]() SendVideoParams is the parameter set for SendVideo. @@ -12377,7 +12377,7 @@ type SendVideoParams struct { ``` -### func \(\*SendVideoParams\) HasFile +### func \(\*SendVideoParams\) [HasFile]() ```go func (p *SendVideoParams) HasFile() bool @@ -12386,7 +12386,7 @@ func (p *SendVideoParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendVideoParams\) MultipartFields +### func \(\*SendVideoParams\) [MultipartFields]() ```go func (p *SendVideoParams) MultipartFields() map[string]string @@ -12395,7 +12395,7 @@ func (p *SendVideoParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendVideoParams\) MultipartFiles +### func \(\*SendVideoParams\) [MultipartFiles]() ```go func (p *SendVideoParams) MultipartFiles() []client.MultipartFile @@ -12404,7 +12404,7 @@ func (p *SendVideoParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SendVoiceParams +## type [SendVoiceParams]() SendVoiceParams is the parameter set for SendVoice. @@ -12448,7 +12448,7 @@ type SendVoiceParams struct { ``` -### func \(\*SendVoiceParams\) HasFile +### func \(\*SendVoiceParams\) [HasFile]() ```go func (p *SendVoiceParams) HasFile() bool @@ -12457,7 +12457,7 @@ func (p *SendVoiceParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SendVoiceParams\) MultipartFields +### func \(\*SendVoiceParams\) [MultipartFields]() ```go func (p *SendVoiceParams) MultipartFields() map[string]string @@ -12466,7 +12466,7 @@ func (p *SendVoiceParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SendVoiceParams\) MultipartFiles +### func \(\*SendVoiceParams\) [MultipartFiles]() ```go func (p *SendVoiceParams) MultipartFiles() []client.MultipartFile @@ -12475,7 +12475,7 @@ func (p *SendVoiceParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type Sender +## type [Sender]() Sender condenses the various ways a Telegram update can identify the originator of a message or reaction into a single shape. Use the GetSender methods on supported types to construct one. @@ -12500,7 +12500,7 @@ type Sender struct { ``` -### func \(\*Sender\) ID +### func \(\*Sender\) [ID]() ```go func (s *Sender) ID() int64 @@ -12509,7 +12509,7 @@ func (s *Sender) ID() int64 ID returns the most\-specific identifier available: prefers Chat.ID over User.ID. Returns 0 if neither is set. -### func \(\*Sender\) IsAnonymousAdmin +### func \(\*Sender\) [IsAnonymousAdmin]() ```go func (s *Sender) IsAnonymousAdmin() bool @@ -12518,7 +12518,7 @@ func (s *Sender) IsAnonymousAdmin() bool IsAnonymousAdmin reports whether the sender is a group admin posting anonymously \(Chat equals the message's own chat\). -### func \(\*Sender\) IsAnonymousChannel +### func \(\*Sender\) [IsAnonymousChannel]() ```go func (s *Sender) IsAnonymousChannel() bool @@ -12527,7 +12527,7 @@ func (s *Sender) IsAnonymousChannel() bool IsAnonymousChannel reports whether the sender is an anonymous channel post \(Chat differs from the message's own chat\). -## type SentGuestMessage +## type [SentGuestMessage]() Describes an inline message sent by a guest bot. @@ -12539,7 +12539,7 @@ type SentGuestMessage struct { ``` -### func AnswerGuestQuery +### func [AnswerGuestQuery]() ```go func AnswerGuestQuery(ctx context.Context, b *client.Bot, p *AnswerGuestQueryParams) (*SentGuestMessage, error) @@ -12550,7 +12550,7 @@ AnswerGuestQuery calls the answerGuestQuery Telegram Bot API method. Use this method to reply to a received guest message. On success, a SentGuestMessage object is returned. -## type SentWebAppMessage +## type [SentWebAppMessage]() Describes an inline message sent by a Web App on behalf of a user. @@ -12562,7 +12562,7 @@ type SentWebAppMessage struct { ``` -### func AnswerWebAppQuery +### func [AnswerWebAppQuery]() ```go func AnswerWebAppQuery(ctx context.Context, b *client.Bot, p *AnswerWebAppQueryParams) (*SentWebAppMessage, error) @@ -12573,7 +12573,7 @@ AnswerWebAppQuery calls the answerWebAppQuery Telegram Bot API method. Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned. -## type SetBusinessAccountBioParams +## type [SetBusinessAccountBioParams]() SetBusinessAccountBioParams is the parameter set for SetBusinessAccountBio. @@ -12589,7 +12589,7 @@ type SetBusinessAccountBioParams struct { ``` -## type SetBusinessAccountGiftSettingsParams +## type [SetBusinessAccountGiftSettingsParams]() SetBusinessAccountGiftSettingsParams is the parameter set for SetBusinessAccountGiftSettings. @@ -12607,7 +12607,7 @@ type SetBusinessAccountGiftSettingsParams struct { ``` -## type SetBusinessAccountNameParams +## type [SetBusinessAccountNameParams]() SetBusinessAccountNameParams is the parameter set for SetBusinessAccountName. @@ -12625,7 +12625,7 @@ type SetBusinessAccountNameParams struct { ``` -## type SetBusinessAccountProfilePhotoParams +## type [SetBusinessAccountProfilePhotoParams]() SetBusinessAccountProfilePhotoParams is the parameter set for SetBusinessAccountProfilePhoto. @@ -12643,7 +12643,7 @@ type SetBusinessAccountProfilePhotoParams struct { ``` -## type SetBusinessAccountUsernameParams +## type [SetBusinessAccountUsernameParams]() SetBusinessAccountUsernameParams is the parameter set for SetBusinessAccountUsername. @@ -12659,7 +12659,7 @@ type SetBusinessAccountUsernameParams struct { ``` -## type SetChatAdministratorCustomTitleParams +## type [SetChatAdministratorCustomTitleParams]() SetChatAdministratorCustomTitleParams is the parameter set for SetChatAdministratorCustomTitle. @@ -12677,7 +12677,7 @@ type SetChatAdministratorCustomTitleParams struct { ``` -## type SetChatDescriptionParams +## type [SetChatDescriptionParams]() SetChatDescriptionParams is the parameter set for SetChatDescription. @@ -12693,7 +12693,7 @@ type SetChatDescriptionParams struct { ``` -## type SetChatMemberTagParams +## type [SetChatMemberTagParams]() SetChatMemberTagParams is the parameter set for SetChatMemberTag. @@ -12711,7 +12711,7 @@ type SetChatMemberTagParams struct { ``` -## type SetChatMenuButtonParams +## type [SetChatMenuButtonParams]() SetChatMenuButtonParams is the parameter set for SetChatMenuButton. @@ -12727,7 +12727,7 @@ type SetChatMenuButtonParams struct { ``` -## type SetChatPermissionsParams +## type [SetChatPermissionsParams]() SetChatPermissionsParams is the parameter set for SetChatPermissions. @@ -12745,7 +12745,7 @@ type SetChatPermissionsParams struct { ``` -## type SetChatPhotoParams +## type [SetChatPhotoParams]() SetChatPhotoParams is the parameter set for SetChatPhoto. @@ -12761,7 +12761,7 @@ type SetChatPhotoParams struct { ``` -### func \(\*SetChatPhotoParams\) HasFile +### func \(\*SetChatPhotoParams\) [HasFile]() ```go func (p *SetChatPhotoParams) HasFile() bool @@ -12770,7 +12770,7 @@ func (p *SetChatPhotoParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SetChatPhotoParams\) MultipartFields +### func \(\*SetChatPhotoParams\) [MultipartFields]() ```go func (p *SetChatPhotoParams) MultipartFields() map[string]string @@ -12779,7 +12779,7 @@ func (p *SetChatPhotoParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SetChatPhotoParams\) MultipartFiles +### func \(\*SetChatPhotoParams\) [MultipartFiles]() ```go func (p *SetChatPhotoParams) MultipartFiles() []client.MultipartFile @@ -12788,7 +12788,7 @@ func (p *SetChatPhotoParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SetChatStickerSetParams +## type [SetChatStickerSetParams]() SetChatStickerSetParams is the parameter set for SetChatStickerSet. @@ -12804,7 +12804,7 @@ type SetChatStickerSetParams struct { ``` -## type SetChatTitleParams +## type [SetChatTitleParams]() SetChatTitleParams is the parameter set for SetChatTitle. @@ -12820,7 +12820,7 @@ type SetChatTitleParams struct { ``` -## type SetCustomEmojiStickerSetThumbnailParams +## type [SetCustomEmojiStickerSetThumbnailParams]() SetCustomEmojiStickerSetThumbnailParams is the parameter set for SetCustomEmojiStickerSetThumbnail. @@ -12836,7 +12836,7 @@ type SetCustomEmojiStickerSetThumbnailParams struct { ``` -## type SetGameScoreParams +## type [SetGameScoreParams]() SetGameScoreParams is the parameter set for SetGameScore. @@ -12862,7 +12862,7 @@ type SetGameScoreParams struct { ``` -## type SetManagedBotAccessSettingsParams +## type [SetManagedBotAccessSettingsParams]() SetManagedBotAccessSettingsParams is the parameter set for SetManagedBotAccessSettings. @@ -12880,7 +12880,7 @@ type SetManagedBotAccessSettingsParams struct { ``` -## type SetMessageReactionParams +## type [SetMessageReactionParams]() SetMessageReactionParams is the parameter set for SetMessageReaction. @@ -12900,7 +12900,7 @@ type SetMessageReactionParams struct { ``` -## type SetMyCommandsParams +## type [SetMyCommandsParams]() SetMyCommandsParams is the parameter set for SetMyCommands. @@ -12918,7 +12918,7 @@ type SetMyCommandsParams struct { ``` -## type SetMyDefaultAdministratorRightsParams +## type [SetMyDefaultAdministratorRightsParams]() SetMyDefaultAdministratorRightsParams is the parameter set for SetMyDefaultAdministratorRights. @@ -12934,7 +12934,7 @@ type SetMyDefaultAdministratorRightsParams struct { ``` -## type SetMyDescriptionParams +## type [SetMyDescriptionParams]() SetMyDescriptionParams is the parameter set for SetMyDescription. @@ -12950,7 +12950,7 @@ type SetMyDescriptionParams struct { ``` -## type SetMyNameParams +## type [SetMyNameParams]() SetMyNameParams is the parameter set for SetMyName. @@ -12966,7 +12966,7 @@ type SetMyNameParams struct { ``` -## type SetMyProfilePhotoParams +## type [SetMyProfilePhotoParams]() SetMyProfilePhotoParams is the parameter set for SetMyProfilePhoto. @@ -12980,7 +12980,7 @@ type SetMyProfilePhotoParams struct { ``` -## type SetMyShortDescriptionParams +## type [SetMyShortDescriptionParams]() SetMyShortDescriptionParams is the parameter set for SetMyShortDescription. @@ -12996,7 +12996,7 @@ type SetMyShortDescriptionParams struct { ``` -## type SetPassportDataErrorsParams +## type [SetPassportDataErrorsParams]() SetPassportDataErrorsParams is the parameter set for SetPassportDataErrors. @@ -13012,7 +13012,7 @@ type SetPassportDataErrorsParams struct { ``` -## type SetStickerEmojiListParams +## type [SetStickerEmojiListParams]() SetStickerEmojiListParams is the parameter set for SetStickerEmojiList. @@ -13028,7 +13028,7 @@ type SetStickerEmojiListParams struct { ``` -## type SetStickerKeywordsParams +## type [SetStickerKeywordsParams]() SetStickerKeywordsParams is the parameter set for SetStickerKeywords. @@ -13044,7 +13044,7 @@ type SetStickerKeywordsParams struct { ``` -## type SetStickerMaskPositionParams +## type [SetStickerMaskPositionParams]() SetStickerMaskPositionParams is the parameter set for SetStickerMaskPosition. @@ -13060,7 +13060,7 @@ type SetStickerMaskPositionParams struct { ``` -## type SetStickerPositionInSetParams +## type [SetStickerPositionInSetParams]() SetStickerPositionInSetParams is the parameter set for SetStickerPositionInSet. @@ -13076,7 +13076,7 @@ type SetStickerPositionInSetParams struct { ``` -## type SetStickerSetThumbnailParams +## type [SetStickerSetThumbnailParams]() SetStickerSetThumbnailParams is the parameter set for SetStickerSetThumbnail. @@ -13096,7 +13096,7 @@ type SetStickerSetThumbnailParams struct { ``` -### func \(\*SetStickerSetThumbnailParams\) HasFile +### func \(\*SetStickerSetThumbnailParams\) [HasFile]() ```go func (p *SetStickerSetThumbnailParams) HasFile() bool @@ -13105,7 +13105,7 @@ func (p *SetStickerSetThumbnailParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SetStickerSetThumbnailParams\) MultipartFields +### func \(\*SetStickerSetThumbnailParams\) [MultipartFields]() ```go func (p *SetStickerSetThumbnailParams) MultipartFields() map[string]string @@ -13114,7 +13114,7 @@ func (p *SetStickerSetThumbnailParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SetStickerSetThumbnailParams\) MultipartFiles +### func \(\*SetStickerSetThumbnailParams\) [MultipartFiles]() ```go func (p *SetStickerSetThumbnailParams) MultipartFiles() []client.MultipartFile @@ -13123,7 +13123,7 @@ func (p *SetStickerSetThumbnailParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SetStickerSetTitleParams +## type [SetStickerSetTitleParams]() SetStickerSetTitleParams is the parameter set for SetStickerSetTitle. @@ -13139,7 +13139,7 @@ type SetStickerSetTitleParams struct { ``` -## type SetUserEmojiStatusParams +## type [SetUserEmojiStatusParams]() SetUserEmojiStatusParams is the parameter set for SetUserEmojiStatus. @@ -13157,7 +13157,7 @@ type SetUserEmojiStatusParams struct { ``` -## type SetWebhookParams +## type [SetWebhookParams]() SetWebhookParams is the parameter set for SetWebhook. @@ -13183,7 +13183,7 @@ type SetWebhookParams struct { ``` -### func \(\*SetWebhookParams\) HasFile +### func \(\*SetWebhookParams\) [HasFile]() ```go func (p *SetWebhookParams) HasFile() bool @@ -13192,7 +13192,7 @@ func (p *SetWebhookParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*SetWebhookParams\) MultipartFields +### func \(\*SetWebhookParams\) [MultipartFields]() ```go func (p *SetWebhookParams) MultipartFields() map[string]string @@ -13201,7 +13201,7 @@ func (p *SetWebhookParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*SetWebhookParams\) MultipartFiles +### func \(\*SetWebhookParams\) [MultipartFiles]() ```go func (p *SetWebhookParams) MultipartFiles() []client.MultipartFile @@ -13210,7 +13210,7 @@ func (p *SetWebhookParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type SharedUser +## type [SharedUser]() This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button. @@ -13230,7 +13230,7 @@ type SharedUser struct { ``` -## type ShippingAddress +## type [ShippingAddress]() This object represents a shipping address. @@ -13252,7 +13252,7 @@ type ShippingAddress struct { ``` -## type ShippingOption +## type [ShippingOption]() This object represents one shipping option. @@ -13268,7 +13268,7 @@ type ShippingOption struct { ``` -## type ShippingQuery +## type [ShippingQuery]() This object contains information about an incoming shipping query. @@ -13286,7 +13286,7 @@ type ShippingQuery struct { ``` -## type StarAmount +## type [StarAmount]() Describes an amount of Telegram Stars. @@ -13300,7 +13300,7 @@ type StarAmount struct { ``` -### func GetBusinessAccountStarBalance +### func [GetBusinessAccountStarBalance]() ```go func GetBusinessAccountStarBalance(ctx context.Context, b *client.Bot, p *GetBusinessAccountStarBalanceParams) (*StarAmount, error) @@ -13311,7 +13311,7 @@ GetBusinessAccountStarBalance calls the getBusinessAccountStarBalance Telegram B Returns the amount of Telegram Stars owned by a managed business account. Requires the can\_view\_gifts\_and\_stars business bot right. Returns StarAmount on success. -### func GetMyStarBalance +### func [GetMyStarBalance]() ```go func GetMyStarBalance(ctx context.Context, b *client.Bot, p *GetMyStarBalanceParams) (*StarAmount, error) @@ -13322,7 +13322,7 @@ GetMyStarBalance calls the getMyStarBalance Telegram Bot API method. A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object. -## type StarTransaction +## type [StarTransaction]() Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars \(e.g., Apple, Google\) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control. @@ -13344,7 +13344,7 @@ type StarTransaction struct { ``` -### func \(\*StarTransaction\) UnmarshalJSON +### func \(\*StarTransaction\) [UnmarshalJSON]() ```go func (m *StarTransaction) UnmarshalJSON(data []byte) error @@ -13353,7 +13353,7 @@ func (m *StarTransaction) UnmarshalJSON(data []byte) error UnmarshalJSON decodes StarTransaction by dispatching union\-typed fields \(Source, Receiver\) through their concrete UnmarshalXxx helpers. -## type StarTransactions +## type [StarTransactions]() Contains a list of Telegram Star transactions. @@ -13365,7 +13365,7 @@ type StarTransactions struct { ``` -### func GetStarTransactions +### func [GetStarTransactions]() ```go func GetStarTransactions(ctx context.Context, b *client.Bot, p *GetStarTransactionsParams) (*StarTransactions, error) @@ -13376,7 +13376,7 @@ GetStarTransactions calls the getStarTransactions Telegram Bot API method. Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object. -## type Sticker +## type [Sticker]() This object represents a sticker. @@ -13416,7 +13416,7 @@ type Sticker struct { ``` -### func GetCustomEmojiStickers +### func [GetCustomEmojiStickers]() ```go func GetCustomEmojiStickers(ctx context.Context, b *client.Bot, p *GetCustomEmojiStickersParams) ([]Sticker, error) @@ -13427,7 +13427,7 @@ GetCustomEmojiStickers calls the getCustomEmojiStickers Telegram Bot API method. Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects. -### func GetForumTopicIconStickers +### func [GetForumTopicIconStickers]() ```go func GetForumTopicIconStickers(ctx context.Context, b *client.Bot, p *GetForumTopicIconStickersParams) ([]Sticker, error) @@ -13438,7 +13438,7 @@ GetForumTopicIconStickers calls the getForumTopicIconStickers Telegram Bot API m Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects. -## type StickerSet +## type [StickerSet]() This object represents a sticker set. @@ -13458,7 +13458,7 @@ type StickerSet struct { ``` -### func GetStickerSet +### func [GetStickerSet]() ```go func GetStickerSet(ctx context.Context, b *client.Bot, p *GetStickerSetParams) (*StickerSet, error) @@ -13469,7 +13469,7 @@ GetStickerSet calls the getStickerSet Telegram Bot API method. Use this method to get a sticker set. On success, a StickerSet object is returned. -## type StickerType +## type [StickerType]() @@ -13488,7 +13488,7 @@ const ( ``` -## type StopMessageLiveLocationParams +## type [StopMessageLiveLocationParams]() StopMessageLiveLocationParams is the parameter set for StopMessageLiveLocation. @@ -13510,7 +13510,7 @@ type StopMessageLiveLocationParams struct { ``` -## type StopPollParams +## type [StopPollParams]() StopPollParams is the parameter set for StopPoll. @@ -13530,7 +13530,7 @@ type StopPollParams struct { ``` -## type Story +## type [Story]() This object represents a story. @@ -13544,7 +13544,7 @@ type Story struct { ``` -### func EditStory +### func [EditStory]() ```go func EditStory(ctx context.Context, b *client.Bot, p *EditStoryParams) (*Story, error) @@ -13555,7 +13555,7 @@ EditStory calls the editStory Telegram Bot API method. Edits a story previously posted by the bot on behalf of a managed business account. Requires the can\_manage\_stories business bot right. Returns Story on success. -### func PostStory +### func [PostStory]() ```go func PostStory(ctx context.Context, b *client.Bot, p *PostStoryParams) (*Story, error) @@ -13566,7 +13566,7 @@ PostStory calls the postStory Telegram Bot API method. Posts a story on behalf of a managed business account. Requires the can\_manage\_stories business bot right. Returns Story on success. -### func RepostStory +### func [RepostStory]() ```go func RepostStory(ctx context.Context, b *client.Bot, p *RepostStoryParams) (*Story, error) @@ -13577,7 +13577,7 @@ RepostStory calls the repostStory Telegram Bot API method. Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted \(or reposted\) by the bot. Requires the can\_manage\_stories business bot right for both business accounts. Returns Story on success. -## type StoryArea +## type [StoryArea]() Describes a clickable area on a story media. @@ -13591,7 +13591,7 @@ type StoryArea struct { ``` -### func \(\*StoryArea\) UnmarshalJSON +### func \(\*StoryArea\) [UnmarshalJSON]() ```go func (m *StoryArea) UnmarshalJSON(data []byte) error @@ -13600,7 +13600,7 @@ func (m *StoryArea) UnmarshalJSON(data []byte) error UnmarshalJSON decodes StoryArea by dispatching union\-typed fields \(Type\) through their concrete UnmarshalXxx helpers. -## type StoryAreaPosition +## type [StoryAreaPosition]() Describes the position of a clickable area within a story. @@ -13622,7 +13622,7 @@ type StoryAreaPosition struct { ``` -## type StoryAreaType +## type [StoryAreaType]() StoryAreaType is a union type. The following concrete variants implement it: @@ -13641,7 +13641,7 @@ type StoryAreaType interface { ``` -### func UnmarshalStoryAreaType +### func [UnmarshalStoryAreaType]() ```go func UnmarshalStoryAreaType(data []byte) (StoryAreaType, error) @@ -13650,7 +13650,7 @@ func UnmarshalStoryAreaType(data []byte) (StoryAreaType, error) UnmarshalStoryAreaType decodes a StoryAreaType from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type StoryAreaTypeLink +## type [StoryAreaTypeLink]() Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas. @@ -13664,7 +13664,7 @@ type StoryAreaTypeLink struct { ``` -## type StoryAreaTypeLinkType +## type [StoryAreaTypeLinkType]() @@ -13681,7 +13681,7 @@ const ( ``` -## type StoryAreaTypeLocation +## type [StoryAreaTypeLocation]() Describes a story area pointing to a location. Currently, a story can have up to 10 location areas. @@ -13699,7 +13699,7 @@ type StoryAreaTypeLocation struct { ``` -## type StoryAreaTypeLocationType +## type [StoryAreaTypeLocationType]() @@ -13716,7 +13716,7 @@ const ( ``` -## type StoryAreaTypeSuggestedReaction +## type [StoryAreaTypeSuggestedReaction]() Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas. @@ -13734,7 +13734,7 @@ type StoryAreaTypeSuggestedReaction struct { ``` -### func \(\*StoryAreaTypeSuggestedReaction\) UnmarshalJSON +### func \(\*StoryAreaTypeSuggestedReaction\) [UnmarshalJSON]() ```go func (m *StoryAreaTypeSuggestedReaction) UnmarshalJSON(data []byte) error @@ -13743,7 +13743,7 @@ func (m *StoryAreaTypeSuggestedReaction) UnmarshalJSON(data []byte) error UnmarshalJSON decodes StoryAreaTypeSuggestedReaction by dispatching union\-typed fields \(ReactionType\) through their concrete UnmarshalXxx helpers. -## type StoryAreaTypeSuggestedReactionType +## type [StoryAreaTypeSuggestedReactionType]() @@ -13760,7 +13760,7 @@ const ( ``` -## type StoryAreaTypeUniqueGift +## type [StoryAreaTypeUniqueGift]() Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area. @@ -13774,7 +13774,7 @@ type StoryAreaTypeUniqueGift struct { ``` -## type StoryAreaTypeUniqueGiftType +## type [StoryAreaTypeUniqueGiftType]() @@ -13791,7 +13791,7 @@ const ( ``` -## type StoryAreaTypeWeather +## type [StoryAreaTypeWeather]() Describes a story area containing weather information. Currently, a story can have up to 3 weather areas. @@ -13809,7 +13809,7 @@ type StoryAreaTypeWeather struct { ``` -## type StoryAreaTypeWeatherType +## type [StoryAreaTypeWeatherType]() @@ -13826,7 +13826,7 @@ const ( ``` -## type SuccessfulPayment +## type [SuccessfulPayment]() This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control. @@ -13856,7 +13856,7 @@ type SuccessfulPayment struct { ``` -## type SuggestedPostApprovalFailed +## type [SuggestedPostApprovalFailed]() Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval. @@ -13870,7 +13870,7 @@ type SuggestedPostApprovalFailed struct { ``` -## type SuggestedPostApproved +## type [SuggestedPostApproved]() Describes a service message about the approval of a suggested post. @@ -13886,7 +13886,7 @@ type SuggestedPostApproved struct { ``` -## type SuggestedPostDeclined +## type [SuggestedPostDeclined]() Describes a service message about the rejection of a suggested post. @@ -13900,7 +13900,7 @@ type SuggestedPostDeclined struct { ``` -## type SuggestedPostInfo +## type [SuggestedPostInfo]() Contains information about a suggested post. @@ -13916,7 +13916,7 @@ type SuggestedPostInfo struct { ``` -## type SuggestedPostInfoState +## type [SuggestedPostInfoState]() @@ -13935,7 +13935,7 @@ const ( ``` -## type SuggestedPostPaid +## type [SuggestedPostPaid]() Describes a service message about a successful payment for a suggested post. @@ -13953,7 +13953,7 @@ type SuggestedPostPaid struct { ``` -## type SuggestedPostPaidCurrency +## type [SuggestedPostPaidCurrency]() @@ -13971,7 +13971,7 @@ const ( ``` -## type SuggestedPostParameters +## type [SuggestedPostParameters]() Contains parameters of a post that is being suggested by the bot. @@ -13985,7 +13985,7 @@ type SuggestedPostParameters struct { ``` -## type SuggestedPostPrice +## type [SuggestedPostPrice]() Describes the price of a suggested post. @@ -13999,7 +13999,7 @@ type SuggestedPostPrice struct { ``` -## type SuggestedPostRefunded +## type [SuggestedPostRefunded]() Describes a service message about a payment refund for a suggested post. @@ -14013,7 +14013,7 @@ type SuggestedPostRefunded struct { ``` -## type SuggestedPostRefundedReason +## type [SuggestedPostRefundedReason]() @@ -14031,7 +14031,7 @@ const ( ``` -## type SwitchInlineQueryChosenChat +## type [SwitchInlineQueryChosenChat]() This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. @@ -14051,7 +14051,7 @@ type SwitchInlineQueryChosenChat struct { ``` -## type TextQuote +## type [TextQuote]() This object contains information about the quoted part of a message that is replied to by the given message. @@ -14069,7 +14069,7 @@ type TextQuote struct { ``` -## type TransactionPartner +## type [TransactionPartner]() TransactionPartner is a union type. The following concrete variants implement it: @@ -14090,7 +14090,7 @@ type TransactionPartner interface { ``` -### func UnmarshalTransactionPartner +### func [UnmarshalTransactionPartner]() ```go func UnmarshalTransactionPartner(data []byte) (TransactionPartner, error) @@ -14099,7 +14099,7 @@ func UnmarshalTransactionPartner(data []byte) (TransactionPartner, error) UnmarshalTransactionPartner decodes a TransactionPartner from JSON by inspecting the "type" field and dispatching to the correct concrete type. -## type TransactionPartnerAffiliateProgram +## type [TransactionPartnerAffiliateProgram]() Describes the affiliate program that issued the affiliate commission received via this transaction. @@ -14115,7 +14115,7 @@ type TransactionPartnerAffiliateProgram struct { ``` -## type TransactionPartnerAffiliateProgramType +## type [TransactionPartnerAffiliateProgramType]() @@ -14132,7 +14132,7 @@ const ( ``` -## type TransactionPartnerChat +## type [TransactionPartnerChat]() Describes a transaction with a chat. @@ -14148,7 +14148,7 @@ type TransactionPartnerChat struct { ``` -## type TransactionPartnerFragment +## type [TransactionPartnerFragment]() Describes a withdrawal transaction with Fragment. @@ -14162,7 +14162,7 @@ type TransactionPartnerFragment struct { ``` -### func \(\*TransactionPartnerFragment\) UnmarshalJSON +### func \(\*TransactionPartnerFragment\) [UnmarshalJSON]() ```go func (m *TransactionPartnerFragment) UnmarshalJSON(data []byte) error @@ -14171,7 +14171,7 @@ func (m *TransactionPartnerFragment) UnmarshalJSON(data []byte) error UnmarshalJSON decodes TransactionPartnerFragment by dispatching union\-typed fields \(WithdrawalState\) through their concrete UnmarshalXxx helpers. -## type TransactionPartnerFragmentType +## type [TransactionPartnerFragmentType]() @@ -14188,7 +14188,7 @@ const ( ``` -## type TransactionPartnerOther +## type [TransactionPartnerOther]() Describes a transaction with an unknown source or recipient. @@ -14200,7 +14200,7 @@ type TransactionPartnerOther struct { ``` -## type TransactionPartnerOtherType +## type [TransactionPartnerOtherType]() @@ -14217,7 +14217,7 @@ const ( ``` -## type TransactionPartnerTelegramAds +## type [TransactionPartnerTelegramAds]() Describes a withdrawal transaction to the Telegram Ads platform. @@ -14229,7 +14229,7 @@ type TransactionPartnerTelegramAds struct { ``` -## type TransactionPartnerTelegramAdsType +## type [TransactionPartnerTelegramAdsType]() @@ -14246,7 +14246,7 @@ const ( ``` -## type TransactionPartnerTelegramApi +## type [TransactionPartnerTelegramApi]() Describes a transaction with payment for paid broadcasting. @@ -14260,7 +14260,7 @@ type TransactionPartnerTelegramApi struct { ``` -## type TransactionPartnerTelegramApiType +## type [TransactionPartnerTelegramApiType]() @@ -14277,7 +14277,7 @@ const ( ``` -## type TransactionPartnerUser +## type [TransactionPartnerUser]() Describes a transaction with a user. @@ -14307,7 +14307,7 @@ type TransactionPartnerUser struct { ``` -### func \(\*TransactionPartnerUser\) UnmarshalJSON +### func \(\*TransactionPartnerUser\) [UnmarshalJSON]() ```go func (m *TransactionPartnerUser) UnmarshalJSON(data []byte) error @@ -14316,7 +14316,7 @@ func (m *TransactionPartnerUser) UnmarshalJSON(data []byte) error UnmarshalJSON decodes TransactionPartnerUser by dispatching union\-typed fields \(PaidMedia\) through their concrete UnmarshalXxx helpers. -## type TransactionPartnerUserTransactionType +## type [TransactionPartnerUserTransactionType]() @@ -14337,7 +14337,7 @@ const ( ``` -## type TransferBusinessAccountStarsParams +## type [TransferBusinessAccountStarsParams]() TransferBusinessAccountStarsParams is the parameter set for TransferBusinessAccountStars. @@ -14353,7 +14353,7 @@ type TransferBusinessAccountStarsParams struct { ``` -## type TransferGiftParams +## type [TransferGiftParams]() TransferGiftParams is the parameter set for TransferGift. @@ -14373,7 +14373,7 @@ type TransferGiftParams struct { ``` -## type UnbanChatMemberParams +## type [UnbanChatMemberParams]() UnbanChatMemberParams is the parameter set for UnbanChatMember. @@ -14391,7 +14391,7 @@ type UnbanChatMemberParams struct { ``` -## type UnbanChatSenderChatParams +## type [UnbanChatSenderChatParams]() UnbanChatSenderChatParams is the parameter set for UnbanChatSenderChat. @@ -14407,7 +14407,7 @@ type UnbanChatSenderChatParams struct { ``` -## type UnhideGeneralForumTopicParams +## type [UnhideGeneralForumTopicParams]() UnhideGeneralForumTopicParams is the parameter set for UnhideGeneralForumTopic. @@ -14421,7 +14421,7 @@ type UnhideGeneralForumTopicParams struct { ``` -## type UniqueGift +## type [UniqueGift]() This object describes a unique gift that was upgraded from a regular gift. @@ -14455,7 +14455,7 @@ type UniqueGift struct { ``` -## type UniqueGiftBackdrop +## type [UniqueGiftBackdrop]() This object describes the backdrop of a unique gift. @@ -14471,7 +14471,7 @@ type UniqueGiftBackdrop struct { ``` -## type UniqueGiftBackdropColors +## type [UniqueGiftBackdropColors]() This object describes the colors of the backdrop of a unique gift. @@ -14489,7 +14489,7 @@ type UniqueGiftBackdropColors struct { ``` -## type UniqueGiftColors +## type [UniqueGiftColors]() This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift. @@ -14511,7 +14511,7 @@ type UniqueGiftColors struct { ``` -## type UniqueGiftInfo +## type [UniqueGiftInfo]() Describes a service message about a unique gift that was sent or received. @@ -14535,7 +14535,7 @@ type UniqueGiftInfo struct { ``` -## type UniqueGiftInfoOrigin +## type [UniqueGiftInfoOrigin]() @@ -14556,7 +14556,7 @@ const ( ``` -## type UniqueGiftModel +## type [UniqueGiftModel]() This object describes the model of a unique gift. @@ -14574,7 +14574,7 @@ type UniqueGiftModel struct { ``` -## type UniqueGiftModelRarity +## type [UniqueGiftModelRarity]() @@ -14594,7 +14594,7 @@ const ( ``` -## type UniqueGiftSymbol +## type [UniqueGiftSymbol]() This object describes the symbol shown on the pattern of a unique gift. @@ -14610,7 +14610,7 @@ type UniqueGiftSymbol struct { ``` -## type UnpinAllChatMessagesParams +## type [UnpinAllChatMessagesParams]() UnpinAllChatMessagesParams is the parameter set for UnpinAllChatMessages. @@ -14624,7 +14624,7 @@ type UnpinAllChatMessagesParams struct { ``` -## type UnpinAllForumTopicMessagesParams +## type [UnpinAllForumTopicMessagesParams]() UnpinAllForumTopicMessagesParams is the parameter set for UnpinAllForumTopicMessages. @@ -14640,7 +14640,7 @@ type UnpinAllForumTopicMessagesParams struct { ``` -## type UnpinAllGeneralForumTopicMessagesParams +## type [UnpinAllGeneralForumTopicMessagesParams]() UnpinAllGeneralForumTopicMessagesParams is the parameter set for UnpinAllGeneralForumTopicMessages. @@ -14654,7 +14654,7 @@ type UnpinAllGeneralForumTopicMessagesParams struct { ``` -## type UnpinChatMessageParams +## type [UnpinChatMessageParams]() UnpinChatMessageParams is the parameter set for UnpinChatMessage. @@ -14672,7 +14672,7 @@ type UnpinChatMessageParams struct { ``` -## type Update +## type [Update]() This object represents an incoming update.At most one of the optional fields can be present in any given update. @@ -14734,7 +14734,7 @@ type Update struct { ``` -### func GetUpdates +### func [GetUpdates]() ```go func GetUpdates(ctx context.Context, b *client.Bot, p *GetUpdatesParams) ([]Update, error) @@ -14745,7 +14745,7 @@ GetUpdates calls the getUpdates Telegram Bot API method. Use this method to receive incoming updates using long polling \(wiki\). Returns an Array of Update objects. Notes1. This method will not work if an outgoing webhook is set up.2. In order to avoid getting duplicate updates, recalculate offset after each server response. -## type UpdateType +## type [UpdateType]() UpdateType identifies an Update payload variant. Used by allowed\_updates in getUpdates / setWebhook. The Telegram docs do not enumerate these values inline \(they are derived from the optional fields of Update\), so the codegen pipeline cannot synthesise this enum and it lives here as a hand\-curated companion to the generated enums.gen.go. @@ -14784,7 +14784,7 @@ const ( ``` -## type UpgradeGiftParams +## type [UpgradeGiftParams]() UpgradeGiftParams is the parameter set for UpgradeGift. @@ -14804,7 +14804,7 @@ type UpgradeGiftParams struct { ``` -## type UploadStickerFileParams +## type [UploadStickerFileParams]() UploadStickerFileParams is the parameter set for UploadStickerFile. @@ -14822,7 +14822,7 @@ type UploadStickerFileParams struct { ``` -### func \(\*UploadStickerFileParams\) HasFile +### func \(\*UploadStickerFileParams\) [HasFile]() ```go func (p *UploadStickerFileParams) HasFile() bool @@ -14831,7 +14831,7 @@ func (p *UploadStickerFileParams) HasFile() bool HasFile reports whether a multipart upload is required. -### func \(\*UploadStickerFileParams\) MultipartFields +### func \(\*UploadStickerFileParams\) [MultipartFields]() ```go func (p *UploadStickerFileParams) MultipartFields() map[string]string @@ -14840,7 +14840,7 @@ func (p *UploadStickerFileParams) MultipartFields() map[string]string MultipartFields returns the non\-file fields used in the multipart body. -### func \(\*UploadStickerFileParams\) MultipartFiles +### func \(\*UploadStickerFileParams\) [MultipartFiles]() ```go func (p *UploadStickerFileParams) MultipartFiles() []client.MultipartFile @@ -14849,7 +14849,7 @@ func (p *UploadStickerFileParams) MultipartFiles() []client.MultipartFile MultipartFiles returns the file parts. -## type User +## type [User]() This object represents a Telegram user or bot. @@ -14893,7 +14893,7 @@ type User struct { ``` -### func GetMe +### func [GetMe]() ```go func GetMe(ctx context.Context, b *client.Bot, p *GetMeParams) (*User, error) @@ -14904,7 +14904,7 @@ GetMe calls the getMe Telegram Bot API method. A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object. -## type UserChatBoosts +## type [UserChatBoosts]() This object represents a list of boosts added to a chat by a user. @@ -14916,7 +14916,7 @@ type UserChatBoosts struct { ``` -### func GetUserChatBoosts +### func [GetUserChatBoosts]() ```go func GetUserChatBoosts(ctx context.Context, b *client.Bot, p *GetUserChatBoostsParams) (*UserChatBoosts, error) @@ -14927,7 +14927,7 @@ GetUserChatBoosts calls the getUserChatBoosts Telegram Bot API method. Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object. -## type UserProfileAudios +## type [UserProfileAudios]() This object represents the audios displayed on a user's profile. @@ -14941,7 +14941,7 @@ type UserProfileAudios struct { ``` -### func GetUserProfileAudios +### func [GetUserProfileAudios]() ```go func GetUserProfileAudios(ctx context.Context, b *client.Bot, p *GetUserProfileAudiosParams) (*UserProfileAudios, error) @@ -14952,7 +14952,7 @@ GetUserProfileAudios calls the getUserProfileAudios Telegram Bot API method. Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object. -## type UserProfilePhotos +## type [UserProfilePhotos]() This object represent a user's profile pictures. @@ -14966,7 +14966,7 @@ type UserProfilePhotos struct { ``` -### func GetUserProfilePhotos +### func [GetUserProfilePhotos]() ```go func GetUserProfilePhotos(ctx context.Context, b *client.Bot, p *GetUserProfilePhotosParams) (*UserProfilePhotos, error) @@ -14977,7 +14977,7 @@ GetUserProfilePhotos calls the getUserProfilePhotos Telegram Bot API method. Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object. -## type UserRating +## type [UserRating]() This object describes the rating of a user based on their Telegram Star spendings. @@ -14995,7 +14995,7 @@ type UserRating struct { ``` -## type UsersShared +## type [UsersShared]() This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. @@ -15009,7 +15009,7 @@ type UsersShared struct { ``` -## type Venue +## type [Venue]() This object represents a venue. @@ -15033,7 +15033,7 @@ type Venue struct { ``` -## type VerifyChatParams +## type [VerifyChatParams]() VerifyChatParams is the parameter set for VerifyChat. @@ -15049,7 +15049,7 @@ type VerifyChatParams struct { ``` -## type VerifyUserParams +## type [VerifyUserParams]() VerifyUserParams is the parameter set for VerifyUser. @@ -15065,7 +15065,7 @@ type VerifyUserParams struct { ``` -## type Video +## type [Video]() This object represents a video file. @@ -15099,7 +15099,7 @@ type Video struct { ``` -## type VideoChatEnded +## type [VideoChatEnded]() This object represents a service message about a video chat ended in the chat. @@ -15111,7 +15111,7 @@ type VideoChatEnded struct { ``` -## type VideoChatParticipantsInvited +## type [VideoChatParticipantsInvited]() This object represents a service message about new members invited to a video chat. @@ -15123,7 +15123,7 @@ type VideoChatParticipantsInvited struct { ``` -## type VideoChatScheduled +## type [VideoChatScheduled]() This object represents a service message about a video chat scheduled in the chat. @@ -15135,7 +15135,7 @@ type VideoChatScheduled struct { ``` -## type VideoChatStarted +## type [VideoChatStarted]() This object represents a service message about a video chat started in the chat. Currently holds no information. @@ -15145,7 +15145,7 @@ type VideoChatStarted struct { ``` -## type VideoNote +## type [VideoNote]() This object represents a video message \(available in Telegram apps as of v.4.0\). @@ -15167,7 +15167,7 @@ type VideoNote struct { ``` -## type VideoQuality +## type [VideoQuality]() This object represents a video file of a specific quality. @@ -15189,7 +15189,7 @@ type VideoQuality struct { ``` -## type Voice +## type [Voice]() This object represents a voice note. @@ -15209,7 +15209,7 @@ type Voice struct { ``` -## type WebAppData +## type [WebAppData]() Describes data sent from a Web App to the bot. @@ -15223,7 +15223,7 @@ type WebAppData struct { ``` -## type WebAppInfo +## type [WebAppInfo]() Describes a Web App. @@ -15235,7 +15235,7 @@ type WebAppInfo struct { ``` -## type WebhookInfo +## type [WebhookInfo]() Describes the current status of a webhook. @@ -15263,7 +15263,7 @@ type WebhookInfo struct { ``` -### func GetWebhookInfo +### func [GetWebhookInfo]() ```go func GetWebhookInfo(ctx context.Context, b *client.Bot, p *GetWebhookInfoParams) (*WebhookInfo, error) @@ -15274,7 +15274,7 @@ GetWebhookInfo calls the getWebhookInfo Telegram Bot API method. Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty. -## type WriteAccessAllowed +## type [WriteAccessAllowed]() This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. diff --git a/docs/reference/client.md b/docs/reference/client.md index ec81878..4d739ff 100644 --- a/docs/reference/client.md +++ b/docs/reference/client.md @@ -80,7 +80,7 @@ var ( ``` -## func Call +## func [Call]() ```go func Call[Req any, Resp any](ctx context.Context, b *Bot, method string, req Req) (Resp, error) @@ -93,7 +93,7 @@ It is generic over both request and response types. Methods with no parameters m Call is exported because the api package \(which lives outside this one\) invokes it from generated method wrappers. User code should not normally call it directly — use the typed wrappers in package api instead. -## func CallRaw +## func [CallRaw]() ```go func CallRaw[Req any](ctx context.Context, b *Bot, method string, req Req) (json.RawMessage, error) @@ -104,7 +104,7 @@ CallRaw is like Call but returns the raw JSON of the result field instead of dec CallRaw still translates non\-OK responses into \*APIError just like Call. -## func NewDefaultHTTPDoer +## func [NewDefaultHTTPDoer]() ```go func NewDefaultHTTPDoer() *http.Client @@ -117,7 +117,7 @@ NewDefaultHTTPDoer returns an \*http.Client with sensible defaults for Telegram - HTTP/2 enabled \(default in net/http\). -## type APIError +## type [APIError]() APIError represents a non\-OK Telegram Bot API response. It satisfies error and unwraps to a sentinel \(ErrUnauthorized, etc.\) where the description matches a known prefix, enabling errors.Is checks. @@ -131,7 +131,7 @@ type APIError struct { ``` -### func \(\*APIError\) Error +### func \(\*APIError\) [Error]() ```go func (e *APIError) Error() string @@ -140,7 +140,7 @@ func (e *APIError) Error() string Error implements error. -### func \(\*APIError\) IsRetryable +### func \(\*APIError\) [IsRetryable]() ```go func (e *APIError) IsRetryable() bool @@ -149,7 +149,7 @@ func (e *APIError) IsRetryable() bool IsRetryable returns true for transient HTTP statuses \(429, 5xx\). -### func \(\*APIError\) RetryAfter +### func \(\*APIError\) [RetryAfter]() ```go func (e *APIError) RetryAfter() time.Duration @@ -158,7 +158,7 @@ func (e *APIError) RetryAfter() time.Duration RetryAfter returns the recommended back\-off duration. It honours the Telegram\-supplied retry\_after parameter; if absent, returns 0. -### func \(\*APIError\) Unwrap +### func \(\*APIError\) [Unwrap]() ```go func (e *APIError) Unwrap() error @@ -167,7 +167,7 @@ func (e *APIError) Unwrap() error Unwrap returns the matched sentinel error, if any. -## type Bot +## type [Bot]() Bot is the Telegram Bot API client. Construct via New. All API methods \(declared in package api\) hang off \*Bot via thin wrappers around call. @@ -178,7 +178,7 @@ type Bot struct { ``` -### func New +### func [New]() ```go func New(token string, opts ...Option) *Bot @@ -187,7 +187,7 @@ func New(token string, opts ...Option) *Bot New constructs a Bot with the given token and optional configuration. The default HTTP client is tuned for long\-poll workloads \(see NewDefaultHTTPDoer\); the default codec wraps encoding/json; the default logger discards records. -### func \(\*Bot\) BaseURL +### func \(\*Bot\) [BaseURL]() ```go func (b *Bot) BaseURL() string @@ -196,7 +196,7 @@ func (b *Bot) BaseURL() string BaseURL returns the configured Telegram API base URL. -### func \(\*Bot\) Codec +### func \(\*Bot\) [Codec]() ```go func (b *Bot) Codec() Codec @@ -205,7 +205,7 @@ func (b *Bot) Codec() Codec Codec returns the configured Codec. -### func \(\*Bot\) HTTP +### func \(\*Bot\) [HTTP]() ```go func (b *Bot) HTTP() HTTPDoer @@ -214,7 +214,7 @@ func (b *Bot) HTTP() HTTPDoer HTTP returns the underlying HTTPDoer. Exposed for adapters that need to share connection pools or for diagnostic checks. -### func \(\*Bot\) Logger +### func \(\*Bot\) [Logger]() ```go func (b *Bot) Logger() Logger @@ -223,7 +223,7 @@ func (b *Bot) Logger() Logger Logger returns the configured Logger. -### func \(\*Bot\) Token +### func \(\*Bot\) [Token]() ```go func (b *Bot) Token() string @@ -232,7 +232,7 @@ func (b *Bot) Token() string Token returns the bot token. Exposed for advanced use cases \(custom transports, manual URL building\); ordinary code does not need it. -## type Codec +## type [Codec]() Codec encodes/decodes JSON payloads exchanged with the Telegram Bot API. The default implementation wraps goccy/go\-json. Users may plug in bytedance/sonic or any compatible encoder by passing WithCodec to New. @@ -244,7 +244,7 @@ type Codec interface { ``` -## type DefaultCodec +## type [DefaultCodec]() DefaultCodec wraps goccy/go\-json. It is the zero\-value safe default. @@ -253,7 +253,7 @@ type DefaultCodec struct{} ``` -### func \(DefaultCodec\) Marshal +### func \(DefaultCodec\) [Marshal]() ```go func (DefaultCodec) Marshal(v any) ([]byte, error) @@ -262,7 +262,7 @@ func (DefaultCodec) Marshal(v any) ([]byte, error) Marshal calls json.Marshal. -### func \(DefaultCodec\) Unmarshal +### func \(DefaultCodec\) [Unmarshal]() ```go func (DefaultCodec) Unmarshal(data []byte, v any) error @@ -271,7 +271,7 @@ func (DefaultCodec) Unmarshal(data []byte, v any) error Unmarshal calls json.Unmarshal. -## type HTTPDoer +## type [HTTPDoer]() HTTPDoer abstracts the HTTP transport. The default is a net/http client tuned for Telegram's long\-poll usage. Users may plug in valyala/fasthttp \(via an adapter\), or any custom retry/circuit\-breaker client by passing WithHTTPClient to New. @@ -282,7 +282,7 @@ type HTTPDoer interface { ``` -## type Logger +## type [Logger]() Logger is a slog\-shaped logging interface. Users pass any compatible implementation via WithLogger. The default is NoopLogger, which discards everything. @@ -296,7 +296,7 @@ type Logger interface { ``` -## type MultipartFile +## type [MultipartFile]() MultipartFile describes a single file part in a multipart upload. @@ -309,7 +309,7 @@ type MultipartFile struct { ``` -## type NetworkError +## type [NetworkError]() NetworkError wraps a transport\-level failure \(DNS, TCP, TLS, timeout short of an HTTP response\). @@ -318,7 +318,7 @@ type NetworkError struct{ Err error } ``` -### func \(\*NetworkError\) Error +### func \(\*NetworkError\) [Error]() ```go func (e *NetworkError) Error() string @@ -327,7 +327,7 @@ func (e *NetworkError) Error() string -### func \(\*NetworkError\) Unwrap +### func \(\*NetworkError\) [Unwrap]() ```go func (e *NetworkError) Unwrap() error @@ -336,7 +336,7 @@ func (e *NetworkError) Unwrap() error -## type NoopLogger +## type [NoopLogger]() NoopLogger discards all log records. It is the zero\-value safe default. @@ -345,7 +345,7 @@ type NoopLogger struct{} ``` -### func \(NoopLogger\) Debug +### func \(NoopLogger\) [Debug]() ```go func (NoopLogger) Debug(string, ...any) @@ -354,7 +354,7 @@ func (NoopLogger) Debug(string, ...any) -### func \(NoopLogger\) Error +### func \(NoopLogger\) [Error]() ```go func (NoopLogger) Error(string, ...any) @@ -363,7 +363,7 @@ func (NoopLogger) Error(string, ...any) -### func \(NoopLogger\) Info +### func \(NoopLogger\) [Info]() ```go func (NoopLogger) Info(string, ...any) @@ -372,7 +372,7 @@ func (NoopLogger) Info(string, ...any) -### func \(NoopLogger\) Warn +### func \(NoopLogger\) [Warn]() ```go func (NoopLogger) Warn(string, ...any) @@ -381,7 +381,7 @@ func (NoopLogger) Warn(string, ...any) -## type Option +## type [Option]() Option configures a Bot at construction time. Per\-call configuration is expressed via typed parameter structs \(e.g. SendMessageParams\), not options. @@ -390,7 +390,7 @@ type Option func(*Bot) ``` -### func WithBaseURL +### func [WithBaseURL]() ```go func WithBaseURL(url string) Option @@ -399,7 +399,7 @@ func WithBaseURL(url string) Option WithBaseURL overrides the API base URL. Useful for testing against a local httptest.Server, or for self\-hosted Bot API servers. -### func WithCodec +### func [WithCodec]() ```go func WithCodec(c Codec) Option @@ -408,7 +408,7 @@ func WithCodec(c Codec) Option WithCodec overrides the JSON codec. Pass goccy/go\-json, sonic, or any type implementing Codec to swap out encoding/json. -### func WithHTTPClient +### func [WithHTTPClient]() ```go func WithHTTPClient(c HTTPDoer) Option @@ -417,7 +417,7 @@ func WithHTTPClient(c HTTPDoer) Option WithHTTPClient overrides the HTTP transport. Pass any HTTPDoer implementation \(e.g. an \*http.Client wrapping a custom RoundTripper, or a fasthttp adapter\). -### func WithLogger +### func [WithLogger]() ```go func WithLogger(l Logger) Option @@ -426,7 +426,7 @@ func WithLogger(l Logger) Option WithLogger sets the logger used for diagnostic events. Passing nil silently disables logging. -## type ParseError +## type [ParseError]() ParseError wraps a JSON decode failure on a response body. Body is retained \(truncated to 4 KiB\); Error\(\) displays up to 256 bytes for diagnostics. @@ -438,7 +438,7 @@ type ParseError struct { ``` -### func \(\*ParseError\) Error +### func \(\*ParseError\) [Error]() ```go func (e *ParseError) Error() string @@ -447,7 +447,7 @@ func (e *ParseError) Error() string -### func \(\*ParseError\) Unwrap +### func \(\*ParseError\) [Unwrap]() ```go func (e *ParseError) Unwrap() error @@ -456,7 +456,7 @@ func (e *ParseError) Unwrap() error -## type ResponseParameters +## type [ResponseParameters]() ResponseParameters is the optional metadata Telegram includes on certain failures. The most common is RetryAfter \(seconds\) on 429 responses. @@ -470,7 +470,7 @@ type ResponseParameters struct { ``` -## type Result +## type [Result]() Result is the universal Telegram API response envelope. Every successful response is shaped \{"ok":true,"result":T,...\}; failure responses set ok to false and populate ErrorCode / Description / Parameters. @@ -487,7 +487,7 @@ type Result[T any] struct { ``` -## type RetryDoer +## type [RetryDoer]() RetryDoer is an HTTPDoer that retries transient failures \(429, 5xx, and network errors\) with exponential backoff. It honours the retry\_after value Telegram supplies on rate\-limit responses. @@ -505,7 +505,7 @@ type RetryDoer struct { ``` -### func NewRetryDoer +### func [NewRetryDoer]() ```go func NewRetryDoer(inner HTTPDoer, opts ...RetryOption) *RetryDoer @@ -514,7 +514,7 @@ func NewRetryDoer(inner HTTPDoer, opts ...RetryOption) *RetryDoer NewRetryDoer wraps inner with retry behaviour. -### func \(\*RetryDoer\) Do +### func \(\*RetryDoer\) [Do]() ```go func (d *RetryDoer) Do(req *http.Request) (*http.Response, error) @@ -523,7 +523,7 @@ func (d *RetryDoer) Do(req *http.Request) (*http.Response, error) Do dispatches via the inner HTTPDoer and retries on transient failures. The request body is buffered on first attempt so it can be replayed. -## type RetryOption +## type [RetryOption]() RetryOption configures a RetryDoer. @@ -532,7 +532,7 @@ type RetryOption func(*RetryDoer) ``` -### func WithBackoffFactor +### func [WithBackoffFactor]() ```go func WithBackoffFactor(f float64) RetryOption @@ -541,7 +541,7 @@ func WithBackoffFactor(f float64) RetryOption WithBackoffFactor sets the exponential growth factor. Default 2.0. -### func WithBaseBackoff +### func [WithBaseBackoff]() ```go func WithBaseBackoff(d time.Duration) RetryOption @@ -550,7 +550,7 @@ func WithBaseBackoff(d time.Duration) RetryOption WithBaseBackoff sets the initial backoff duration. Default 500ms. -### func WithJitter +### func [WithJitter]() ```go func WithJitter(j float64) RetryOption @@ -559,7 +559,7 @@ func WithJitter(j float64) RetryOption WithJitter sets the jitter fraction \(0..1\) applied to each backoff. Default 0.2. -### func WithMaxAttempts +### func [WithMaxAttempts]() ```go func WithMaxAttempts(n int) RetryOption @@ -568,7 +568,7 @@ func WithMaxAttempts(n int) RetryOption WithMaxAttempts sets the maximum number of attempts \(including the initial one\). Default 4 \(one initial \+ three retries\). -### func WithMaxBackoff +### func [WithMaxBackoff]() ```go func WithMaxBackoff(d time.Duration) RetryOption diff --git a/docs/reference/dispatch.md b/docs/reference/dispatch.md index 4a6d142..d627dc2 100644 --- a/docs/reference/dispatch.md +++ b/docs/reference/dispatch.md @@ -90,7 +90,7 @@ var ErrEndGroups = errors.New("dispatch: end groups") ``` -## type Context +## type [Context]() Context bundles the per\-update state every handler receives. @@ -118,7 +118,7 @@ type Context struct { ``` -### func NewContext +### func [NewContext]() ```go func NewContext(ctx context.Context, b *client.Bot, u *api.Update) *Context @@ -127,7 +127,7 @@ func NewContext(ctx context.Context, b *client.Bot, u *api.Update) *Context NewContext constructs a Context. Used by Router internally; exposed for custom test harnesses. -## type Filter +## type [Filter]() Filter is a predicate over a typed payload \(e.g. \*api.Message\). Filters compose via And/Or/Not for multi\-condition matching. @@ -142,7 +142,7 @@ type Filter[T any] func(payload T) bool ``` -### func All +### func [All]() ```go func All[T any](filters ...Filter[T]) Filter[T] @@ -151,7 +151,7 @@ func All[T any](filters ...Filter[T]) Filter[T] All combines filters with AND. Returns a Filter that matches when all match. Returns a filter that always matches when filters is empty. -### func Any +### func [Any]() ```go func Any[T any](filters ...Filter[T]) Filter[T] @@ -160,7 +160,7 @@ func Any[T any](filters ...Filter[T]) Filter[T] Any combines filters with OR. Returns a Filter that matches when at least one matches. Returns a filter that never matches when filters is empty. -### func \(Filter\[T\]\) And +### func \(Filter\[T\]\) [And]() ```go func (f Filter[T]) And(others ...Filter[T]) Filter[T] @@ -169,7 +169,7 @@ func (f Filter[T]) And(others ...Filter[T]) Filter[T] And returns a Filter that matches iff f and every one of others matches. -### func \(Filter\[T\]\) Not +### func \(Filter\[T\]\) [Not]() ```go func (f Filter[T]) Not() Filter[T] @@ -178,7 +178,7 @@ func (f Filter[T]) Not() Filter[T] Not returns a Filter that inverts f. -### func \(Filter\[T\]\) Or +### func \(Filter\[T\]\) [Or]() ```go func (f Filter[T]) Or(others ...Filter[T]) Filter[T] @@ -187,7 +187,7 @@ func (f Filter[T]) Or(others ...Filter[T]) Filter[T] Or returns a Filter that matches iff f matches OR any of others matches. -## type Handler +## type [Handler]() Handler is a generic handler over update payload type T. T is typically \*api.Message, \*api.CallbackQuery, \*api.InlineQuery, or \*api.Update for global middleware. @@ -196,7 +196,7 @@ type Handler[T any] func(ctx *Context, payload T) error ``` -## type Middleware +## type [Middleware]() Middleware wraps a Handler\[T\] with cross\-cutting behaviour \(logging, recovery, auth\). Middleware composition is left\-to\-right: Use\(a,b,c\) runs as a\(b\(c\(handler\)\)\). @@ -205,7 +205,7 @@ type Middleware[T any] func(Handler[T]) Handler[T] ``` -### func Chain +### func [Chain]() ```go func Chain[T any](mws ...Middleware[T]) Middleware[T] @@ -214,7 +214,7 @@ func Chain[T any](mws ...Middleware[T]) Middleware[T] Chain composes a slice of middleware into a single Middleware\[T\]. -### func Recovery +### func [Recovery]() ```go func Recovery() Middleware[*api.Update] @@ -223,7 +223,7 @@ func Recovery() Middleware[*api.Update] Recovery returns middleware that recovers from panics in downstream handlers, converting them into a returned error and logging via the bot's configured logger. Registered automatically by NewRouter. -## type NamedHandlers +## type [NamedHandlers]() NamedHandlers manages handlers by string name, allowing runtime registration, replacement, and removal. This complements the Router's registration methods: each registration via Named\*\(\) also gets a name for later lookup. @@ -236,7 +236,7 @@ type NamedHandlers[T any] struct { ``` -### func NewNamedHandlers +### func [NewNamedHandlers]() ```go func NewNamedHandlers[T any]() *NamedHandlers[T] @@ -245,7 +245,7 @@ func NewNamedHandlers[T any]() *NamedHandlers[T] NewNamedHandlers returns a new, empty NamedHandlers\[T\]. -### func \(\*NamedHandlers\[T\]\) Handler +### func \(\*NamedHandlers\[T\]\) [Handler]() ```go func (n *NamedHandlers[T]) Handler() Handler[T] @@ -263,7 +263,7 @@ router.OnCommand("/admin", names.Handler()) Subsequent Set/Remove calls take effect on the next dispatch. -### func \(\*NamedHandlers\[T\]\) Has +### func \(\*NamedHandlers\[T\]\) [Has]() ```go func (n *NamedHandlers[T]) Has(name string) bool @@ -272,7 +272,7 @@ func (n *NamedHandlers[T]) Has(name string) bool Has reports whether name is registered. -### func \(\*NamedHandlers\[T\]\) Names +### func \(\*NamedHandlers\[T\]\) [Names]() ```go func (n *NamedHandlers[T]) Names() []string @@ -281,7 +281,7 @@ func (n *NamedHandlers[T]) Names() []string Names returns the registered names in registration order. -### func \(\*NamedHandlers\[T\]\) Remove +### func \(\*NamedHandlers\[T\]\) [Remove]() ```go func (n *NamedHandlers[T]) Remove(name string) bool @@ -290,7 +290,7 @@ func (n *NamedHandlers[T]) Remove(name string) bool Remove unregisters the handler under name. Returns true if it existed. -### func \(\*NamedHandlers\[T\]\) Set +### func \(\*NamedHandlers\[T\]\) [Set]() ```go func (n *NamedHandlers[T]) Set(name string, h Handler[T]) @@ -299,7 +299,7 @@ func (n *NamedHandlers[T]) Set(name string, h Handler[T]) Set registers or replaces the handler under name. If name is new, it is appended to the end of the registration order. -## type Router +## type [Router]() Router dispatches updates from any Updater to typed handlers. @@ -312,7 +312,7 @@ type Router struct { ``` -### func New +### func [New]() ```go func New(b *client.Bot, opts ...RouterOption) *Router @@ -321,7 +321,7 @@ func New(b *client.Bot, opts ...RouterOption) *Router New constructs a Router. Recovery middleware is added by default; users can disable it by passing WithoutRecovery \(not implemented here, but the hook is in place via Use\). -### func \(\*Router\) Group +### func \(\*Router\) [Group]() ```go func (r *Router) Group(group int) *RouterScope @@ -330,7 +330,7 @@ func (r *Router) Group(group int) *RouterScope Group returns a RouterScope that registers handlers in the given group. Group 0 \(the default\) runs first, then group 1, etc. Within a group, handlers run in registration order; the first non\-skipped match terminates dispatch unless the handler returns ErrContinueGroups. -### func \(\*Router\) OnBusinessConnection +### func \(\*Router\) [OnBusinessConnection]() ```go func (r *Router) OnBusinessConnection(h Handler[*api.BusinessConnection]) @@ -339,7 +339,7 @@ func (r *Router) OnBusinessConnection(h Handler[*api.BusinessConnection]) OnBusinessConnection registers a handler for business connection updates. -### func \(\*Router\) OnCallback +### func \(\*Router\) [OnCallback]() ```go func (r *Router) OnCallback(pattern string, h Handler[*api.CallbackQuery]) @@ -350,7 +350,7 @@ OnCallback registers a handler for callback queries whose Data matches the regex Panics at registration time if pattern is not a valid regular expression. -### func \(\*Router\) OnCallbackFilter +### func \(\*Router\) [OnCallbackFilter]() ```go func (r *Router) OnCallbackFilter(f Filter[*api.CallbackQuery], h Handler[*api.CallbackQuery]) @@ -359,7 +359,7 @@ func (r *Router) OnCallbackFilter(f Filter[*api.CallbackQuery], h Handler[*api.C OnCallbackFilter registers a typed callback\-query handler gated by filter f. Filter routes are checked after pattern\-based OnCallback routes; first match wins. -### func \(\*Router\) OnChannelPost +### func \(\*Router\) [OnChannelPost]() ```go func (r *Router) OnChannelPost(h Handler[*api.Message]) @@ -368,7 +368,7 @@ func (r *Router) OnChannelPost(h Handler[*api.Message]) OnChannelPost registers a handler for channel post updates. -### func \(\*Router\) OnChatBoost +### func \(\*Router\) [OnChatBoost]() ```go func (r *Router) OnChatBoost(h Handler[*api.ChatBoostUpdated]) @@ -377,7 +377,7 @@ func (r *Router) OnChatBoost(h Handler[*api.ChatBoostUpdated]) OnChatBoost registers a handler for chat boost updates. -### func \(\*Router\) OnChatJoinRequest +### func \(\*Router\) [OnChatJoinRequest]() ```go func (r *Router) OnChatJoinRequest(h Handler[*api.ChatJoinRequest]) @@ -386,7 +386,7 @@ func (r *Router) OnChatJoinRequest(h Handler[*api.ChatJoinRequest]) OnChatJoinRequest registers a handler for chat join requests. -### func \(\*Router\) OnChatJoinRequestFilter +### func \(\*Router\) [OnChatJoinRequestFilter]() ```go func (r *Router) OnChatJoinRequestFilter(f Filter[*api.ChatJoinRequest], h Handler[*api.ChatJoinRequest]) @@ -395,7 +395,7 @@ func (r *Router) OnChatJoinRequestFilter(f Filter[*api.ChatJoinRequest], h Handl OnChatJoinRequestFilter registers a filtered handler for chat join requests. -### func \(\*Router\) OnChatMember +### func \(\*Router\) [OnChatMember]() ```go func (r *Router) OnChatMember(h Handler[*api.ChatMemberUpdated]) @@ -404,7 +404,7 @@ func (r *Router) OnChatMember(h Handler[*api.ChatMemberUpdated]) OnChatMember registers a handler for chat member status changes. -### func \(\*Router\) OnChatMemberFilter +### func \(\*Router\) [OnChatMemberFilter]() ```go func (r *Router) OnChatMemberFilter(f Filter[*api.ChatMemberUpdated], h Handler[*api.ChatMemberUpdated]) @@ -413,7 +413,7 @@ func (r *Router) OnChatMemberFilter(f Filter[*api.ChatMemberUpdated], h Handler[ OnChatMemberFilter registers a filtered handler for chat member status changes. -### func \(\*Router\) OnChosenInlineResult +### func \(\*Router\) [OnChosenInlineResult]() ```go func (r *Router) OnChosenInlineResult(h Handler[*api.ChosenInlineResult]) @@ -422,7 +422,7 @@ func (r *Router) OnChosenInlineResult(h Handler[*api.ChosenInlineResult]) OnChosenInlineResult registers a handler for chosen inline results. -### func \(\*Router\) OnCommand +### func \(\*Router\) [OnCommand]() ```go func (r *Router) OnCommand(cmd string, h Handler[*api.Message]) @@ -431,7 +431,7 @@ func (r *Router) OnCommand(cmd string, h Handler[*api.Message]) OnCommand registers a handler for a slash command. The command string includes the leading slash \(e.g. "/start"\). Matching strips an optional "@BotName" suffix. -### func \(\*Router\) OnEditedChannelPost +### func \(\*Router\) [OnEditedChannelPost]() ```go func (r *Router) OnEditedChannelPost(h Handler[*api.Message]) @@ -440,7 +440,7 @@ func (r *Router) OnEditedChannelPost(h Handler[*api.Message]) OnEditedChannelPost registers a handler for edited channel post updates. -### func \(\*Router\) OnEditedMessage +### func \(\*Router\) [OnEditedMessage]() ```go func (r *Router) OnEditedMessage(h Handler[*api.Message]) @@ -449,7 +449,7 @@ func (r *Router) OnEditedMessage(h Handler[*api.Message]) OnEditedMessage registers a handler for edited message updates. -### func \(\*Router\) OnInlineQuery +### func \(\*Router\) [OnInlineQuery]() ```go func (r *Router) OnInlineQuery(h Handler[*api.InlineQuery]) @@ -458,7 +458,7 @@ func (r *Router) OnInlineQuery(h Handler[*api.InlineQuery]) OnInlineQuery registers a handler for inline queries \(one matcher only; inline queries are not partitioned by content here\). -### func \(\*Router\) OnInlineQueryFilter +### func \(\*Router\) [OnInlineQueryFilter]() ```go func (r *Router) OnInlineQueryFilter(f Filter[*api.InlineQuery], h Handler[*api.InlineQuery]) @@ -467,7 +467,7 @@ func (r *Router) OnInlineQueryFilter(f Filter[*api.InlineQuery], h Handler[*api. OnInlineQueryFilter registers an inline\-query handler gated by filter f. Filter routes are checked after bare OnInlineQuery handlers; first match wins. -### func \(\*Router\) OnMessageFilter +### func \(\*Router\) [OnMessageFilter]() ```go func (r *Router) OnMessageFilter(f Filter[*api.Message], h Handler[*api.Message]) @@ -476,7 +476,7 @@ func (r *Router) OnMessageFilter(f Filter[*api.Message], h Handler[*api.Message] OnMessageFilter registers a typed message handler gated by filter f. Filter routes are checked after command and text routes; first match wins. -### func \(\*Router\) OnMessageReaction +### func \(\*Router\) [OnMessageReaction]() ```go func (r *Router) OnMessageReaction(h Handler[*api.MessageReactionUpdated]) @@ -485,7 +485,7 @@ func (r *Router) OnMessageReaction(h Handler[*api.MessageReactionUpdated]) OnMessageReaction registers a handler for message reaction updates. -### func \(\*Router\) OnMessageReactionCount +### func \(\*Router\) [OnMessageReactionCount]() ```go func (r *Router) OnMessageReactionCount(h Handler[*api.MessageReactionCountUpdated]) @@ -494,7 +494,7 @@ func (r *Router) OnMessageReactionCount(h Handler[*api.MessageReactionCountUpdat OnMessageReactionCount registers a handler for anonymous message reaction count updates. -### func \(\*Router\) OnMyChatMember +### func \(\*Router\) [OnMyChatMember]() ```go func (r *Router) OnMyChatMember(h Handler[*api.ChatMemberUpdated]) @@ -503,7 +503,7 @@ func (r *Router) OnMyChatMember(h Handler[*api.ChatMemberUpdated]) OnMyChatMember registers a handler for bot's own chat member status changes. -### func \(\*Router\) OnMyChatMemberFilter +### func \(\*Router\) [OnMyChatMemberFilter]() ```go func (r *Router) OnMyChatMemberFilter(f Filter[*api.ChatMemberUpdated], h Handler[*api.ChatMemberUpdated]) @@ -512,7 +512,7 @@ func (r *Router) OnMyChatMemberFilter(f Filter[*api.ChatMemberUpdated], h Handle OnMyChatMemberFilter registers a filtered handler for bot's own chat member status changes. -### func \(\*Router\) OnPoll +### func \(\*Router\) [OnPoll]() ```go func (r *Router) OnPoll(h Handler[*api.Poll]) @@ -521,7 +521,7 @@ func (r *Router) OnPoll(h Handler[*api.Poll]) OnPoll registers a handler for poll state updates. -### func \(\*Router\) OnPollAnswer +### func \(\*Router\) [OnPollAnswer]() ```go func (r *Router) OnPollAnswer(h Handler[*api.PollAnswer]) @@ -530,7 +530,7 @@ func (r *Router) OnPollAnswer(h Handler[*api.PollAnswer]) OnPollAnswer registers a handler for poll answer updates. -### func \(\*Router\) OnPreCheckoutQuery +### func \(\*Router\) [OnPreCheckoutQuery]() ```go func (r *Router) OnPreCheckoutQuery(h Handler[*api.PreCheckoutQuery]) @@ -539,7 +539,7 @@ func (r *Router) OnPreCheckoutQuery(h Handler[*api.PreCheckoutQuery]) OnPreCheckoutQuery registers a handler for pre\-checkout queries. -### func \(\*Router\) OnPreCheckoutQueryFilter +### func \(\*Router\) [OnPreCheckoutQueryFilter]() ```go func (r *Router) OnPreCheckoutQueryFilter(f Filter[*api.PreCheckoutQuery], h Handler[*api.PreCheckoutQuery]) @@ -548,7 +548,7 @@ func (r *Router) OnPreCheckoutQueryFilter(f Filter[*api.PreCheckoutQuery], h Han OnPreCheckoutQueryFilter registers a filtered handler for pre\-checkout queries. -### func \(\*Router\) OnPurchasedPaidMedia +### func \(\*Router\) [OnPurchasedPaidMedia]() ```go func (r *Router) OnPurchasedPaidMedia(h Handler[*api.PaidMediaPurchased]) @@ -557,7 +557,7 @@ func (r *Router) OnPurchasedPaidMedia(h Handler[*api.PaidMediaPurchased]) OnPurchasedPaidMedia registers a handler for purchased paid media updates. -### func \(\*Router\) OnRemovedChatBoost +### func \(\*Router\) [OnRemovedChatBoost]() ```go func (r *Router) OnRemovedChatBoost(h Handler[*api.ChatBoostRemoved]) @@ -566,7 +566,7 @@ func (r *Router) OnRemovedChatBoost(h Handler[*api.ChatBoostRemoved]) OnRemovedChatBoost registers a handler for removed chat boost updates. -### func \(\*Router\) OnShippingQuery +### func \(\*Router\) [OnShippingQuery]() ```go func (r *Router) OnShippingQuery(h Handler[*api.ShippingQuery]) @@ -575,7 +575,7 @@ func (r *Router) OnShippingQuery(h Handler[*api.ShippingQuery]) OnShippingQuery registers a handler for shipping queries. -### func \(\*Router\) OnText +### func \(\*Router\) [OnText]() ```go func (r *Router) OnText(pattern string, h Handler[*api.Message]) @@ -586,7 +586,7 @@ OnText registers a handler for messages whose Text matches the regex. Panics at registration time if pattern is not a valid regular expression. -### func \(\*Router\) Run +### func \(\*Router\) [Run]() ```go func (r *Router) Run(ctx context.Context, u transport.Updater) error @@ -599,7 +599,7 @@ By default updates are processed concurrently \(up to WithMaxConcurrency\(50\) g Run waits for all in\-flight handlers to finish before returning. -### func \(\*Router\) Use +### func \(\*Router\) [Use]() ```go func (r *Router) Use(mw Middleware[*api.Update]) @@ -608,7 +608,7 @@ func (r *Router) Use(mw Middleware[*api.Update]) Use registers a global middleware applied to every Update dispatch. -## type RouterOption +## type [RouterOption]() RouterOption configures a Router at construction time. @@ -617,7 +617,7 @@ type RouterOption func(*Router) ``` -### func WithMaxConcurrency +### func [WithMaxConcurrency]() ```go func WithMaxConcurrency(n int) RouterOption @@ -628,7 +628,7 @@ WithMaxConcurrency sets the maximum number of updates processed in parallel. Def Note: concurrent dispatch means handlers for different updates may run simultaneously. Handlers that mutate shared state must be safe for concurrent access. -## type RouterScope +## type [RouterScope]() RouterScope registers handlers into a specific priority group on its parent Router. Group 0 runs first, then group 1, etc. Within a group, handlers run in registration order; the first non\-skipped match terminates dispatch unless the handler returns ErrContinueGroups. @@ -639,7 +639,7 @@ type RouterScope struct { ``` -### func \(\*RouterScope\) OnCommand +### func \(\*RouterScope\) [OnCommand]() ```go func (s *RouterScope) OnCommand(cmd string, h Handler[*api.Message]) @@ -648,7 +648,7 @@ func (s *RouterScope) OnCommand(cmd string, h Handler[*api.Message]) OnCommand registers a command handler in this group. -### func \(\*RouterScope\) OnMessageFilter +### func \(\*RouterScope\) [OnMessageFilter]() ```go func (s *RouterScope) OnMessageFilter(f Filter[*api.Message], h Handler[*api.Message]) @@ -657,7 +657,7 @@ func (s *RouterScope) OnMessageFilter(f Filter[*api.Message], h Handler[*api.Mes OnMessageFilter registers a filter\-based message handler in this group. -### func \(\*RouterScope\) OnText +### func \(\*RouterScope\) [OnText]() ```go func (s *RouterScope) OnText(pattern string, h Handler[*api.Message]) diff --git a/docs/reference/dispatch/conversation.md b/docs/reference/dispatch/conversation.md index 0453ac3..fde1ac9 100644 --- a/docs/reference/dispatch/conversation.md +++ b/docs/reference/dispatch/conversation.md @@ -36,7 +36,7 @@ var ErrKeyNotFound = errors.New("conversation: key not found") ``` -## func End +## func [End]() ```go func End() error @@ -45,7 +45,7 @@ func End() error End signals the conversation has finished and state should be cleared. Conversation handlers return End\(\) to terminate. -## func Next +## func [Next]() ```go func Next(s State) error @@ -54,7 +54,7 @@ func Next(s State) error Next signals the conversation should advance to the given state. Conversation handlers return Next\("state\_name"\) to transition. -## type Conversation +## type [Conversation]() Conversation is a stateful handler with entry, per\-state, exit and fallback steps. A conversation is keyed by KeyStrategy \(default KeyByUserAndChat\) and persisted by Storage \(default in\-memory\). @@ -87,7 +87,7 @@ type Conversation struct { ``` -### func \(\*Conversation\) Dispatch +### func \(\*Conversation\) [Dispatch]() ```go func (c *Conversation) Dispatch(next dispatch.Handler[*api.Update]) dispatch.Handler[*api.Update] @@ -98,7 +98,7 @@ Dispatch is a global middleware\-shaped Handler that consumes updates and routes If the conversation claims an update, downstream handlers are skipped. If the conversation does not claim it, downstream handlers run as normal. -## type Handler +## type [Handler]() Handler defines a step in the conversation. Receives the dispatch context and the raw update. Returns: @@ -112,7 +112,7 @@ type Handler func(ctx *dispatch.Context, u *api.Update) error ``` -## type KeyStrategy +## type [KeyStrategy]() KeyStrategy derives a persistence key from an update. Strategies determine how conversation scope works — per\-user, per\-chat, or per\-user\-and\-chat. Implementations must return a stable string for the same logical scope across updates. @@ -158,7 +158,7 @@ var KeyByUserAndChat KeyStrategy = func(u *api.Update) string { ``` -## type MemoryStorage +## type [MemoryStorage]() MemoryStorage is the default in\-process Storage. It is safe for concurrent use. Conversation state is lost on process restart; use a custom Storage backed by a database for persistent flows. @@ -169,7 +169,7 @@ type MemoryStorage struct { ``` -### func NewMemoryStorage +### func [NewMemoryStorage]() ```go func NewMemoryStorage() *MemoryStorage @@ -178,7 +178,7 @@ func NewMemoryStorage() *MemoryStorage NewMemoryStorage constructs an empty in\-memory storage. -### func \(\*MemoryStorage\) Delete +### func \(\*MemoryStorage\) [Delete]() ```go func (s *MemoryStorage) Delete(_ context.Context, key string) error @@ -187,7 +187,7 @@ func (s *MemoryStorage) Delete(_ context.Context, key string) error -### func \(\*MemoryStorage\) Get +### func \(\*MemoryStorage\) [Get]() ```go func (s *MemoryStorage) Get(_ context.Context, key string) (State, error) @@ -196,7 +196,7 @@ func (s *MemoryStorage) Get(_ context.Context, key string) (State, error) -### func \(\*MemoryStorage\) Set +### func \(\*MemoryStorage\) [Set]() ```go func (s *MemoryStorage) Set(_ context.Context, key string, state State) error @@ -205,7 +205,7 @@ func (s *MemoryStorage) Set(_ context.Context, key string, state State) error -## type State +## type [State]() State is a label identifying a node in the conversation graph. The empty string is the implicit "no active conversation" state. @@ -214,7 +214,7 @@ type State string ``` -## type Step +## type [Step]() Step pairs a filter with a handler for one conversation step. @@ -226,7 +226,7 @@ type Step struct { ``` -## type Storage +## type [Storage]() Storage persists per\-user \(or per\-chat, per\-message — depending on the KeyStrategy in use\) conversation state across update deliveries. diff --git a/docs/reference/dispatch/filters/callback.md b/docs/reference/dispatch/filters/callback.md index 6c71732..2a505c1 100644 --- a/docs/reference/dispatch/filters/callback.md +++ b/docs/reference/dispatch/filters/callback.md @@ -17,7 +17,7 @@ Package callback provides Filter helpers for \*api.CallbackQuery payloads. -## func Data +## func [Data]() ```go func Data(pattern string) dispatch.Filter[*api.CallbackQuery] @@ -26,7 +26,7 @@ func Data(pattern string) dispatch.Filter[*api.CallbackQuery] Data returns a Filter that matches callback queries whose Data matches pattern \(regex\). Panics at registration time on an invalid pattern. -## func DataEquals +## func [DataEquals]() ```go func DataEquals(s string) dispatch.Filter[*api.CallbackQuery] @@ -35,7 +35,7 @@ func DataEquals(s string) dispatch.Filter[*api.CallbackQuery] DataEquals returns a Filter that matches callback queries whose Data equals s exactly. -## func DataPrefix +## func [DataPrefix]() ```go func DataPrefix(prefix string) dispatch.Filter[*api.CallbackQuery] @@ -44,7 +44,7 @@ func DataPrefix(prefix string) dispatch.Filter[*api.CallbackQuery] DataPrefix returns a Filter that matches callback queries whose Data starts with prefix. -## func FromUser +## func [FromUser]() ```go func FromUser(userID int64) dispatch.Filter[*api.CallbackQuery] diff --git a/docs/reference/dispatch/filters/chatjoinrequest.md b/docs/reference/dispatch/filters/chatjoinrequest.md index e88a0b1..a9a1319 100644 --- a/docs/reference/dispatch/filters/chatjoinrequest.md +++ b/docs/reference/dispatch/filters/chatjoinrequest.md @@ -15,7 +15,7 @@ Package chatjoinrequest provides Filter helpers for \*api.ChatJoinRequest payloa -## func FromUser +## func [FromUser]() ```go func FromUser(uid int64) dispatch.Filter[*api.ChatJoinRequest] @@ -24,7 +24,7 @@ func FromUser(uid int64) dispatch.Filter[*api.ChatJoinRequest] FromUser returns a Filter that matches join requests where the requesting user's ID equals uid. -## func InChat +## func [InChat]() ```go func InChat(cid int64) dispatch.Filter[*api.ChatJoinRequest] diff --git a/docs/reference/dispatch/filters/chatmember.md b/docs/reference/dispatch/filters/chatmember.md index 22a4594..0ef98aa 100644 --- a/docs/reference/dispatch/filters/chatmember.md +++ b/docs/reference/dispatch/filters/chatmember.md @@ -15,7 +15,7 @@ Package chatmember provides Filter helpers for \*api.ChatMemberUpdated payloads. -## func FromUser +## func [FromUser]() ```go func FromUser(uid int64) dispatch.Filter[*api.ChatMemberUpdated] @@ -24,7 +24,7 @@ func FromUser(uid int64) dispatch.Filter[*api.ChatMemberUpdated] FromUser returns a Filter that matches updates where the acting user \(From.ID\) equals uid. -## func NewStatus +## func [NewStatus]() ```go func NewStatus(s string) dispatch.Filter[*api.ChatMemberUpdated] diff --git a/docs/reference/dispatch/filters/inline.md b/docs/reference/dispatch/filters/inline.md index afea38c..e243f70 100644 --- a/docs/reference/dispatch/filters/inline.md +++ b/docs/reference/dispatch/filters/inline.md @@ -16,7 +16,7 @@ Package inline provides Filter helpers for \*api.InlineQuery payloads. -## func Query +## func [Query]() ```go func Query(pattern string) dispatch.Filter[*api.InlineQuery] @@ -25,7 +25,7 @@ func Query(pattern string) dispatch.Filter[*api.InlineQuery] Query returns a Filter that matches inline queries whose Query field matches pattern \(regex\). Panics at registration time on an invalid pattern. -## func QueryEquals +## func [QueryEquals]() ```go func QueryEquals(s string) dispatch.Filter[*api.InlineQuery] @@ -34,7 +34,7 @@ func QueryEquals(s string) dispatch.Filter[*api.InlineQuery] QueryEquals returns a Filter that matches inline queries whose Query equals s exactly. -## func QueryPrefix +## func [QueryPrefix]() ```go func QueryPrefix(prefix string) dispatch.Filter[*api.InlineQuery] diff --git a/docs/reference/dispatch/filters/message.md b/docs/reference/dispatch/filters/message.md index 59742ea..8ad1894 100644 --- a/docs/reference/dispatch/filters/message.md +++ b/docs/reference/dispatch/filters/message.md @@ -27,7 +27,7 @@ Package message provides Filter helpers for \*api.Message payloads. -## func AnyCommand +## func [AnyCommand]() ```go func AnyCommand() dispatch.Filter[*api.Message] @@ -36,7 +36,7 @@ func AnyCommand() dispatch.Filter[*api.Message] AnyCommand returns a Filter that matches any message starting with a bot\_command entity at offset 0. -## func ChatType +## func [ChatType]() ```go func ChatType(t api.ChatType) dispatch.Filter[*api.Message] @@ -45,7 +45,7 @@ func ChatType(t api.ChatType) dispatch.Filter[*api.Message] ChatType returns a Filter that matches messages whose Chat.Type equals t. -## func Command +## func [Command]() ```go func Command(name string) dispatch.Filter[*api.Message] @@ -54,7 +54,7 @@ func Command(name string) dispatch.Filter[*api.Message] Command returns a Filter that matches messages whose first entity is a bot\_command equal to "/\" \(with or without "@BotName" suffix\). -## func FromUser +## func [FromUser]() ```go func FromUser(userID int64) dispatch.Filter[*api.Message] @@ -63,7 +63,7 @@ func FromUser(userID int64) dispatch.Filter[*api.Message] FromUser returns a Filter that matches messages whose From.ID equals userID. -## func HasDocument +## func [HasDocument]() ```go func HasDocument() dispatch.Filter[*api.Message] @@ -72,7 +72,7 @@ func HasDocument() dispatch.Filter[*api.Message] HasDocument returns a Filter that matches messages with a Document attachment. -## func HasEntity +## func [HasEntity]() ```go func HasEntity(t api.MessageEntityType) dispatch.Filter[*api.Message] @@ -81,7 +81,7 @@ func HasEntity(t api.MessageEntityType) dispatch.Filter[*api.Message] HasEntity returns a Filter that matches messages whose Entities contain at least one entity of type t \(e.g. api.MessageEntityTypeBotCommand\). -## func HasPhoto +## func [HasPhoto]() ```go func HasPhoto() dispatch.Filter[*api.Message] @@ -90,7 +90,7 @@ func HasPhoto() dispatch.Filter[*api.Message] HasPhoto returns a Filter that matches messages with a Photo attachment. -## func InChat +## func [InChat]() ```go func InChat(chatID int64) dispatch.Filter[*api.Message] @@ -99,7 +99,7 @@ func InChat(chatID int64) dispatch.Filter[*api.Message] InChat returns a Filter that matches messages whose Chat.ID equals chatID. -## func IsForward +## func [IsForward]() ```go func IsForward() dispatch.Filter[*api.Message] @@ -108,7 +108,7 @@ func IsForward() dispatch.Filter[*api.Message] IsForward returns a Filter that matches messages that have ForwardOrigin set. -## func IsReply +## func [IsReply]() ```go func IsReply() dispatch.Filter[*api.Message] @@ -117,7 +117,7 @@ func IsReply() dispatch.Filter[*api.Message] IsReply returns a Filter that matches messages that have ReplyToMessage set. -## func Text +## func [Text]() ```go func Text(pattern string) dispatch.Filter[*api.Message] @@ -126,7 +126,7 @@ func Text(pattern string) dispatch.Filter[*api.Message] Text returns a Filter that matches messages whose Text matches pattern \(regex\). Panics at registration time on an invalid pattern. -## func TextContains +## func [TextContains]() ```go func TextContains(sub string) dispatch.Filter[*api.Message] @@ -135,7 +135,7 @@ func TextContains(sub string) dispatch.Filter[*api.Message] TextContains returns a Filter that matches messages whose Text contains sub. -## func TextEquals +## func [TextEquals]() ```go func TextEquals(s string) dispatch.Filter[*api.Message] @@ -144,7 +144,7 @@ func TextEquals(s string) dispatch.Filter[*api.Message] TextEquals returns a Filter that matches messages whose Text equals s exactly. -## func TextPrefix +## func [TextPrefix]() ```go func TextPrefix(prefix string) dispatch.Filter[*api.Message] diff --git a/docs/reference/dispatch/filters/precheckoutquery.md b/docs/reference/dispatch/filters/precheckoutquery.md index aba85e3..edceafc 100644 --- a/docs/reference/dispatch/filters/precheckoutquery.md +++ b/docs/reference/dispatch/filters/precheckoutquery.md @@ -15,7 +15,7 @@ Package precheckoutquery provides Filter helpers for \*api.PreCheckoutQuery payl -## func Currency +## func [Currency]() ```go func Currency(c string) dispatch.Filter[*api.PreCheckoutQuery] @@ -24,7 +24,7 @@ func Currency(c string) dispatch.Filter[*api.PreCheckoutQuery] Currency returns a Filter that matches pre\-checkout queries with the given ISO 4217 currency code \(e.g. "USD", "EUR", "XTR"\). -## func FromUser +## func [FromUser]() ```go func FromUser(uid int64) dispatch.Filter[*api.PreCheckoutQuery] diff --git a/docs/reference/transport.md b/docs/reference/transport.md index 8f08eb3..8525812 100644 --- a/docs/reference/transport.md +++ b/docs/reference/transport.md @@ -34,7 +34,7 @@ All implementations satisfy the Updater interface so user code can swap one for -## type BackoffStrategy +## type [BackoffStrategy]() BackoffStrategy returns the duration to wait before the next attempt after \`attempt\` consecutive failures \(1\-based\). Implementations must be safe to call from a single goroutine. @@ -45,7 +45,7 @@ type BackoffStrategy interface { ``` -## type ExponentialBackoff +## type [ExponentialBackoff]() ExponentialBackoff implements capped exponential back\-off with jitter. Defaults: Base=500ms, Max=30s, Factor=2.0, Jitter=0.2. @@ -59,7 +59,7 @@ type ExponentialBackoff struct { ``` -### func DefaultBackoff +### func [DefaultBackoff]() ```go func DefaultBackoff() *ExponentialBackoff @@ -68,7 +68,7 @@ func DefaultBackoff() *ExponentialBackoff DefaultBackoff returns an ExponentialBackoff with library defaults. -### func \(\*ExponentialBackoff\) NextDelay +### func \(\*ExponentialBackoff\) [NextDelay]() ```go func (b *ExponentialBackoff) NextDelay(attempt int) time.Duration @@ -77,7 +77,7 @@ func (b *ExponentialBackoff) NextDelay(attempt int) time.Duration NextDelay implements BackoffStrategy. -## type LongPoller +## type [LongPoller]() LongPoller pulls updates via Bot.GetUpdates in a loop, advancing the offset cursor after each batch. It applies BackoffStrategy on transient errors \(network failures, 5xx, 429\). @@ -95,7 +95,7 @@ type LongPoller struct { ``` -### func NewLongPoller +### func [NewLongPoller]() ```go func NewLongPoller(b *client.Bot) *LongPoller @@ -104,7 +104,7 @@ func NewLongPoller(b *client.Bot) *LongPoller NewLongPoller constructs a LongPoller with sensible defaults. -### func \(\*LongPoller\) Run +### func \(\*LongPoller\) [Run]() ```go func (p *LongPoller) Run(ctx context.Context) error @@ -113,7 +113,7 @@ func (p *LongPoller) Run(ctx context.Context) error Run implements Updater. It blocks until ctx is cancelled, Stop is called, or a fatal error occurs \(e.g. unauthorized\). See LongPoller for at\-least\-once delivery semantics on shutdown. -### func \(\*LongPoller\) Stop +### func \(\*LongPoller\) [Stop]() ```go func (p *LongPoller) Stop(ctx context.Context) error @@ -122,7 +122,7 @@ func (p *LongPoller) Stop(ctx context.Context) error Stop implements Updater. -### func \(\*LongPoller\) Updates +### func \(\*LongPoller\) [Updates]() ```go func (p *LongPoller) Updates() <-chan api.Update @@ -131,7 +131,7 @@ func (p *LongPoller) Updates() <-chan api.Update Updates implements Updater. -## type Updater +## type [Updater]() Updater is the abstraction over update sources. Implementations must: @@ -154,7 +154,7 @@ type Updater interface { ``` -## type WebhookOption +## type [WebhookOption]() WebhookOption configures a WebhookServer at construction time. @@ -163,7 +163,7 @@ type WebhookOption func(*webhookOptions) ``` -### func WithBufferSize +### func [WithBufferSize]() ```go func WithBufferSize(n int) WebhookOption @@ -172,7 +172,7 @@ func WithBufferSize(n int) WebhookOption WithBufferSize sets the size of the updates channel buffer. Default is 64. -## type WebhookServer +## type [WebhookServer]() WebhookServer implements Updater by exposing an http.Handler that receives updates from Telegram. It can be mounted on the user's own HTTP server \(via ServeHTTP\) or run standalone \(via ListenAndServe\). @@ -185,7 +185,7 @@ type WebhookServer struct { ``` -### func NewWebhookServer +### func [NewWebhookServer]() ```go func NewWebhookServer(b *client.Bot, opts ...WebhookOption) *WebhookServer @@ -194,7 +194,7 @@ func NewWebhookServer(b *client.Bot, opts ...WebhookOption) *WebhookServer NewWebhookServer constructs a WebhookServer with default buffer size \(64\). Use WithBufferSize to override. -### func \(\*WebhookServer\) ListenAndServe +### func \(\*WebhookServer\) [ListenAndServe]() ```go func (w *WebhookServer) ListenAndServe(ctx context.Context, addr string) error @@ -203,7 +203,7 @@ func (w *WebhookServer) ListenAndServe(ctx context.Context, addr string) error ListenAndServe starts an HTTP server on addr and blocks until Stop is called \(which triggers Shutdown with the caller's context\) or the server returns an error other than http.ErrServerClosed. Callers must invoke Stop\(ctx\) to cleanly shut down the server; the ctx passed here is only used as the server's base context for incoming requests. -### func \(\*WebhookServer\) Run +### func \(\*WebhookServer\) [Run]() ```go func (w *WebhookServer) Run(ctx context.Context) error @@ -212,7 +212,7 @@ func (w *WebhookServer) Run(ctx context.Context) error Run implements Updater. It blocks until Stop is called or ctx is cancelled. If the server has not been started via ListenAndServe, Run only watches for shutdown — the user is expected to mount ServeHTTP on their own router. -### func \(\*WebhookServer\) ServeHTTP +### func \(\*WebhookServer\) [ServeHTTP]() ```go func (w *WebhookServer) ServeHTTP(rw http.ResponseWriter, r *http.Request) @@ -221,7 +221,7 @@ func (w *WebhookServer) ServeHTTP(rw http.ResponseWriter, r *http.Request) ServeHTTP implements http.Handler. Telegram POSTs each update as JSON to this endpoint. Non\-POST requests get 405; bad bodies get 400; secret token mismatches get 401. -### func \(\*WebhookServer\) Stop +### func \(\*WebhookServer\) [Stop]() ```go func (w *WebhookServer) Stop(ctx context.Context) error @@ -230,7 +230,7 @@ func (w *WebhookServer) Stop(ctx context.Context) error Stop implements Updater. -### func \(\*WebhookServer\) Updates +### func \(\*WebhookServer\) [Updates]() ```go func (w *WebhookServer) Updates() <-chan api.Update