tgapi

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MessageOriginUserType identifies a known user origin.
	MessageOriginUserType = "user"
	// MessageOriginHiddenUserType identifies a hidden user origin.
	MessageOriginHiddenUserType = "hidden_user"
	// MessageOriginChatType identifies a chat origin.
	MessageOriginChatType = "chat"
	// MessageOriginChannel identifies a channel origin.
	MessageOriginChannel = "channel"
)

Variables

View Source
var ErrFileTooLarge = errors.New("telegram file exceeds size limit")

ErrFileTooLarge reports a file download that exceeds the caller's limit.

View Source
var ErrPoolQueueFull = errors.New("worker pool queue full")

ErrPoolQueueFull reports that the internal request queue is full.

View Source
var ErrPoolStopped = errors.New("worker pool stopped")

ErrPoolStopped reports that a request was submitted after the worker pool stopped.

View Source
var ErrPoolUnexpected = errors.New("unexpected response from pool")

ErrPoolUnexpected reports an unexpected result type returned from the worker pool.

View Source
var ErrPoolWorkerPanic = errors.New("worker pool request panicked")

ErrPoolWorkerPanic reports a panic recovered while executing a worker-pool request.

View Source
var ErrResponseTooLarge = errors.New("telegram API response is too large")

ErrResponseTooLarge reports a Telegram API response larger than the safety limit.

View Source
var ErrRetryLimit = errors.New("telegram retry limit reached")

ErrRetryLimit reports that a request exhausted its configured 429 retries.

View Source
var ErrRichJSONDepth = errors.New("rich-message JSON exceeds depth limit")

ErrRichJSONDepth reports a rich-message JSON tree deeper than the decoder limit.

View Source
var ErrRichJSONNodes = errors.New("rich-message JSON exceeds node limit")

ErrRichJSONNodes reports a rich-message JSON tree larger than the decoder limit.

View Source
var ErrRichMessageDraftUploadUnsupported = errors.New("sendRichMessageDraft does not support direct file uploads")

ErrRichMessageDraftUploadUnsupported reports a direct file upload attempted for a rich draft.

Since: Bot API 10.2

View Source
var NoParams = EmptyParams{}

NoParams is a convenient instance of EmptyParams.

Functions

This section is empty.

Types

type API

type API struct {

	// Limiter is the optional rate limiter applied before requests are sent.
	Limiter *utils.RateLimiter
	// contains filtered or unexported fields
}

API is the main Telegram Bot API client for JSON requests.

Use API methods when sending JSON payloads (for example with file_id, URL, or other non-multipart fields). For multipart file uploads, use Uploader.

It manages HTTP requests, rate limiting, retries, and connection pooling.

func NewAPI

func NewAPI(opts *APIOpts) *API

NewAPI creates a new API client from options. Always call Close() when done to release resources.

func (*API) AddStickerToSet

func (api *API) AddStickerToSet(params AddStickerToSet) (bool, error)

AddStickerToSet adds a new sticker to a set created by the bot. Since: Bot API 3.2 Returns True on success. See https://core.telegram.org/bots/api#addstickertoset

func (*API) AddStickerToSetWithContext

func (api *API) AddStickerToSetWithContext(ctx context.Context, params AddStickerToSet) (bool, error)

AddStickerToSetWithContext is the context-aware variant of AddStickerToSet. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#addstickertoset

func (*API) AnswerCallbackQuery

func (api *API) AnswerCallbackQuery(params AnswerCallbackQuery) (bool, error)

AnswerCallbackQuery sends answers to callback queries sent from inline keyboards. Since: Bot API 2.0 Returns True on success. See https://core.telegram.org/bots/api#answercallbackquery

func (*API) AnswerCallbackQueryWithContext

func (api *API) AnswerCallbackQueryWithContext(ctx context.Context, params AnswerCallbackQuery) (bool, error)

AnswerCallbackQueryWithContext is the context-aware variant of AnswerCallbackQuery. Since: Bot API 2.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#answercallbackquery

func (*API) AnswerChatJoinRequestQuery added in v1.1.0

func (api *API) AnswerChatJoinRequestQuery(params AnswerChatJoinRequestQuery) (bool, error)

AnswerChatJoinRequestQuery processes a received chat join request query. Since: Bot API 10.1 Returns True on success. See https://core.telegram.org/bots/api#answerchatjoinrequestquery

func (*API) AnswerChatJoinRequestQueryWithContext added in v1.1.0

func (api *API) AnswerChatJoinRequestQueryWithContext(ctx context.Context, params AnswerChatJoinRequestQuery) (bool, error)

AnswerChatJoinRequestQueryWithContext is the context-aware variant of AnswerChatJoinRequestQuery. Since: Bot API 10.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#answerchatjoinrequestquery

func (*API) AnswerGuestQuery

func (api *API) AnswerGuestQuery(params AnswerGuestQuery) (SentGuestMessage, error)

AnswerGuestQuery answers a guest query. Since: Bot API 10.0 See https://core.telegram.org/bots/api#answerguestquery

func (*API) AnswerGuestQueryWithContext

func (api *API) AnswerGuestQueryWithContext(ctx context.Context, params AnswerGuestQuery) (SentGuestMessage, error)

AnswerGuestQueryWithContext is the context-aware variant of AnswerGuestQuery. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#answerguestquery

func (*API) AnswerInlineQuery

func (api *API) AnswerInlineQuery(params AnswerInlineQuery) (bool, error)

AnswerInlineQuery sends answers to an inline query. Since: Bot API 1.7 Returns true on success. See https://core.telegram.org/bots/api#answerinlinequery

func (*API) AnswerInlineQueryWithContext

func (api *API) AnswerInlineQueryWithContext(ctx context.Context, params AnswerInlineQuery) (bool, error)

AnswerInlineQueryWithContext is the context-aware variant of AnswerInlineQuery. Since: Bot API 1.7 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#answerinlinequery

func (*API) AnswerPreCheckoutQuery

func (api *API) AnswerPreCheckoutQuery(params AnswerPreCheckoutQuery) (bool, error)

AnswerPreCheckoutQuery answers a pre-checkout query. Since: Bot API 3.0 Returns true on success. See https://core.telegram.org/bots/api#answerprecheckoutquery

func (*API) AnswerPreCheckoutQueryWithContext

func (api *API) AnswerPreCheckoutQueryWithContext(ctx context.Context, params AnswerPreCheckoutQuery) (bool, error)

AnswerPreCheckoutQueryWithContext is the context-aware variant of AnswerPreCheckoutQuery. Since: Bot API 3.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#answerprecheckoutquery

func (*API) AnswerShippingQuery

func (api *API) AnswerShippingQuery(params AnswerShippingQuery) (bool, error)

AnswerShippingQuery answers a shipping query. Since: Bot API 3.0 Returns true on success. See https://core.telegram.org/bots/api#answershippingquery

func (*API) AnswerShippingQueryWithContext

func (api *API) AnswerShippingQueryWithContext(ctx context.Context, params AnswerShippingQuery) (bool, error)

AnswerShippingQueryWithContext is the context-aware variant of AnswerShippingQuery. Since: Bot API 3.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#answershippingquery

func (*API) AnswerWebAppQuery

func (api *API) AnswerWebAppQuery(params AnswerWebAppQuery) (SentWebAppMessage, error)

AnswerWebAppQuery sets the result of a Web App interaction. Since: Bot API 8.0 See https://core.telegram.org/bots/api#answerwebappquery

func (*API) AnswerWebAppQueryWithContext

func (api *API) AnswerWebAppQueryWithContext(ctx context.Context, params AnswerWebAppQuery) (SentWebAppMessage, error)

AnswerWebAppQueryWithContext is the context-aware variant of AnswerWebAppQuery. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#answerwebappquery

func (*API) ApproveChatJoinRequest

func (api *API) ApproveChatJoinRequest(params ApproveChatJoinRequest) (bool, error)

ApproveChatJoinRequest approves a chat join request. Since: Bot API 5.4 Returns True on success. See https://core.telegram.org/bots/api#approvechatjoinrequest

func (*API) ApproveChatJoinRequestWithContext

func (api *API) ApproveChatJoinRequestWithContext(ctx context.Context, params ApproveChatJoinRequest) (bool, error)

ApproveChatJoinRequestWithContext is the context-aware variant of ApproveChatJoinRequest. Since: Bot API 5.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#approvechatjoinrequest

func (*API) ApproveSuggestedPost

func (api *API) ApproveSuggestedPost(params ApproveSuggestedPost) (bool, error)

ApproveSuggestedPost approves a suggested channel post. Since: Bot API 9.2 Returns True on success. See https://core.telegram.org/bots/api#approvesuggestedpost

func (*API) ApproveSuggestedPostWithContext

func (api *API) ApproveSuggestedPostWithContext(ctx context.Context, params ApproveSuggestedPost) (bool, error)

ApproveSuggestedPostWithContext is the context-aware variant of ApproveSuggestedPost. Since: Bot API 9.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#approvesuggestedpost

func (*API) BanChatMember

func (api *API) BanChatMember(params BanChatMember) (bool, error)

BanChatMember bans a user in a chat. Since: Bot API 5.3 Returns True on success. See https://core.telegram.org/bots/api#banchatmember

func (*API) BanChatMemberWithContext

func (api *API) BanChatMemberWithContext(ctx context.Context, params BanChatMember) (bool, error)

BanChatMemberWithContext is the context-aware variant of BanChatMember. Since: Bot API 5.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#banchatmember

func (*API) BanChatSenderChat

func (api *API) BanChatSenderChat(params BanChatSenderChat) (bool, error)

BanChatSenderChat bans a channel chat in a supergroup or channel. Since: Bot API 5.6 Returns True on success. See https://core.telegram.org/bots/api#banchatsenderchat

func (*API) BanChatSenderChatWithContext

func (api *API) BanChatSenderChatWithContext(ctx context.Context, params BanChatSenderChat) (bool, error)

BanChatSenderChatWithContext is the context-aware variant of BanChatSenderChat. Since: Bot API 5.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#banchatsenderchat

func (*API) Close

func (api *API) Close() error

Close shuts down the internal worker pool and closes the logger. Must be called to avoid resource leaks. See https://core.telegram.org/bots/api

func (*API) CloseForumTopic

func (api *API) CloseForumTopic(params BaseForumTopic) (bool, error)

CloseForumTopic closes an open forum topic. Since: Bot API 6.3 Returns True on success. See https://core.telegram.org/bots/api#closeforumtopic

func (*API) CloseForumTopicWithContext

func (api *API) CloseForumTopicWithContext(ctx context.Context, params BaseForumTopic) (bool, error)

CloseForumTopicWithContext is the context-aware variant of CloseForumTopic. Since: Bot API 6.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#closeforumtopic

func (*API) CloseGeneralForumTopic

func (api *API) CloseGeneralForumTopic(params BaseGeneralForumTopic) (bool, error)

CloseGeneralForumTopic closes the 'General' topic in a forum supergroup. Since: Bot API 6.4 Returns True on success. See https://core.telegram.org/bots/api#closegeneralforumtopic

func (*API) CloseGeneralForumTopicWithContext

func (api *API) CloseGeneralForumTopicWithContext(ctx context.Context, params BaseGeneralForumTopic) (bool, error)

CloseGeneralForumTopicWithContext is the context-aware variant of CloseGeneralForumTopic. Since: Bot API 6.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#closegeneralforumtopic

func (*API) CloseRemote

func (api *API) CloseRemote() (bool, error)

CloseRemote closes the bot instance on the local server. Returns true on success. See https://core.telegram.org/bots/api#close

func (*API) CloseRemoteWithContext

func (api *API) CloseRemoteWithContext(ctx context.Context) (bool, error)

CloseRemoteWithContext is the context-aware variant of CloseRemote. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#close

func (*API) ConvertGiftToStars

func (api *API) ConvertGiftToStars(params ConvertGiftToStars) (bool, error)

ConvertGiftToStars converts a gift to Telegram Stars. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#convertgifttostars

func (*API) ConvertGiftToStarsWithContext

func (api *API) ConvertGiftToStarsWithContext(ctx context.Context, params ConvertGiftToStars) (bool, error)

ConvertGiftToStarsWithContext is the context-aware variant of ConvertGiftToStars. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#convertgifttostars

func (*API) CopyMessage

func (api *API) CopyMessage(params CopyMessage) (int, error)

CopyMessage copies a message. Since: Bot API 5.0 Returns the MessageID of the sent copy. See https://core.telegram.org/bots/api#copymessage

func (*API) CopyMessageWithContext

func (api *API) CopyMessageWithContext(ctx context.Context, params CopyMessage) (int, error)

CopyMessageWithContext is the context-aware variant of CopyMessage. Since: Bot API 5.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#copymessage

func (*API) CopyMessages

func (api *API) CopyMessages(params CopyMessages) ([]MessageID, error)

CopyMessages copies multiple messages. Since: Bot API 7.0 Returns an array of message IDs of the sent copies. See https://core.telegram.org/bots/api#copymessages

func (*API) CopyMessagesWithContext

func (api *API) CopyMessagesWithContext(ctx context.Context, params CopyMessages) ([]MessageID, error)

CopyMessagesWithContext is the context-aware variant of CopyMessages. Since: Bot API 7.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#copymessages

func (api *API) CreateChatInviteLink(params CreateChatInviteLink) (ChatInviteLink, error)

CreateChatInviteLink creates an additional invite link for a chat. Since: Bot API 5.1 Returns the created invite link. See https://core.telegram.org/bots/api#createchatinvitelink

func (*API) CreateChatInviteLinkWithContext

func (api *API) CreateChatInviteLinkWithContext(ctx context.Context, params CreateChatInviteLink) (ChatInviteLink, error)

CreateChatInviteLinkWithContext is the context-aware variant of CreateChatInviteLink. Since: Bot API 5.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#createchatinvitelink

func (api *API) CreateChatSubscriptionInviteLink(params CreateChatSubscriptionInviteLink) (ChatInviteLink, error)

CreateChatSubscriptionInviteLink creates a subscription invite link for a channel chat. Since: Bot API 8.0 Returns the created invite link. See https://core.telegram.org/bots/api#createchatsubscriptioninvitelink

func (*API) CreateChatSubscriptionInviteLinkWithContext

func (api *API) CreateChatSubscriptionInviteLinkWithContext(ctx context.Context, params CreateChatSubscriptionInviteLink) (ChatInviteLink, error)

CreateChatSubscriptionInviteLinkWithContext is the context-aware variant of CreateChatSubscriptionInviteLink. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#createchatsubscriptioninvitelink

func (*API) CreateForumTopic

func (api *API) CreateForumTopic(params CreateForumTopic) (ForumTopic, error)

CreateForumTopic creates a topic in a forum supergroup. Since: Bot API 6.3 Returns the created ForumTopic on success. See https://core.telegram.org/bots/api#createforumtopic

func (*API) CreateForumTopicWithContext

func (api *API) CreateForumTopicWithContext(ctx context.Context, params CreateForumTopic) (ForumTopic, error)

CreateForumTopicWithContext is the context-aware variant of CreateForumTopic. Since: Bot API 6.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#createforumtopic

func (api *API) CreateInvoiceLink(params CreateInvoiceLink) (string, error)

CreateInvoiceLink creates an invoice link. Since: Bot API 6.1 See https://core.telegram.org/bots/api#createinvoicelink

func (*API) CreateInvoiceLinkWithContext

func (api *API) CreateInvoiceLinkWithContext(ctx context.Context, params CreateInvoiceLink) (string, error)

CreateInvoiceLinkWithContext is the context-aware variant of CreateInvoiceLink. Since: Bot API 6.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#createinvoicelink

func (*API) CreateNewStickerSet

func (api *API) CreateNewStickerSet(params CreateNewStickerSet) (bool, error)

CreateNewStickerSet creates a new sticker set owned by a user. Since: Bot API 3.2 Returns True on success. See https://core.telegram.org/bots/api#createnewstickerset

func (*API) CreateNewStickerSetWithContext

func (api *API) CreateNewStickerSetWithContext(ctx context.Context, params CreateNewStickerSet) (bool, error)

CreateNewStickerSetWithContext is the context-aware variant of CreateNewStickerSet. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#createnewstickerset

func (*API) DeclineChatJoinRequest

func (api *API) DeclineChatJoinRequest(params DeclineChatJoinRequest) (bool, error)

DeclineChatJoinRequest declines a chat join request. Since: Bot API 5.4 Returns True on success. See https://core.telegram.org/bots/api#declinechatjoinrequest

func (*API) DeclineChatJoinRequestWithContext

func (api *API) DeclineChatJoinRequestWithContext(ctx context.Context, params DeclineChatJoinRequest) (bool, error)

DeclineChatJoinRequestWithContext is the context-aware variant of DeclineChatJoinRequest. Since: Bot API 5.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#declinechatjoinrequest

func (*API) DeclineSuggestedPost

func (api *API) DeclineSuggestedPost(params DeclineSuggestedPost) (bool, error)

DeclineSuggestedPost declines a suggested channel post. Since: Bot API 9.2 Returns True on success. See https://core.telegram.org/bots/api#declinesuggestedpost

func (*API) DeclineSuggestedPostWithContext

func (api *API) DeclineSuggestedPostWithContext(ctx context.Context, params DeclineSuggestedPost) (bool, error)

DeclineSuggestedPostWithContext is the context-aware variant of DeclineSuggestedPost. Since: Bot API 9.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#declinesuggestedpost

func (*API) DeleteAllMessageReactionWithContext deprecated

func (api *API) DeleteAllMessageReactionWithContext(ctx context.Context, params DeleteAllMessageReactions) (bool, error)

DeleteAllMessageReactionWithContext is the context-aware variant of DeleteAllMessageReactions.

Deprecated: use DeleteAllMessageReactionsWithContext. The misspelled alias is retained for v1 compatibility and is subject to removal in v2. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deleteallmessagereactions

func (*API) DeleteAllMessageReactions

func (api *API) DeleteAllMessageReactions(params DeleteAllMessageReactions) (bool, error)

DeleteAllMessageReactions deletes all reactions on a message. Since: Bot API 10.0 Returns True on success. See https://core.telegram.org/bots/api#deleteallmessagereactions

func (*API) DeleteAllMessageReactionsWithContext added in v1.2.0

func (api *API) DeleteAllMessageReactionsWithContext(ctx context.Context, params DeleteAllMessageReactions) (bool, error)

DeleteAllMessageReactionsWithContext is the context-aware variant of DeleteAllMessageReactions. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deleteallmessagereactions

func (*API) DeleteBusinessMessages

func (api *API) DeleteBusinessMessages(params DeleteBusinessMessages) (bool, error)

DeleteBusinessMessages deletes business messages. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#deletebusinessmessages

func (*API) DeleteBusinessMessagesWithContext

func (api *API) DeleteBusinessMessagesWithContext(ctx context.Context, params DeleteBusinessMessages) (bool, error)

DeleteBusinessMessagesWithContext is the context-aware variant of DeleteBusinessMessages. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletebusinessmessages

func (*API) DeleteChatPhoto

func (api *API) DeleteChatPhoto(params DeleteChatPhoto) (bool, error)

DeleteChatPhoto deletes a chat photo. Since: Bot API 3.1 Returns True on success. See https://core.telegram.org/bots/api#deletechatphoto

func (*API) DeleteChatPhotoWithContext

func (api *API) DeleteChatPhotoWithContext(ctx context.Context, params DeleteChatPhoto) (bool, error)

DeleteChatPhotoWithContext is the context-aware variant of DeleteChatPhoto. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletechatphoto

func (*API) DeleteChatStickerSet

func (api *API) DeleteChatStickerSet(params DeleteChatStickerSet) (bool, error)

DeleteChatStickerSet deletes a sticker set from a supergroup. Since: Bot API 3.2 Returns True on success. See https://core.telegram.org/bots/api#deletechatstickerset

func (*API) DeleteChatStickerSetWithContext

func (api *API) DeleteChatStickerSetWithContext(ctx context.Context, params DeleteChatStickerSet) (bool, error)

DeleteChatStickerSetWithContext is the context-aware variant of DeleteChatStickerSet. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletechatstickerset

func (*API) DeleteEphemeralMessage added in v1.1.0

func (api *API) DeleteEphemeralMessage(params DeleteEphemeralMessage) (bool, error)

DeleteEphemeralMessage deletes an ephemeral message.

Since: Bot API 10.2

func (*API) DeleteEphemeralMessageWithContext added in v1.1.0

func (api *API) DeleteEphemeralMessageWithContext(ctx context.Context, params DeleteEphemeralMessage) (bool, error)

DeleteEphemeralMessageWithContext is the context-aware variant of DeleteEphemeralMessage.

Since: Bot API 10.2

func (*API) DeleteForumTopic

func (api *API) DeleteForumTopic(params BaseForumTopic) (bool, error)

DeleteForumTopic deletes a forum topic. Since: Bot API 6.3 Returns True on success. See https://core.telegram.org/bots/api#deleteforumtopic

func (*API) DeleteForumTopicWithContext

func (api *API) DeleteForumTopicWithContext(ctx context.Context, params BaseForumTopic) (bool, error)

DeleteForumTopicWithContext is the context-aware variant of DeleteForumTopic. Since: Bot API 6.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deleteforumtopic

func (*API) DeleteMessage

func (api *API) DeleteMessage(params DeleteMessage) (bool, error)

DeleteMessage deletes a message. Since: Bot API 3.0 Returns True on success. See https://core.telegram.org/bots/api#deletemessage

func (*API) DeleteMessageReaction

func (api *API) DeleteMessageReaction(params DeleteMessageReaction) (bool, error)

DeleteMessageReaction deletes a reaction on a message. Since: Bot API 10.0 Returns True on success. See https://core.telegram.org/bots/api#deletemessagereaction

func (*API) DeleteMessageReactionWithContext

func (api *API) DeleteMessageReactionWithContext(ctx context.Context, params DeleteMessageReaction) (bool, error)

DeleteMessageReactionWithContext is the context-aware variant of DeleteMessageReaction. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletemessagereaction

func (*API) DeleteMessageWithContext

func (api *API) DeleteMessageWithContext(ctx context.Context, params DeleteMessage) (bool, error)

DeleteMessageWithContext is the context-aware variant of DeleteMessage. Since: Bot API 3.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletemessage

func (*API) DeleteMessages

func (api *API) DeleteMessages(params DeleteMessages) (bool, error)

DeleteMessages deletes multiple messages at once. Since: Bot API 7.0 Returns True on success. See https://core.telegram.org/bots/api#deletemessages

func (*API) DeleteMessagesWithContext

func (api *API) DeleteMessagesWithContext(ctx context.Context, params DeleteMessages) (bool, error)

DeleteMessagesWithContext is the context-aware variant of DeleteMessages. Since: Bot API 7.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletemessages

func (*API) DeleteMyCommands

func (api *API) DeleteMyCommands(params DeleteMyCommands) (bool, error)

DeleteMyCommands deletes the list of the bot's commands for the given scope and user language. Since: Bot API 5.3 Returns true on success. See https://core.telegram.org/bots/api#deletemycommands

func (*API) DeleteMyCommandsWithContext

func (api *API) DeleteMyCommandsWithContext(ctx context.Context, params DeleteMyCommands) (bool, error)

DeleteMyCommandsWithContext is the context-aware variant of DeleteMyCommands. Since: Bot API 5.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletemycommands

func (*API) DeleteStickerFromSet

func (api *API) DeleteStickerFromSet(params DeleteStickerFromSet) (bool, error)

DeleteStickerFromSet deletes a sticker from a set created by the bot. Since: Bot API 3.2 Returns True on success. See https://core.telegram.org/bots/api#deletestickerfromset

func (*API) DeleteStickerFromSetWithContext

func (api *API) DeleteStickerFromSetWithContext(ctx context.Context, params DeleteStickerFromSet) (bool, error)

DeleteStickerFromSetWithContext is the context-aware variant of DeleteStickerFromSet. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletestickerfromset

func (*API) DeleteStickerSet

func (api *API) DeleteStickerSet(params DeleteStickerSet) (bool, error)

DeleteStickerSet deletes a sticker set created by the bot. Since: Bot API 6.6 Returns True on success. See https://core.telegram.org/bots/api#deletestickerset

func (*API) DeleteStickerSetWithContext

func (api *API) DeleteStickerSetWithContext(ctx context.Context, params DeleteStickerSet) (bool, error)

DeleteStickerSetWithContext is the context-aware variant of DeleteStickerSet. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletestickerset

func (*API) DeleteStory

func (api *API) DeleteStory(params DeleteStory) (bool, error)

DeleteStory deletes a story. Since: Bot API 7.2 Returns true on success. See https://core.telegram.org/bots/api#deletestory

func (*API) DeleteStoryWithContext

func (api *API) DeleteStoryWithContext(ctx context.Context, params DeleteStory) (bool, error)

DeleteStoryWithContext is the context-aware variant of DeleteStory. Since: Bot API 7.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletestory

func (*API) DeleteWebhook

func (api *API) DeleteWebhook(params DeleteWebhook) (bool, error)

DeleteWebhook removes the current webhook integration. Returns true on success. See https://core.telegram.org/bots/api#deletewebhook

func (*API) DeleteWebhookWithContext

func (api *API) DeleteWebhookWithContext(ctx context.Context, params DeleteWebhook) (bool, error)

DeleteWebhookWithContext is the context-aware variant of DeleteWebhook. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#deletewebhook

func (api *API) EditChatInviteLink(params EditChatInviteLink) (ChatInviteLink, error)

EditChatInviteLink edits a non‑primary invite link. Since: Bot API 5.1 Returns the edited invite link. See https://core.telegram.org/bots/api#editchatinvitelink

func (*API) EditChatInviteLinkWithContext

func (api *API) EditChatInviteLinkWithContext(ctx context.Context, params EditChatInviteLink) (ChatInviteLink, error)

EditChatInviteLinkWithContext is the context-aware variant of EditChatInviteLink. Since: Bot API 5.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editchatinvitelink

func (api *API) EditChatSubscriptionInviteLink(params EditChatSubscriptionInviteLink) (ChatInviteLink, error)

EditChatSubscriptionInviteLink edits a subscription invite link. Since: Bot API 8.0 Returns the edited invite link. See https://core.telegram.org/bots/api#editchatsubscriptioninvitelink

func (*API) EditChatSubscriptionInviteLinkWithContext

func (api *API) EditChatSubscriptionInviteLinkWithContext(ctx context.Context, params EditChatSubscriptionInviteLink) (ChatInviteLink, error)

EditChatSubscriptionInviteLinkWithContext is the context-aware variant of EditChatSubscriptionInviteLink. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editchatsubscriptioninvitelink

func (*API) EditEphemeralMessageCaption added in v1.1.0

func (api *API) EditEphemeralMessageCaption(params EditEphemeralMessageCaption) (bool, error)

EditEphemeralMessageCaption edits an ephemeral message caption.

Since: Bot API 10.2

func (*API) EditEphemeralMessageCaptionWithContext added in v1.1.0

func (api *API) EditEphemeralMessageCaptionWithContext(ctx context.Context, params EditEphemeralMessageCaption) (bool, error)

EditEphemeralMessageCaptionWithContext is the context-aware variant of EditEphemeralMessageCaption.

Since: Bot API 10.2

func (*API) EditEphemeralMessageMedia added in v1.1.0

func (api *API) EditEphemeralMessageMedia(params EditEphemeralMessageMedia) (bool, error)

EditEphemeralMessageMedia edits the media of an ephemeral message.

Since: Bot API 10.2

func (*API) EditEphemeralMessageMediaWithContext added in v1.1.0

func (api *API) EditEphemeralMessageMediaWithContext(ctx context.Context, params EditEphemeralMessageMedia) (bool, error)

EditEphemeralMessageMediaWithContext is the context-aware variant of EditEphemeralMessageMedia.

Since: Bot API 10.2

func (*API) EditEphemeralMessageReplyMarkup added in v1.1.0

func (api *API) EditEphemeralMessageReplyMarkup(params EditEphemeralMessageReplyMarkup) (bool, error)

EditEphemeralMessageReplyMarkup edits an ephemeral message's inline keyboard.

Since: Bot API 10.2

func (*API) EditEphemeralMessageReplyMarkupWithContext added in v1.1.0

func (api *API) EditEphemeralMessageReplyMarkupWithContext(ctx context.Context, params EditEphemeralMessageReplyMarkup) (bool, error)

EditEphemeralMessageReplyMarkupWithContext is the context-aware variant of EditEphemeralMessageReplyMarkup.

Since: Bot API 10.2

func (*API) EditEphemeralMessageText added in v1.1.0

func (api *API) EditEphemeralMessageText(params EditEphemeralMessageText) (bool, error)

EditEphemeralMessageText edits an ephemeral text message.

Since: Bot API 10.2

func (*API) EditEphemeralMessageTextWithContext added in v1.1.0

func (api *API) EditEphemeralMessageTextWithContext(ctx context.Context, params EditEphemeralMessageText) (bool, error)

EditEphemeralMessageTextWithContext is the context-aware variant of EditEphemeralMessageText.

Since: Bot API 10.2

func (*API) EditForumTopic

func (api *API) EditForumTopic(params EditForumTopic) (bool, error)

EditForumTopic edits name and icon of a forum topic. Since: Bot API 6.3 Returns True on success. See https://core.telegram.org/bots/api#editforumtopic

func (*API) EditForumTopicWithContext

func (api *API) EditForumTopicWithContext(ctx context.Context, params EditForumTopic) (bool, error)

EditForumTopicWithContext is the context-aware variant of EditForumTopic. Since: Bot API 6.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editforumtopic

func (*API) EditGeneralForumTopic

func (api *API) EditGeneralForumTopic(params EditGeneralForumTopic) (bool, error)

EditGeneralForumTopic edits the name of the 'General' topic in a forum supergroup. Since: Bot API 6.4 Returns True on success. See https://core.telegram.org/bots/api#editgeneralforumtopic

func (*API) EditGeneralForumTopicWithContext

func (api *API) EditGeneralForumTopicWithContext(ctx context.Context, params EditGeneralForumTopic) (bool, error)

EditGeneralForumTopicWithContext is the context-aware variant of EditGeneralForumTopic. Since: Bot API 6.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editgeneralforumtopic

func (*API) EditMessageCaption

func (api *API) EditMessageCaption(params EditMessageCaption) (Message, bool, error)

EditMessageCaption edits captions of messages. Since: Bot API 2.0 If inline_message_id is provided, returns a boolean success flag; otherwise returns the edited Message. See https://core.telegram.org/bots/api#editmessagecaption

func (*API) EditMessageCaptionWithContext

func (api *API) EditMessageCaptionWithContext(ctx context.Context, params EditMessageCaption) (Message, bool, error)

EditMessageCaptionWithContext is the context-aware variant of EditMessageCaption. Since: Bot API 2.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editmessagecaption

func (*API) EditMessageChecklist

func (api *API) EditMessageChecklist(params EditMessageChecklist) (Message, error)

EditMessageChecklist edits a checklist message. Since: Bot API 9.1 See https://core.telegram.org/bots/api#editmessagechecklist

func (*API) EditMessageChecklistWithContext

func (api *API) EditMessageChecklistWithContext(ctx context.Context, params EditMessageChecklist) (Message, error)

EditMessageChecklistWithContext is the context-aware variant of EditMessageChecklist. Since: Bot API 9.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editmessagechecklist

func (*API) EditMessageLiveLocation

func (api *API) EditMessageLiveLocation(params EditMessageLiveLocation) (Message, bool, error)

EditMessageLiveLocation edits live location messages. Since: Bot API 3.4 If inline_message_id is provided, returns a boolean success flag; otherwise returns the edited Message. See https://core.telegram.org/bots/api#editmessagelivelocation

func (*API) EditMessageLiveLocationWithContext

func (api *API) EditMessageLiveLocationWithContext(ctx context.Context, params EditMessageLiveLocation) (Message, bool, error)

EditMessageLiveLocationWithContext is the context-aware variant of EditMessageLiveLocation. Since: Bot API 3.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editmessagelivelocation

func (*API) EditMessageMedia

func (api *API) EditMessageMedia(params EditMessageMedia) (Message, bool, error)

EditMessageMedia edits media messages. Since: Bot API 4.0 If inline_message_id is provided, returns a boolean success flag; otherwise returns the edited Message. See https://core.telegram.org/bots/api#editmessagemedia

func (*API) EditMessageMediaWithContext

func (api *API) EditMessageMediaWithContext(ctx context.Context, params EditMessageMedia) (Message, bool, error)

EditMessageMediaWithContext is the context-aware variant of EditMessageMedia. Since: Bot API 4.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editmessagemedia

func (*API) EditMessageReplyMarkup

func (api *API) EditMessageReplyMarkup(params EditMessageReplyMarkup) (Message, bool, error)

EditMessageReplyMarkup edits only the reply markup of messages. Since: Bot API 2.0 If inline_message_id is provided, returns a boolean success flag; otherwise returns the edited Message. See https://core.telegram.org/bots/api#editmessagereplymarkup

func (*API) EditMessageReplyMarkupWithContext

func (api *API) EditMessageReplyMarkupWithContext(ctx context.Context, params EditMessageReplyMarkup) (Message, bool, error)

EditMessageReplyMarkupWithContext is the context-aware variant of EditMessageReplyMarkup. Since: Bot API 2.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editmessagereplymarkup

func (*API) EditMessageText

func (api *API) EditMessageText(params EditMessageText) (Message, bool, error)

EditMessageText edits text messages. Since: Bot API 2.0 If inline_message_id is provided, returns a boolean success flag; otherwise returns the edited Message. See https://core.telegram.org/bots/api#editmessagetext

func (*API) EditMessageTextWithContext

func (api *API) EditMessageTextWithContext(ctx context.Context, params EditMessageText) (Message, bool, error)

EditMessageTextWithContext is the context-aware variant of EditMessageText. Since: Bot API 2.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editmessagetext

func (*API) EditStory

func (api *API) EditStory(params EditStory) (Story, error)

EditStory edits an existing story. Since: Bot API 7.2 Returns the updated story. See https://core.telegram.org/bots/api#editstory

func (*API) EditStoryWithContext

func (api *API) EditStoryWithContext(ctx context.Context, params EditStory) (Story, error)

EditStoryWithContext is the context-aware variant of EditStory. Since: Bot API 7.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#editstory

func (*API) EditUserStarSubscription

func (api *API) EditUserStarSubscription(params EditUserStarSubscription) (bool, error)

EditUserStarSubscription cancels or re-enables a user star subscription extension. Since: Bot API 8.0 Returns true on success. See https://core.telegram.org/bots/api#edituserstarsubscription

func (*API) EditUserStarSubscriptionWithContext

func (api *API) EditUserStarSubscriptionWithContext(ctx context.Context, params EditUserStarSubscription) (bool, error)

EditUserStarSubscriptionWithContext is the context-aware variant of EditUserStarSubscription. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#edituserstarsubscription

func (api *API) ExportChatInviteLink(params ExportChatInviteLink) (string, error)

ExportChatInviteLink generates a new primary invite link for a chat. Since: Bot API 3.1 Returns the new invite link as string. See https://core.telegram.org/bots/api#exportchatinvitelink

func (*API) ExportChatInviteLinkWithContext

func (api *API) ExportChatInviteLinkWithContext(ctx context.Context, params ExportChatInviteLink) (string, error)

ExportChatInviteLinkWithContext is the context-aware variant of ExportChatInviteLink. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#exportchatinvitelink

func (*API) ForwardMessage

func (api *API) ForwardMessage(params ForwardMessage) (Message, error)

ForwardMessage forwards a message. Since: Bot API 1.0 See https://core.telegram.org/bots/api#forwardmessage

func (*API) ForwardMessageWithContext

func (api *API) ForwardMessageWithContext(ctx context.Context, params ForwardMessage) (Message, error)

ForwardMessageWithContext is the context-aware variant of ForwardMessage. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#forwardmessage

func (*API) ForwardMessages

func (api *API) ForwardMessages(params ForwardMessages) ([]MessageID, error)

ForwardMessages forwards multiple messages. Since: Bot API 7.0 Returns an array of message IDs of the sent messages. See https://core.telegram.org/bots/api#forwardmessages

func (*API) ForwardMessagesWithContext

func (api *API) ForwardMessagesWithContext(ctx context.Context, params ForwardMessages) ([]MessageID, error)

ForwardMessagesWithContext is the context-aware variant of ForwardMessages. Since: Bot API 7.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#forwardmessages

func (*API) GetAvailableGifts

func (api *API) GetAvailableGifts() (Gifts, error)

GetAvailableGifts returns the list of gifts that can be sent by the bot. Since: Bot API 9.0 See https://core.telegram.org/bots/api#getavailablegifts

func (*API) GetAvailableGiftsWithContext

func (api *API) GetAvailableGiftsWithContext(ctx context.Context) (Gifts, error)

GetAvailableGiftsWithContext is the context-aware variant of GetAvailableGifts. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getavailablegifts

func (*API) GetBusinessAccountGifts

func (api *API) GetBusinessAccountGifts(params GetBusinessAccountGifts) (OwnedGifts, error)

GetBusinessAccountGifts returns gifts owned by a business account. Since: Bot API 9.0 See https://core.telegram.org/bots/api#getbusinessaccountgifts

func (*API) GetBusinessAccountGiftsWithContext

func (api *API) GetBusinessAccountGiftsWithContext(ctx context.Context, params GetBusinessAccountGifts) (OwnedGifts, error)

GetBusinessAccountGiftsWithContext is the context-aware variant of GetBusinessAccountGifts. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getbusinessaccountgifts

func (*API) GetBusinessAccountStarBalance

func (api *API) GetBusinessAccountStarBalance(params GetBusinessAccountStarBalance) (StarAmount, error)

GetBusinessAccountStarBalance returns the star balance of a business account. Since: Bot API 9.0 See https://core.telegram.org/bots/api#getbusinessaccountstarbalance

func (*API) GetBusinessAccountStarBalanceWithContext

func (api *API) GetBusinessAccountStarBalanceWithContext(ctx context.Context, params GetBusinessAccountStarBalance) (StarAmount, error)

GetBusinessAccountStarBalanceWithContext is the context-aware variant of GetBusinessAccountStarBalance. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getbusinessaccountstarbalance

func (*API) GetBusinessConnection

func (api *API) GetBusinessConnection(params GetBusinessConnection) (BusinessConnection, error)

GetBusinessConnection returns information about a business connection. Since: Bot API 7.2 See https://core.telegram.org/bots/api#getbusinessconnection

func (*API) GetBusinessConnectionWithContext

func (api *API) GetBusinessConnectionWithContext(ctx context.Context, params GetBusinessConnection) (BusinessConnection, error)

GetBusinessConnectionWithContext is the context-aware variant of GetBusinessConnection. Since: Bot API 7.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getbusinessconnection

func (*API) GetChat

func (api *API) GetChat(params GetChat) (ChatFullInfo, error)

GetChat gets up‑to‑date information about a chat. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchat

func (*API) GetChatAdministrators

func (api *API) GetChatAdministrators(params GetChatAdministrators) ([]ChatMember, error)

GetChatAdministrators returns a list of administrators in a chat. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchatadministrators

func (*API) GetChatAdministratorsWithContext

func (api *API) GetChatAdministratorsWithContext(ctx context.Context, params GetChatAdministrators) ([]ChatMember, error)

GetChatAdministratorsWithContext is the context-aware variant of GetChatAdministrators. Since: Bot API 2.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getchatadministrators

func (*API) GetChatGifts

func (api *API) GetChatGifts(params GetChatGifts) (OwnedGifts, error)

GetChatGifts returns gifts owned by a chat. Since: Bot API 9.3 See https://core.telegram.org/bots/api#getchatgifts

func (*API) GetChatGiftsWithContext

func (api *API) GetChatGiftsWithContext(ctx context.Context, params GetChatGifts) (OwnedGifts, error)

GetChatGiftsWithContext is the context-aware variant of GetChatGifts. Since: Bot API 9.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getchatgifts

func (*API) GetChatMember

func (api *API) GetChatMember(params GetChatMember) (ChatMember, error)

GetChatMember returns information about a member of a chat. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchatmember

func (*API) GetChatMemberCount

func (api *API) GetChatMemberCount(params GetChatMemberCount) (int, error)

GetChatMemberCount returns the number of members in a chat. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchatmembercount

func (*API) GetChatMemberCountWithContext

func (api *API) GetChatMemberCountWithContext(ctx context.Context, params GetChatMemberCount) (int, error)

GetChatMemberCountWithContext is the context-aware variant of GetChatMemberCount. Since: Bot API 2.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getchatmembercount

func (*API) GetChatMemberWithContext

func (api *API) GetChatMemberWithContext(ctx context.Context, params GetChatMember) (ChatMember, error)

GetChatMemberWithContext is the context-aware variant of GetChatMember. Since: Bot API 2.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getchatmember

func (*API) GetChatMenuButton

func (api *API) GetChatMenuButton(params GetChatMenuButton) (MenuButton, error)

GetChatMenuButton returns the current menu button for the given chat. Since: Bot API 6.0 See https://core.telegram.org/bots/api#getchatmenubutton

func (*API) GetChatMenuButtonWithContext

func (api *API) GetChatMenuButtonWithContext(ctx context.Context, params GetChatMenuButton) (MenuButton, error)

GetChatMenuButtonWithContext is the context-aware variant of GetChatMenuButton. Since: Bot API 6.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getchatmenubutton

func (*API) GetChatWithContext

func (api *API) GetChatWithContext(ctx context.Context, params GetChat) (ChatFullInfo, error)

GetChatWithContext is the context-aware variant of GetChat. Since: Bot API 2.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getchat

func (*API) GetCustomEmojiStickers

func (api *API) GetCustomEmojiStickers(params GetCustomEmojiStickers) ([]Sticker, error)

GetCustomEmojiStickers returns information about custom emoji stickers by their IDs. Since: Bot API 6.2 See https://core.telegram.org/bots/api#getcustomemojistickers

func (*API) GetCustomEmojiStickersWithContext

func (api *API) GetCustomEmojiStickersWithContext(ctx context.Context, params GetCustomEmojiStickers) ([]Sticker, error)

GetCustomEmojiStickersWithContext is the context-aware variant of GetCustomEmojiStickers. Since: Bot API 6.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getcustomemojistickers

func (*API) GetFile

func (api *API) GetFile(params GetFile) (File, error)

GetFile returns basic information about a file and prepares it for downloading. See https://core.telegram.org/bots/api#getfile

func (api *API) GetFileByLink(link string) ([]byte, error)

GetFileByLink downloads a file from Telegram's file server using the provided file link. The link is usually obtained from File.FilePath. For large files, prefer OpenFileByLink or OpenFileByLinkWithContext to stream the response body. This unbounded helper is retained for v1 compatibility and is subject to change in v2; prefer GetFileByLinkLimit for untrusted or potentially large files. See https://core.telegram.org/bots/api#file

func (*API) GetFileByLinkLimit added in v1.2.0

func (api *API) GetFileByLinkLimit(link string, maxBytes int64) ([]byte, error)

GetFileByLinkLimit downloads at most maxBytes from Telegram's file server. It returns ErrFileTooLarge when the response exceeds the limit.

func (*API) GetFileByLinkLimitWithContext added in v1.2.0

func (api *API) GetFileByLinkLimitWithContext(ctx context.Context, link string, maxBytes int64) ([]byte, error)

GetFileByLinkLimitWithContext is the context-aware variant of GetFileByLinkLimit.

func (*API) GetFileByLinkWithContext

func (api *API) GetFileByLinkWithContext(ctx context.Context, link string) ([]byte, error)

GetFileByLinkWithContext is the context-aware variant of GetFileByLink. It executes the same request but uses ctx for cancellation and deadlines. For large files, prefer OpenFileByLinkWithContext to stream the response body. See https://core.telegram.org/bots/api#file

func (*API) GetFileWithContext

func (api *API) GetFileWithContext(ctx context.Context, params GetFile) (File, error)

GetFileWithContext is the context-aware variant of GetFile. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getfile

func (*API) GetForumTopicIconStickers

func (api *API) GetForumTopicIconStickers() ([]Sticker, error)

GetForumTopicIconStickers returns the list of custom emoji that can be used as a forum topic icon. Since: Bot API 6.3 See https://core.telegram.org/bots/api#getforumtopiciconstickers

func (*API) GetForumTopicIconStickersWithContext

func (api *API) GetForumTopicIconStickersWithContext(ctx context.Context) ([]Sticker, error)

GetForumTopicIconStickersWithContext is the context-aware variant of GetForumTopicIconStickers. Since: Bot API 6.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getforumtopiciconstickers

func (*API) GetGameHighScores

func (api *API) GetGameHighScores(params GetGameHighScores) ([]GameHighScore, error)

GetGameHighScores returns game high score data for a user. Since: Bot API 2.2 See https://core.telegram.org/bots/api#getgamehighscores

func (*API) GetGameHighScoresWithContext

func (api *API) GetGameHighScoresWithContext(ctx context.Context, params GetGameHighScores) ([]GameHighScore, error)

GetGameHighScoresWithContext is the context-aware variant of GetGameHighScores. Since: Bot API 2.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getgamehighscores

func (*API) GetLogger

func (api *API) GetLogger() *sneklog.Logger

GetLogger returns the internal logger for custom logging. See https://core.telegram.org/bots/api

func (*API) GetManagedBotAccessSettings

func (api *API) GetManagedBotAccessSettings(params GetManagedBotAccessSettings) (BotAccessSettings, error)

GetManagedBotAccessSettings returns the access settings of a managed bot. Since: Bot API 10.0 See https://core.telegram.org/bots/api#getmanagedbotaccesssettings

func (*API) GetManagedBotAccessSettingsWithContext

func (api *API) GetManagedBotAccessSettingsWithContext(ctx context.Context, params GetManagedBotAccessSettings) (BotAccessSettings, error)

GetManagedBotAccessSettingsWithContext is the context-aware variant of GetManagedBotAccessSettings. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmanagedbotaccesssettings

func (*API) GetManagedBotToken

func (api *API) GetManagedBotToken(params GetManagedBotToken) (string, error)

GetManagedBotToken returns the current token of a managed bot. See https://core.telegram.org/bots/api#getmanagedbottoken

func (*API) GetManagedBotTokenWithContext

func (api *API) GetManagedBotTokenWithContext(ctx context.Context, params GetManagedBotToken) (string, error)

GetManagedBotTokenWithContext is the context-aware variant of GetManagedBotToken. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmanagedbottoken

func (*API) GetMe

func (api *API) GetMe() (User, error)

GetMe returns basic information about the bot. See https://core.telegram.org/bots/api#getme

func (*API) GetMeWithContext

func (api *API) GetMeWithContext(ctx context.Context) (User, error)

GetMeWithContext is the context-aware variant of GetMe. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getme

func (*API) GetMyCommands

func (api *API) GetMyCommands(params GetMyCommands) ([]BotCommand, error)

GetMyCommands returns the current list of the bot's commands for the given scope and user language. Since: Bot API 4.7 See https://core.telegram.org/bots/api#getmycommands

func (*API) GetMyCommandsWithContext

func (api *API) GetMyCommandsWithContext(ctx context.Context, params GetMyCommands) ([]BotCommand, error)

GetMyCommandsWithContext is the context-aware variant of GetMyCommands. Since: Bot API 4.7 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmycommands

func (*API) GetMyDefaultAdministratorRights

func (api *API) GetMyDefaultAdministratorRights(params GetMyDefaultAdministratorRights) (ChatAdministratorRights, error)

GetMyDefaultAdministratorRights returns the current default administrator rights for the bot. Since: Bot API 6.0 See https://core.telegram.org/bots/api#getmydefaultadministratorrights

func (*API) GetMyDefaultAdministratorRightsWithContext

func (api *API) GetMyDefaultAdministratorRightsWithContext(ctx context.Context, params GetMyDefaultAdministratorRights) (ChatAdministratorRights, error)

GetMyDefaultAdministratorRightsWithContext is the context-aware variant of GetMyDefaultAdministratorRights. Since: Bot API 6.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmydefaultadministratorrights

func (*API) GetMyDescription

func (api *API) GetMyDescription(params GetMyDescription) (BotDescription, error)

GetMyDescription returns the bot's description for the given language. Since: Bot API 6.6 See https://core.telegram.org/bots/api#getmydescription

func (*API) GetMyDescriptionWithContext

func (api *API) GetMyDescriptionWithContext(ctx context.Context, params GetMyDescription) (BotDescription, error)

GetMyDescriptionWithContext is the context-aware variant of GetMyDescription. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmydescription

func (*API) GetMyName

func (api *API) GetMyName(params GetMyName) (BotName, error)

GetMyName returns the bot's name for the given language. Since: Bot API 6.7 See https://core.telegram.org/bots/api#getmyname

func (*API) GetMyNameWithContext

func (api *API) GetMyNameWithContext(ctx context.Context, params GetMyName) (BotName, error)

GetMyNameWithContext is the context-aware variant of GetMyName. Since: Bot API 6.7 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmyname

func (*API) GetMyShortDescription

func (api *API) GetMyShortDescription(params GetMyShortDescription) (BotShortDescription, error)

GetMyShortDescription returns the bot's short description for the given language. Since: Bot API 6.6 See https://core.telegram.org/bots/api#getmyshortdescription

func (*API) GetMyShortDescriptionWithContext

func (api *API) GetMyShortDescriptionWithContext(ctx context.Context, params GetMyShortDescription) (BotShortDescription, error)

GetMyShortDescriptionWithContext is the context-aware variant of GetMyShortDescription. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmyshortdescription

func (*API) GetMyStarBalance

func (api *API) GetMyStarBalance() (StarAmount, error)

GetMyStarBalance returns the bot's Telegram Star balance. Since: Bot API 7.5 See https://core.telegram.org/bots/api#getmystarbalance

func (*API) GetMyStarBalanceWithContext

func (api *API) GetMyStarBalanceWithContext(ctx context.Context) (StarAmount, error)

GetMyStarBalanceWithContext is the context-aware variant of GetMyStarBalance. Since: Bot API 7.5 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getmystarbalance

func (*API) GetStarTransactions

func (api *API) GetStarTransactions(params GetStarTransactions) (StarTransactions, error)

GetStarTransactions returns Telegram Star transactions for the bot. Since: Bot API 7.5 See https://core.telegram.org/bots/api#getstartransactions

func (*API) GetStarTransactionsWithContext

func (api *API) GetStarTransactionsWithContext(ctx context.Context, params GetStarTransactions) (StarTransactions, error)

GetStarTransactionsWithContext is the context-aware variant of GetStarTransactions. Since: Bot API 7.5 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getstartransactions

func (*API) GetStickerSet

func (api *API) GetStickerSet(params GetStickerSet) (StickerSet, error)

GetStickerSet returns a sticker set by its name. Since: Bot API 3.2 See https://core.telegram.org/bots/api#getstickerset

func (*API) GetStickerSetWithContext

func (api *API) GetStickerSetWithContext(ctx context.Context, params GetStickerSet) (StickerSet, error)

GetStickerSetWithContext is the context-aware variant of GetStickerSet. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getstickerset

func (*API) GetUpdates

func (api *API) GetUpdates(params UpdateParams) ([]Update, error)

GetUpdates receives incoming updates using long polling. See https://core.telegram.org/bots/api#getupdates

func (*API) GetUpdatesWithContext

func (api *API) GetUpdatesWithContext(ctx context.Context, params UpdateParams) ([]Update, error)

GetUpdatesWithContext is the context-aware variant of GetUpdates. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getupdates

func (*API) GetUserChatBoosts

func (api *API) GetUserChatBoosts(params GetUserChatBoosts) (UserChatBoosts, error)

GetUserChatBoosts returns the list of boosts a user has given to a chat. Since: Bot API 7.0 See https://core.telegram.org/bots/api#getuserchatboosts

func (*API) GetUserChatBoostsWithContext

func (api *API) GetUserChatBoostsWithContext(ctx context.Context, params GetUserChatBoosts) (UserChatBoosts, error)

GetUserChatBoostsWithContext is the context-aware variant of GetUserChatBoosts. Since: Bot API 7.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getuserchatboosts

func (*API) GetUserGifts

func (api *API) GetUserGifts(params GetUserGifts) (OwnedGifts, error)

GetUserGifts returns gifts owned by a user. Since: Bot API 9.3 See https://core.telegram.org/bots/api#getusergifts

func (*API) GetUserGiftsWithContext

func (api *API) GetUserGiftsWithContext(ctx context.Context, params GetUserGifts) (OwnedGifts, error)

GetUserGiftsWithContext is the context-aware variant of GetUserGifts. Since: Bot API 9.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getusergifts

func (*API) GetUserPersonalChatMessages

func (api *API) GetUserPersonalChatMessages(params GetUserPersonalChatMessages) ([]Message, error)

GetUserPersonalChatMessages returns messages from the personal chat of the user with the bot. Since: Bot API 10.0 See https://core.telegram.org/bots/api#getuserpersonalchatmessages

func (*API) GetUserPersonalChatMessagesWithContext

func (api *API) GetUserPersonalChatMessagesWithContext(ctx context.Context, params GetUserPersonalChatMessages) ([]Message, error)

GetUserPersonalChatMessagesWithContext is the context-aware variant of GetUserPersonalChatMessages. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getuserpersonalchatmessages

func (*API) GetUserProfileAudios

func (api *API) GetUserProfileAudios(params GetUserProfileAudios) (UserProfileAudios, error)

GetUserProfileAudios returns a list of profile audios for a user. Since: Bot API 9.3 See https://core.telegram.org/bots/api#getuserprofileaudios

func (*API) GetUserProfileAudiosWithContext

func (api *API) GetUserProfileAudiosWithContext(ctx context.Context, params GetUserProfileAudios) (UserProfileAudios, error)

GetUserProfileAudiosWithContext is the context-aware variant of GetUserProfileAudios. Since: Bot API 9.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getuserprofileaudios

func (*API) GetUserProfilePhotos

func (api *API) GetUserProfilePhotos(params GetUserProfilePhotos) (UserProfilePhotos, error)

GetUserProfilePhotos returns a list of profile pictures for a user. Since: Bot API 1.4 See https://core.telegram.org/bots/api#getuserprofilephotos

func (*API) GetUserProfilePhotosWithContext

func (api *API) GetUserProfilePhotosWithContext(ctx context.Context, params GetUserProfilePhotos) (UserProfilePhotos, error)

GetUserProfilePhotosWithContext is the context-aware variant of GetUserProfilePhotos. Since: Bot API 1.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getuserprofilephotos

func (*API) GetWebhookInfo

func (api *API) GetWebhookInfo() (WebhookInfo, error)

GetWebhookInfo returns the current webhook status. See https://core.telegram.org/bots/api#getwebhookinfo

func (*API) GetWebhookInfoWithContext

func (api *API) GetWebhookInfoWithContext(ctx context.Context) (WebhookInfo, error)

GetWebhookInfoWithContext is the context-aware variant of GetWebhookInfo. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#getwebhookinfo

func (*API) GiftPremiumSubscription

func (api *API) GiftPremiumSubscription(params GiftPremiumSubscription) (bool, error)

GiftPremiumSubscription gifts a Telegram Premium subscription to the user. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#giftpremiumsubscription

func (*API) GiftPremiumSubscriptionWithContext

func (api *API) GiftPremiumSubscriptionWithContext(ctx context.Context, params GiftPremiumSubscription) (bool, error)

GiftPremiumSubscriptionWithContext is the context-aware variant of GiftPremiumSubscription. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#giftpremiumsubscription

func (*API) HideGeneralForumTopic

func (api *API) HideGeneralForumTopic(params BaseGeneralForumTopic) (bool, error)

HideGeneralForumTopic hides the 'General' topic in a forum supergroup. Since: Bot API 6.4 Returns True on success. See https://core.telegram.org/bots/api#hidegeneralforumtopic

func (*API) HideGeneralForumTopicWithContext

func (api *API) HideGeneralForumTopicWithContext(ctx context.Context, params BaseGeneralForumTopic) (bool, error)

HideGeneralForumTopicWithContext is the context-aware variant of HideGeneralForumTopic. Since: Bot API 6.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#hidegeneralforumtopic

func (*API) LeaveChat

func (api *API) LeaveChat(params LeaveChat) (bool, error)

LeaveChat makes the bot leave a chat. Since: Bot API 2.1 Returns True on success. See https://core.telegram.org/bots/api#leavechat

func (*API) LeaveChatWithContext

func (api *API) LeaveChatWithContext(ctx context.Context, params LeaveChat) (bool, error)

LeaveChatWithContext is the context-aware variant of LeaveChat. Since: Bot API 2.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#leavechat

func (*API) LogOut

func (api *API) LogOut() (bool, error)

LogOut logs the bot out from the cloud Bot API server. Returns true on success. See https://core.telegram.org/bots/api#logout

func (*API) LogOutWithContext

func (api *API) LogOutWithContext(ctx context.Context) (bool, error)

LogOutWithContext is the context-aware variant of LogOut. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#logout

func (api *API) OpenFileByLink(link string) (io.ReadCloser, error)

OpenFileByLink opens a streaming response body for a file hosted on Telegram's file server. The caller must close the returned ReadCloser. See https://core.telegram.org/bots/api#file

func (*API) OpenFileByLinkWithContext

func (api *API) OpenFileByLinkWithContext(ctx context.Context, link string) (io.ReadCloser, error)

OpenFileByLinkWithContext is the context-aware variant of OpenFileByLink. The caller must close the returned ReadCloser. See https://core.telegram.org/bots/api#file

func (*API) PinChatMessage

func (api *API) PinChatMessage(params PinChatMessage) (bool, error)

PinChatMessage pins a message in a chat. Since: Bot API 3.1 Returns True on success. See https://core.telegram.org/bots/api#pinchatmessage

func (*API) PinChatMessageWithContext

func (api *API) PinChatMessageWithContext(ctx context.Context, params PinChatMessage) (bool, error)

PinChatMessageWithContext is the context-aware variant of PinChatMessage. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#pinchatmessage

func (*API) PostStory

func (api *API) PostStory(params PostStory) (Story, error)

PostStory posts a story with a photo. Since: Bot API 7.2 See https://core.telegram.org/bots/api#poststory

func (*API) PostStoryWithContext

func (api *API) PostStoryWithContext(ctx context.Context, params PostStory) (Story, error)

PostStoryWithContext is the context-aware variant of PostStory. Since: Bot API 7.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#poststory

func (*API) PromoteChatMember

func (api *API) PromoteChatMember(params PromoteChatMember) (bool, error)

PromoteChatMember promotes or demotes a user in a chat. Since: Bot API 3.1 Returns True on success. See https://core.telegram.org/bots/api#promotechatmember

func (*API) PromoteChatMemberWithContext

func (api *API) PromoteChatMemberWithContext(ctx context.Context, params PromoteChatMember) (bool, error)

PromoteChatMemberWithContext is the context-aware variant of PromoteChatMember. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#promotechatmember

func (*API) ReadBusinessMessage

func (api *API) ReadBusinessMessage(params ReadBusinessMessage) (bool, error)

ReadBusinessMessage marks a business message as read. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#readbusinessmessage

func (*API) ReadBusinessMessageWithContext

func (api *API) ReadBusinessMessageWithContext(ctx context.Context, params ReadBusinessMessage) (bool, error)

ReadBusinessMessageWithContext is the context-aware variant of ReadBusinessMessage. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#readbusinessmessage

func (*API) RefundStarPayment

func (api *API) RefundStarPayment(params RefundStarPayment) (bool, error)

RefundStarPayment refunds a successful Telegram Stars payment. Since: Bot API 7.4 Returns true on success. See https://core.telegram.org/bots/api#refundstarpayment

func (*API) RefundStarPaymentWithContext

func (api *API) RefundStarPaymentWithContext(ctx context.Context, params RefundStarPayment) (bool, error)

RefundStarPaymentWithContext is the context-aware variant of RefundStarPayment. Since: Bot API 7.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#refundstarpayment

func (*API) RemoveBusinessAccountProfilePhoto

func (api *API) RemoveBusinessAccountProfilePhoto(params RemoveBusinessAccountProfilePhoto) (bool, error)

RemoveBusinessAccountProfilePhoto removes the profile photo of a business account. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#removebusinessaccountprofilephoto

func (*API) RemoveBusinessAccountProfilePhotoWithContext

func (api *API) RemoveBusinessAccountProfilePhotoWithContext(ctx context.Context, params RemoveBusinessAccountProfilePhoto) (bool, error)

RemoveBusinessAccountProfilePhotoWithContext is the context-aware variant of RemoveBusinessAccountProfilePhoto. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#removebusinessaccountprofilephoto

func (*API) RemoveChatVerification

func (api *API) RemoveChatVerification(params RemoveChatVerification) (bool, error)

RemoveChatVerification removes a chat's verification. Since: Bot API 8.0 Returns true on success. See https://core.telegram.org/bots/api#removechatverification

func (*API) RemoveChatVerificationWithContext

func (api *API) RemoveChatVerificationWithContext(ctx context.Context, params RemoveChatVerification) (bool, error)

RemoveChatVerificationWithContext is the context-aware variant of RemoveChatVerification. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#removechatverification

func (*API) RemoveMyProfilePhoto

func (api *API) RemoveMyProfilePhoto() (bool, error)

RemoveMyProfilePhoto removes the bot's profile photo. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#removemyprofilephoto

func (*API) RemoveMyProfilePhotoWithContext

func (api *API) RemoveMyProfilePhotoWithContext(ctx context.Context) (bool, error)

RemoveMyProfilePhotoWithContext is the context-aware variant of RemoveMyProfilePhoto. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#removemyprofilephoto

func (*API) RemoveUserVerification

func (api *API) RemoveUserVerification(params RemoveUserVerification) (bool, error)

RemoveUserVerification removes a user's verification. Since: Bot API 8.0 Returns true on success. See https://core.telegram.org/bots/api#removeuserverification

func (*API) RemoveUserVerificationWithContext

func (api *API) RemoveUserVerificationWithContext(ctx context.Context, params RemoveUserVerification) (bool, error)

RemoveUserVerificationWithContext is the context-aware variant of RemoveUserVerification. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#removeuserverification

func (*API) ReopenForumTopic

func (api *API) ReopenForumTopic(params BaseForumTopic) (bool, error)

ReopenForumTopic reopens a closed forum topic. Since: Bot API 6.3 Returns True on success. See https://core.telegram.org/bots/api#reopenforumtopic

func (*API) ReopenForumTopicWithContext

func (api *API) ReopenForumTopicWithContext(ctx context.Context, params BaseForumTopic) (bool, error)

ReopenForumTopicWithContext is the context-aware variant of ReopenForumTopic. Since: Bot API 6.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#reopenforumtopic

func (*API) ReopenGeneralForumTopic

func (api *API) ReopenGeneralForumTopic(params BaseGeneralForumTopic) (bool, error)

ReopenGeneralForumTopic reopens the 'General' topic in a forum supergroup. Since: Bot API 6.4 Returns True on success. See https://core.telegram.org/bots/api#reopengeneralforumtopic

func (*API) ReopenGeneralForumTopicWithContext

func (api *API) ReopenGeneralForumTopicWithContext(ctx context.Context, params BaseGeneralForumTopic) (bool, error)

ReopenGeneralForumTopicWithContext is the context-aware variant of ReopenGeneralForumTopic. Since: Bot API 6.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#reopengeneralforumtopic

func (*API) ReplaceManagedBotToken

func (api *API) ReplaceManagedBotToken(params ReplaceManagedBotToken) (string, error)

ReplaceManagedBotToken replaces and returns the token of a managed bot. See https://core.telegram.org/bots/api#replacemanagedbottoken

func (*API) ReplaceManagedBotTokenWithContext

func (api *API) ReplaceManagedBotTokenWithContext(ctx context.Context, params ReplaceManagedBotToken) (string, error)

ReplaceManagedBotTokenWithContext is the context-aware variant of ReplaceManagedBotToken. It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#replacemanagedbottoken

func (*API) ReplaceStickerInSet

func (api *API) ReplaceStickerInSet(params ReplaceStickerInSet) (bool, error)

ReplaceStickerInSet replaces an existing sticker in a set with a new one. Since: Bot API 7.2 Returns True on success. See https://core.telegram.org/bots/api#replacestickerinset

func (*API) ReplaceStickerInSetWithContext

func (api *API) ReplaceStickerInSetWithContext(ctx context.Context, params ReplaceStickerInSet) (bool, error)

ReplaceStickerInSetWithContext is the context-aware variant of ReplaceStickerInSet. Since: Bot API 7.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#replacestickerinset

func (*API) RepostStory

func (api *API) RepostStory(params RepostStory) (Story, error)

RepostStory reposts a story from another chat. Since: Bot API 7.2 Returns the reposted story. See https://core.telegram.org/bots/api#repoststory

func (*API) RepostStoryWithContext

func (api *API) RepostStoryWithContext(ctx context.Context, params RepostStory) (Story, error)

RepostStoryWithContext is the context-aware variant of RepostStory. Since: Bot API 7.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#repoststory

func (*API) RestrictChatMember

func (api *API) RestrictChatMember(params RestrictChatMember) (bool, error)

RestrictChatMember restricts a user in a chat. Since: Bot API 3.1 Returns True on success. See https://core.telegram.org/bots/api#restrictchatmember

func (*API) RestrictChatMemberWithContext

func (api *API) RestrictChatMemberWithContext(ctx context.Context, params RestrictChatMember) (bool, error)

RestrictChatMemberWithContext is the context-aware variant of RestrictChatMember. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#restrictchatmember

func (api *API) RevokeChatInviteLink(params RevokeChatInviteLink) (ChatInviteLink, error)

RevokeChatInviteLink revokes an invite link. Since: Bot API 5.1 Returns the revoked invite link object. See https://core.telegram.org/bots/api#revokechatinvitelink

func (*API) RevokeChatInviteLinkWithContext

func (api *API) RevokeChatInviteLinkWithContext(ctx context.Context, params RevokeChatInviteLink) (ChatInviteLink, error)

RevokeChatInviteLinkWithContext is the context-aware variant of RevokeChatInviteLink. Since: Bot API 5.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#revokechatinvitelink

func (*API) SavePreparedInlineMessage

func (api *API) SavePreparedInlineMessage(params SavePreparedInlineMessage) (PreparedInlineMessage, error)

SavePreparedInlineMessage stores a prepared message for Mini App users. Since: Bot API 8.0 See https://core.telegram.org/bots/api#savepreparedinlinemessage

func (*API) SavePreparedInlineMessageWithContext

func (api *API) SavePreparedInlineMessageWithContext(ctx context.Context, params SavePreparedInlineMessage) (PreparedInlineMessage, error)

SavePreparedInlineMessageWithContext is the context-aware variant of SavePreparedInlineMessage. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#savepreparedinlinemessage

func (*API) SavePreparedKeyboardButton

func (api *API) SavePreparedKeyboardButton(params SavePreparedKeyboardButton) (PreparedKeyboardButton, error)

SavePreparedKeyboardButton stores a prepared keyboard button for Mini App users. Since: Bot API 8.0 See https://core.telegram.org/bots/api#savepreparedkeyboardbutton

func (*API) SavePreparedKeyboardButtonWithContext

func (api *API) SavePreparedKeyboardButtonWithContext(ctx context.Context, params SavePreparedKeyboardButton) (PreparedKeyboardButton, error)

SavePreparedKeyboardButtonWithContext is the context-aware variant of SavePreparedKeyboardButton. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#savepreparedkeyboardbutton

func (*API) SendAnimation

func (api *API) SendAnimation(params SendAnimation) (Message, error)

SendAnimation sends an animation file (GIF or H.264/MPEG-4 AVC video without sound). Since: Bot API 4.0 See https://core.telegram.org/bots/api#sendanimation

func (*API) SendAnimationWithContext

func (api *API) SendAnimationWithContext(ctx context.Context, params SendAnimation) (Message, error)

SendAnimationWithContext is the context-aware variant of SendAnimation. Since: Bot API 4.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendanimation

func (*API) SendAudio

func (api *API) SendAudio(params SendAudio) (Message, error)

SendAudio sends an audio file. Since: Bot API 1.2 See https://core.telegram.org/bots/api#sendaudio

func (*API) SendAudioWithContext

func (api *API) SendAudioWithContext(ctx context.Context, params SendAudio) (Message, error)

SendAudioWithContext is the context-aware variant of SendAudio. Since: Bot API 1.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendaudio

func (*API) SendChatAction

func (api *API) SendChatAction(params SendChatAction) (bool, error)

SendChatAction sends a chat action (typing, uploading photo, etc.). Since: Bot API 1.0 Returns True on success. See https://core.telegram.org/bots/api#sendchataction

func (*API) SendChatActionWithContext

func (api *API) SendChatActionWithContext(ctx context.Context, params SendChatAction) (bool, error)

SendChatActionWithContext is the context-aware variant of SendChatAction. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendchataction

func (*API) SendChatJoinRequestWebApp added in v1.1.0

func (api *API) SendChatJoinRequestWebApp(params SendChatJoinRequestWebApp) (bool, error)

SendChatJoinRequestWebApp shows a Mini App to the user before deciding a join request query; resolve the query with AnswerChatJoinRequestQuery based on the Mini App interaction. Since: Bot API 10.1 Returns True on success. See https://core.telegram.org/bots/api#sendchatjoinrequestwebapp

func (*API) SendChatJoinRequestWebAppWithContext added in v1.1.0

func (api *API) SendChatJoinRequestWebAppWithContext(ctx context.Context, params SendChatJoinRequestWebApp) (bool, error)

SendChatJoinRequestWebAppWithContext is the context-aware variant of SendChatJoinRequestWebApp. Since: Bot API 10.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendchatjoinrequestwebapp

func (*API) SendChecklist

func (api *API) SendChecklist(params SendChecklist) (Message, error)

SendChecklist sends a checklist. Since: Bot API 9.1 See https://core.telegram.org/bots/api#sendchecklist

func (*API) SendChecklistWithContext

func (api *API) SendChecklistWithContext(ctx context.Context, params SendChecklist) (Message, error)

SendChecklistWithContext is the context-aware variant of SendChecklist. Since: Bot API 9.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendchecklist

func (*API) SendContact

func (api *API) SendContact(params SendContact) (Message, error)

SendContact sends a phone contact. Since: Bot API 2.0 See https://core.telegram.org/bots/api#sendcontact

func (*API) SendContactWithContext

func (api *API) SendContactWithContext(ctx context.Context, params SendContact) (Message, error)

SendContactWithContext is the context-aware variant of SendContact. Since: Bot API 2.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendcontact

func (*API) SendDice

func (api *API) SendDice(params SendDice) (Message, error)

SendDice sends a dice, which will have a random value. Since: Bot API 4.7 See https://core.telegram.org/bots/api#senddice

func (*API) SendDiceWithContext

func (api *API) SendDiceWithContext(ctx context.Context, params SendDice) (Message, error)

SendDiceWithContext is the context-aware variant of SendDice. Since: Bot API 4.7 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#senddice

func (*API) SendDocument

func (api *API) SendDocument(params SendDocument) (Message, error)

SendDocument sends a document. Since: Bot API 1.0 See https://core.telegram.org/bots/api#senddocument

func (*API) SendDocumentWithContext

func (api *API) SendDocumentWithContext(ctx context.Context, params SendDocument) (Message, error)

SendDocumentWithContext is the context-aware variant of SendDocument. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#senddocument

func (*API) SendGame

func (api *API) SendGame(params SendGame) (Message, error)

SendGame sends a game message. Since: Bot API 2.2 See https://core.telegram.org/bots/api#sendgame

func (*API) SendGameWithContext

func (api *API) SendGameWithContext(ctx context.Context, params SendGame) (Message, error)

SendGameWithContext is the context-aware variant of SendGame. Since: Bot API 2.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendgame

func (*API) SendGift

func (api *API) SendGift(params SendGift) (bool, error)

SendGift sends a gift to the given user or chat. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#sendgift

func (*API) SendGiftWithContext

func (api *API) SendGiftWithContext(ctx context.Context, params SendGift) (bool, error)

SendGiftWithContext is the context-aware variant of SendGift. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendgift

func (*API) SendInvoice

func (api *API) SendInvoice(params SendInvoice) (Message, error)

SendInvoice sends an invoice. Since: Bot API 3.0 See https://core.telegram.org/bots/api#sendinvoice

func (*API) SendInvoiceWithContext

func (api *API) SendInvoiceWithContext(ctx context.Context, params SendInvoice) (Message, error)

SendInvoiceWithContext is the context-aware variant of SendInvoice. Since: Bot API 3.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendinvoice

func (*API) SendLivePhoto

func (api *API) SendLivePhoto(params SendLivePhoto) (Message, error)

SendLivePhoto sends a live photo. Since: Bot API 10.0 See https://core.telegram.org/bots/api#sendlivephoto

func (*API) SendLivePhotoWithContext

func (api *API) SendLivePhotoWithContext(ctx context.Context, params SendLivePhoto) (Message, error)

SendLivePhotoWithContext is the context-aware variant of SendLivePhoto. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendlivephoto

func (*API) SendLocation

func (api *API) SendLocation(params SendLocation) (Message, error)

SendLocation sends a point on the map. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendlocation

func (*API) SendLocationWithContext

func (api *API) SendLocationWithContext(ctx context.Context, params SendLocation) (Message, error)

SendLocationWithContext is the context-aware variant of SendLocation. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendlocation

func (*API) SendMediaGroup

func (api *API) SendMediaGroup(params SendMediaGroup) ([]Message, error)

SendMediaGroup sends a group of photos, videos, documents or audios as an album. Since: Bot API 3.5 See https://core.telegram.org/bots/api#sendmediagroup

func (*API) SendMediaGroupWithContext

func (api *API) SendMediaGroupWithContext(ctx context.Context, params SendMediaGroup) ([]Message, error)

SendMediaGroupWithContext is the context-aware variant of SendMediaGroup. Since: Bot API 3.5 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendmediagroup

func (*API) SendMessage

func (api *API) SendMessage(params SendMessage) (Message, error)

SendMessage sends a text message. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendmessage

func (*API) SendMessageDraft

func (api *API) SendMessageDraft(params SendMessageDraft) (bool, error)

SendMessageDraft sends or updates a draft message in the target chat. Since: Bot API 9.1 Returns True on success. See https://core.telegram.org/bots/api#sendmessagedraft

func (*API) SendMessageDraftWithContext

func (api *API) SendMessageDraftWithContext(ctx context.Context, params SendMessageDraft) (bool, error)

SendMessageDraftWithContext is the context-aware variant of SendMessageDraft. Since: Bot API 9.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendmessagedraft

func (*API) SendMessageWithContext

func (api *API) SendMessageWithContext(ctx context.Context, params SendMessage) (Message, error)

SendMessageWithContext is the context-aware variant of SendMessage. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendmessage

func (*API) SendPaidMedia

func (api *API) SendPaidMedia(params SendPaidMedia) (Message, error)

SendPaidMedia sends paid media. Since: Bot API 7.6 See https://core.telegram.org/bots/api#sendpaidmedia

func (*API) SendPaidMediaWithContext

func (api *API) SendPaidMediaWithContext(ctx context.Context, params SendPaidMedia) (Message, error)

SendPaidMediaWithContext is the context-aware variant of SendPaidMedia. Since: Bot API 7.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendpaidmedia

func (*API) SendPhoto

func (api *API) SendPhoto(params SendPhoto) (Message, error)

SendPhoto sends a photo. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendphoto

func (*API) SendPhotoWithContext

func (api *API) SendPhotoWithContext(ctx context.Context, params SendPhoto) (Message, error)

SendPhotoWithContext is the context-aware variant of SendPhoto. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendphoto

func (*API) SendPoll

func (api *API) SendPoll(params SendPoll) (Message, error)

SendPoll sends a native poll. Since: Bot API 4.2 See https://core.telegram.org/bots/api#sendpoll

func (*API) SendPollWithContext

func (api *API) SendPollWithContext(ctx context.Context, params SendPoll) (Message, error)

SendPollWithContext is the context-aware variant of SendPoll. Since: Bot API 4.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendpoll

func (*API) SendRichMessage added in v1.1.0

func (api *API) SendRichMessage(params SendRichMessage) (Message, error)

SendRichMessage sends a rich formatted message. Since: Bot API 10.1 See https://core.telegram.org/bots/api#sendrichmessage

func (*API) SendRichMessageDraft added in v1.1.0

func (api *API) SendRichMessageDraft(params SendRichMessageDraft) (bool, error)

SendRichMessageDraft streams a partial rich message to a private chat while the message is being generated. The draft is an ephemeral ~30-second preview; call SendRichMessage with the complete message to persist it. Since: Bot API 10.1 Returns True on success. See https://core.telegram.org/bots/api#sendrichmessagedraft

func (*API) SendRichMessageDraftWithContext added in v1.1.0

func (api *API) SendRichMessageDraftWithContext(ctx context.Context, params SendRichMessageDraft) (bool, error)

SendRichMessageDraftWithContext is the context-aware variant of SendRichMessageDraft. Since: Bot API 10.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendrichmessagedraft

func (*API) SendRichMessageWithContext added in v1.1.0

func (api *API) SendRichMessageWithContext(ctx context.Context, params SendRichMessage) (Message, error)

SendRichMessageWithContext is the context-aware variant of SendRichMessage. Since: Bot API 10.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendrichmessage

func (*API) SendSticker

func (api *API) SendSticker(params SendSticker) (Message, error)

SendSticker sends a static .WEBP, animated .TGS, or video .WEBM sticker. Since: Bot API 1.3 See https://core.telegram.org/bots/api#sendsticker

func (*API) SendStickerWithContext

func (api *API) SendStickerWithContext(ctx context.Context, params SendSticker) (Message, error)

SendStickerWithContext is the context-aware variant of SendSticker. Since: Bot API 1.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendsticker

func (*API) SendVenue

func (api *API) SendVenue(params SendVenue) (Message, error)

SendVenue sends information about a venue. Since: Bot API 2.0 See https://core.telegram.org/bots/api#sendvenue

func (*API) SendVenueWithContext

func (api *API) SendVenueWithContext(ctx context.Context, params SendVenue) (Message, error)

SendVenueWithContext is the context-aware variant of SendVenue. Since: Bot API 2.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendvenue

func (*API) SendVideo

func (api *API) SendVideo(params SendVideo) (Message, error)

SendVideo sends a video. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendvideo

func (*API) SendVideoNote

func (api *API) SendVideoNote(params SendVideoNote) (Message, error)

SendVideoNote sends a video note (rounded video message). Since: Bot API 3.0 See https://core.telegram.org/bots/api#sendvideonote

func (*API) SendVideoNoteWithContext

func (api *API) SendVideoNoteWithContext(ctx context.Context, params SendVideoNote) (Message, error)

SendVideoNoteWithContext is the context-aware variant of SendVideoNote. Since: Bot API 3.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendvideonote

func (*API) SendVideoWithContext

func (api *API) SendVideoWithContext(ctx context.Context, params SendVideo) (Message, error)

SendVideoWithContext is the context-aware variant of SendVideo. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendvideo

func (*API) SendVoice

func (api *API) SendVoice(params SendVoice) (Message, error)

SendVoice sends a voice note. Since: Bot API 1.2 See https://core.telegram.org/bots/api#sendvoice

func (*API) SendVoiceWithContext

func (api *API) SendVoiceWithContext(ctx context.Context, params SendVoice) (Message, error)

SendVoiceWithContext is the context-aware variant of SendVoice. Since: Bot API 1.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendvoice

func (*API) SetBusinessAccountBio

func (api *API) SetBusinessAccountBio(params SetBusinessAccountBio) (bool, error)

SetBusinessAccountBio sets the bio of a business account. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#setbusinessaccountbio

func (*API) SetBusinessAccountBioWithContext

func (api *API) SetBusinessAccountBioWithContext(ctx context.Context, params SetBusinessAccountBio) (bool, error)

SetBusinessAccountBioWithContext is the context-aware variant of SetBusinessAccountBio. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setbusinessaccountbio

func (*API) SetBusinessAccountGiftSettings

func (api *API) SetBusinessAccountGiftSettings(params SetBusinessAccountGiftSettings) (bool, error)

SetBusinessAccountGiftSettings sets gift settings for a business account. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#setbusinessaccountgiftsettings

func (*API) SetBusinessAccountGiftSettingsWithContext

func (api *API) SetBusinessAccountGiftSettingsWithContext(ctx context.Context, params SetBusinessAccountGiftSettings) (bool, error)

SetBusinessAccountGiftSettingsWithContext is the context-aware variant of SetBusinessAccountGiftSettings. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setbusinessaccountgiftsettings

func (*API) SetBusinessAccountName

func (api *API) SetBusinessAccountName(params SetBusinessAccountName) (bool, error)

SetBusinessAccountName sets the first and last name of a business account. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#setbusinessaccountname

func (*API) SetBusinessAccountNameWithContext

func (api *API) SetBusinessAccountNameWithContext(ctx context.Context, params SetBusinessAccountName) (bool, error)

SetBusinessAccountNameWithContext is the context-aware variant of SetBusinessAccountName. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setbusinessaccountname

func (*API) SetBusinessAccountProfilePhoto

func (api *API) SetBusinessAccountProfilePhoto(params SetBusinessAccountProfilePhoto) (bool, error)

SetBusinessAccountProfilePhoto sets the profile photo of a business account. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#setbusinessaccountprofilephoto

func (*API) SetBusinessAccountProfilePhotoWithContext

func (api *API) SetBusinessAccountProfilePhotoWithContext(ctx context.Context, params SetBusinessAccountProfilePhoto) (bool, error)

SetBusinessAccountProfilePhotoWithContext is the context-aware variant of SetBusinessAccountProfilePhoto. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setbusinessaccountprofilephoto

func (*API) SetBusinessAccountUsername

func (api *API) SetBusinessAccountUsername(params SetBusinessAccountUsername) (bool, error)

SetBusinessAccountUsername sets the username of a business account. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#setbusinessaccountusername

func (*API) SetBusinessAccountUsernameWithContext

func (api *API) SetBusinessAccountUsernameWithContext(ctx context.Context, params SetBusinessAccountUsername) (bool, error)

SetBusinessAccountUsernameWithContext is the context-aware variant of SetBusinessAccountUsername. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setbusinessaccountusername

func (*API) SetChatAdministratorCustomTitle

func (api *API) SetChatAdministratorCustomTitle(params SetChatAdministratorCustomTitle) (bool, error)

SetChatAdministratorCustomTitle sets a custom title for an administrator. Since: Bot API 5.0 Returns True on success. See https://core.telegram.org/bots/api#setchatadministratorcustomtitle

func (*API) SetChatAdministratorCustomTitleWithContext

func (api *API) SetChatAdministratorCustomTitleWithContext(ctx context.Context, params SetChatAdministratorCustomTitle) (bool, error)

SetChatAdministratorCustomTitleWithContext is the context-aware variant of SetChatAdministratorCustomTitle. Since: Bot API 5.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchatadministratorcustomtitle

func (*API) SetChatDescription

func (api *API) SetChatDescription(params SetChatDescription) (bool, error)

SetChatDescription changes the chat description. Since: Bot API 3.1 Returns True on success. See https://core.telegram.org/bots/api#setchatdescription

func (*API) SetChatDescriptionWithContext

func (api *API) SetChatDescriptionWithContext(ctx context.Context, params SetChatDescription) (bool, error)

SetChatDescriptionWithContext is the context-aware variant of SetChatDescription. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchatdescription

func (*API) SetChatMemberTag

func (api *API) SetChatMemberTag(params SetChatMemberTag) (bool, error)

SetChatMemberTag sets a tag for a chat member. Since: Bot API 9.5 Returns True on success. See https://core.telegram.org/bots/api#setchatmembertag

func (*API) SetChatMemberTagWithContext

func (api *API) SetChatMemberTagWithContext(ctx context.Context, params SetChatMemberTag) (bool, error)

SetChatMemberTagWithContext is the context-aware variant of SetChatMemberTag. Since: Bot API 9.5 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchatmembertag

func (*API) SetChatMenuButton

func (api *API) SetChatMenuButton(params SetChatMenuButton) (bool, error)

SetChatMenuButton changes the menu button for a given chat or the default menu button. Since: Bot API 6.0 Returns true on success. See https://core.telegram.org/bots/api#setchatmenubutton

func (*API) SetChatMenuButtonWithContext

func (api *API) SetChatMenuButtonWithContext(ctx context.Context, params SetChatMenuButton) (bool, error)

SetChatMenuButtonWithContext is the context-aware variant of SetChatMenuButton. Since: Bot API 6.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchatmenubutton

func (*API) SetChatPermissions

func (api *API) SetChatPermissions(params SetChatPermissions) (bool, error)

SetChatPermissions sets default chat permissions for all members. Since: Bot API 4.4 Returns True on success. See https://core.telegram.org/bots/api#setchatpermissions

func (*API) SetChatPermissionsWithContext

func (api *API) SetChatPermissionsWithContext(ctx context.Context, params SetChatPermissions) (bool, error)

SetChatPermissionsWithContext is the context-aware variant of SetChatPermissions. Since: Bot API 4.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchatpermissions

func (*API) SetChatPhoto

func (api *API) SetChatPhoto(params SetChatPhoto, photo UploaderFile) (bool, error)

SetChatPhoto changes the chat photo. Since: Bot API 3.1 photo is the file to upload as the new photo. Returns True on success. See https://core.telegram.org/bots/api#setchatphoto

func (*API) SetChatPhotoWithContext added in v1.2.0

func (api *API) SetChatPhotoWithContext(ctx context.Context, params SetChatPhoto, photo UploaderFile) (bool, error)

SetChatPhotoWithContext changes the chat photo using ctx for cancellation and deadlines. Since: Bot API 3.1 photo is the file to upload as the new photo. Returns True on success. See https://core.telegram.org/bots/api#setchatphoto

func (*API) SetChatStickerSet

func (api *API) SetChatStickerSet(params SetChatStickerSet) (bool, error)

SetChatStickerSet associates a sticker set with a supergroup. Since: Bot API 3.2 Returns True on success. See https://core.telegram.org/bots/api#setchatstickerset

func (*API) SetChatStickerSetWithContext

func (api *API) SetChatStickerSetWithContext(ctx context.Context, params SetChatStickerSet) (bool, error)

SetChatStickerSetWithContext is the context-aware variant of SetChatStickerSet. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchatstickerset

func (*API) SetChatTitle

func (api *API) SetChatTitle(params SetChatTitle) (bool, error)

SetChatTitle changes the chat title. Since: Bot API 3.1 Returns True on success. See https://core.telegram.org/bots/api#setchattitle

func (*API) SetChatTitleWithContext

func (api *API) SetChatTitleWithContext(ctx context.Context, params SetChatTitle) (bool, error)

SetChatTitleWithContext is the context-aware variant of SetChatTitle. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchattitle

func (*API) SetCustomEmojiStickerSetThumbnail

func (api *API) SetCustomEmojiStickerSetThumbnail(params SetCustomEmojiStickerSetThumbnail) (bool, error)

SetCustomEmojiStickerSetThumbnail sets the thumbnail of a custom emoji sticker set. Since: Bot API 6.6 Returns True on success. See https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail

func (*API) SetCustomEmojiStickerSetThumbnailWithContext

func (api *API) SetCustomEmojiStickerSetThumbnailWithContext(ctx context.Context, params SetCustomEmojiStickerSetThumbnail) (bool, error)

SetCustomEmojiStickerSetThumbnailWithContext is the context-aware variant of SetCustomEmojiStickerSetThumbnail. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail

func (*API) SetGameScore

func (api *API) SetGameScore(params SetGameScore) (Message, bool, error)

SetGameScore sets a user's score in a game message. Since: Bot API 2.2 If inline_message_id is provided, returns a boolean success flag. Otherwise returns the edited Message. See https://core.telegram.org/bots/api#setgamescore

func (*API) SetGameScoreWithContext

func (api *API) SetGameScoreWithContext(ctx context.Context, params SetGameScore) (Message, bool, error)

SetGameScoreWithContext is the context-aware variant of SetGameScore. Since: Bot API 2.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setgamescore

func (*API) SetManagedBotAccessSettings

func (api *API) SetManagedBotAccessSettings(params SetManagedBotAccessSettings) (bool, error)

SetManagedBotAccessSettings changes the access settings of a managed bot. Since: Bot API 10.0 Returns True on success. See https://core.telegram.org/bots/api#setmanagedbotaccesssettings

func (*API) SetManagedBotAccessSettingsWithContext

func (api *API) SetManagedBotAccessSettingsWithContext(ctx context.Context, params SetManagedBotAccessSettings) (bool, error)

SetManagedBotAccessSettingsWithContext is the context-aware variant of SetManagedBotAccessSettings. Since: Bot API 10.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmanagedbotaccesssettings

func (*API) SetMessageReaction

func (api *API) SetMessageReaction(params SetMessageReaction) (bool, error)

SetMessageReaction changes the chosen reaction on a message. Since: Bot API 7.0 Returns True on success. See https://core.telegram.org/bots/api#setmessagereaction

func (*API) SetMessageReactionWithContext

func (api *API) SetMessageReactionWithContext(ctx context.Context, params SetMessageReaction) (bool, error)

SetMessageReactionWithContext is the context-aware variant of SetMessageReaction. Since: Bot API 7.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmessagereaction

func (*API) SetMyCommands

func (api *API) SetMyCommands(params SetMyCommands) (bool, error)

SetMyCommands changes the list of the bot's commands. Since: Bot API 4.7 Returns true on success. See https://core.telegram.org/bots/api#setmycommands

func (*API) SetMyCommandsWithContext

func (api *API) SetMyCommandsWithContext(ctx context.Context, params SetMyCommands) (bool, error)

SetMyCommandsWithContext is the context-aware variant of SetMyCommands. Since: Bot API 4.7 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmycommands

func (*API) SetMyDefaultAdministratorRights

func (api *API) SetMyDefaultAdministratorRights(params SetMyDefaultAdministratorRights) (bool, error)

SetMyDefaultAdministratorRights changes the default administrator rights for the bot. Since: Bot API 6.0 Returns true on success. See https://core.telegram.org/bots/api#setmydefaultadministratorrights

func (*API) SetMyDefaultAdministratorRightsWithContext

func (api *API) SetMyDefaultAdministratorRightsWithContext(ctx context.Context, params SetMyDefaultAdministratorRights) (bool, error)

SetMyDefaultAdministratorRightsWithContext is the context-aware variant of SetMyDefaultAdministratorRights. Since: Bot API 6.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmydefaultadministratorrights

func (*API) SetMyDescription

func (api *API) SetMyDescription(params SetMyDescription) (bool, error)

SetMyDescription changes the bot's description. Since: Bot API 6.6 Returns true on success. See https://core.telegram.org/bots/api#setmydescription

func (*API) SetMyDescriptionWithContext

func (api *API) SetMyDescriptionWithContext(ctx context.Context, params SetMyDescription) (bool, error)

SetMyDescriptionWithContext is the context-aware variant of SetMyDescription. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmydescription

func (*API) SetMyName

func (api *API) SetMyName(params SetMyName) (bool, error)

SetMyName changes the bot's name. Since: Bot API 6.7 Returns true on success. See https://core.telegram.org/bots/api#setmyname

func (*API) SetMyNameWithContext

func (api *API) SetMyNameWithContext(ctx context.Context, params SetMyName) (bool, error)

SetMyNameWithContext is the context-aware variant of SetMyName. Since: Bot API 6.7 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmyname

func (*API) SetMyProfilePhoto

func (api *API) SetMyProfilePhoto(params SetMyProfilePhoto) (bool, error)

SetMyProfilePhoto changes the bot's profile photo. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#setmyprofilephoto

func (*API) SetMyProfilePhotoWithContext

func (api *API) SetMyProfilePhotoWithContext(ctx context.Context, params SetMyProfilePhoto) (bool, error)

SetMyProfilePhotoWithContext is the context-aware variant of SetMyProfilePhoto. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmyprofilephoto

func (*API) SetMyShortDescription

func (api *API) SetMyShortDescription(params SetMyShortDescription) (bool, error)

SetMyShortDescription changes the bot's short description. Since: Bot API 6.6 Returns true on success. See https://core.telegram.org/bots/api#setmyshortdescription

func (*API) SetMyShortDescriptionWithContext

func (api *API) SetMyShortDescriptionWithContext(ctx context.Context, params SetMyShortDescription) (bool, error)

SetMyShortDescriptionWithContext is the context-aware variant of SetMyShortDescription. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setmyshortdescription

func (*API) SetPassportDataErrors

func (api *API) SetPassportDataErrors(params SetPassportDataErrors) (bool, error)

SetPassportDataErrors informs a user about Telegram Passport data errors. Since: Bot API 4.0 Returns true on success. See https://core.telegram.org/bots/api#setpassportdataerrors

func (*API) SetPassportDataErrorsWithContext

func (api *API) SetPassportDataErrorsWithContext(ctx context.Context, params SetPassportDataErrors) (bool, error)

SetPassportDataErrorsWithContext is the context-aware variant of SetPassportDataErrors. Since: Bot API 4.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setpassportdataerrors

func (*API) SetStickerEmojiList

func (api *API) SetStickerEmojiList(params SetStickerEmojiList) (bool, error)

SetStickerEmojiList changes the list of emoji associated with a sticker. Since: Bot API 6.6 Returns True on success. See https://core.telegram.org/bots/api#setstickeremojilist

func (*API) SetStickerEmojiListWithContext

func (api *API) SetStickerEmojiListWithContext(ctx context.Context, params SetStickerEmojiList) (bool, error)

SetStickerEmojiListWithContext is the context-aware variant of SetStickerEmojiList. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setstickeremojilist

func (*API) SetStickerKeywords

func (api *API) SetStickerKeywords(params SetStickerKeywords) (bool, error)

SetStickerKeywords changes the keywords of a sticker. Since: Bot API 6.6 Returns True on success. See https://core.telegram.org/bots/api#setstickerkeywords

func (*API) SetStickerKeywordsWithContext

func (api *API) SetStickerKeywordsWithContext(ctx context.Context, params SetStickerKeywords) (bool, error)

SetStickerKeywordsWithContext is the context-aware variant of SetStickerKeywords. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setstickerkeywords

func (*API) SetStickerMaskPosition

func (api *API) SetStickerMaskPosition(params SetStickerMaskPosition) (bool, error)

SetStickerMaskPosition changes the mask position of a mask sticker. Since: Bot API 6.6 Returns True on success. See https://core.telegram.org/bots/api#setstickermaskposition

func (*API) SetStickerMaskPositionWithContext

func (api *API) SetStickerMaskPositionWithContext(ctx context.Context, params SetStickerMaskPosition) (bool, error)

SetStickerMaskPositionWithContext is the context-aware variant of SetStickerMaskPosition. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setstickermaskposition

func (*API) SetStickerPositionInSet

func (api *API) SetStickerPositionInSet(params SetStickerPositionInSet) (bool, error)

SetStickerPositionInSet moves a sticker in a set to a specific position. Since: Bot API 3.2 Returns True on success. See https://core.telegram.org/bots/api#setstickerpositioninset

func (*API) SetStickerPositionInSetWithContext

func (api *API) SetStickerPositionInSetWithContext(ctx context.Context, params SetStickerPositionInSet) (bool, error)

SetStickerPositionInSetWithContext is the context-aware variant of SetStickerPositionInSet. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setstickerpositioninset

func (*API) SetStickerSetThumbnail

func (api *API) SetStickerSetThumbnail(params SetStickerSetThumbnail) (bool, error)

SetStickerSetThumbnail sets the thumbnail of a sticker set. Since: Bot API 6.6 Returns True on success. See https://core.telegram.org/bots/api#setstickersetthumbnail

func (*API) SetStickerSetThumbnailWithContext

func (api *API) SetStickerSetThumbnailWithContext(ctx context.Context, params SetStickerSetThumbnail) (bool, error)

SetStickerSetThumbnailWithContext is the context-aware variant of SetStickerSetThumbnail. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setstickersetthumbnail

func (*API) SetStickerSetTitle

func (api *API) SetStickerSetTitle(params SetStickerSetTitle) (bool, error)

SetStickerSetTitle sets the title of a sticker set created by the bot. Since: Bot API 6.6 Returns True on success. See https://core.telegram.org/bots/api#setstickersettitle

func (*API) SetStickerSetTitleWithContext

func (api *API) SetStickerSetTitleWithContext(ctx context.Context, params SetStickerSetTitle) (bool, error)

SetStickerSetTitleWithContext is the context-aware variant of SetStickerSetTitle. Since: Bot API 6.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setstickersettitle

func (*API) SetUserEmojiStatus

func (api *API) SetUserEmojiStatus(params SetUserEmojiStatus) (bool, error)

SetUserEmojiStatus sets a custom emoji status for a user. Since: Bot API 8.0 Returns true on success. See https://core.telegram.org/bots/api#setuseremojistatus

func (*API) SetUserEmojiStatusWithContext

func (api *API) SetUserEmojiStatusWithContext(ctx context.Context, params SetUserEmojiStatus) (bool, error)

SetUserEmojiStatusWithContext is the context-aware variant of SetUserEmojiStatus. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setuseremojistatus

func (*API) SetWebhook

func (api *API) SetWebhook(params SetWebhook) (bool, error)

SetWebhook sets a webhook URL for incoming updates. For certificate upload, use Uploader.SetWebhook. Returns true on success. See https://core.telegram.org/bots/api#setwebhook

func (*API) SetWebhookWithContext

func (api *API) SetWebhookWithContext(ctx context.Context, params SetWebhook) (bool, error)

SetWebhookWithContext is the context-aware variant of SetWebhook. It executes the same request but uses ctx for cancellation and deadlines. For certificate upload, use Uploader.SetWebhook. See https://core.telegram.org/bots/api#setwebhook

func (*API) StopMessageLiveLocation

func (api *API) StopMessageLiveLocation(params StopMessageLiveLocation) (Message, bool, error)

StopMessageLiveLocation stops a live location message. Since: Bot API 3.4 If inline_message_id is provided, returns a boolean success flag; otherwise returns the edited Message. See https://core.telegram.org/bots/api#stopmessagelivelocation

func (*API) StopMessageLiveLocationWithContext

func (api *API) StopMessageLiveLocationWithContext(ctx context.Context, params StopMessageLiveLocation) (Message, bool, error)

StopMessageLiveLocationWithContext is the context-aware variant of StopMessageLiveLocation. Since: Bot API 3.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#stopmessagelivelocation

func (*API) StopPoll

func (api *API) StopPoll(params StopPoll) (Poll, error)

StopPoll stops a poll that was sent by the bot. Since: Bot API 4.2 Returns the stopped Poll. See https://core.telegram.org/bots/api#stoppoll

func (*API) StopPollWithContext

func (api *API) StopPollWithContext(ctx context.Context, params StopPoll) (Poll, error)

StopPollWithContext is the context-aware variant of StopPoll. Since: Bot API 4.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#stoppoll

func (*API) TransferBusinessAccountStars

func (api *API) TransferBusinessAccountStars(params TransferBusinessAccountStars) (bool, error)

TransferBusinessAccountStars transfers stars from a business account. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#transferbusinessaccountstars

func (*API) TransferBusinessAccountStarsWithContext

func (api *API) TransferBusinessAccountStarsWithContext(ctx context.Context, params TransferBusinessAccountStars) (bool, error)

TransferBusinessAccountStarsWithContext is the context-aware variant of TransferBusinessAccountStars. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#transferbusinessaccountstars

func (*API) TransferGift

func (api *API) TransferGift(params TransferGift) (bool, error)

TransferGift transfers a gift to another chat. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#transfergift

func (*API) TransferGiftWithContext

func (api *API) TransferGiftWithContext(ctx context.Context, params TransferGift) (bool, error)

TransferGiftWithContext is the context-aware variant of TransferGift. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#transfergift

func (*API) UnbanChatMember

func (api *API) UnbanChatMember(params UnbanChatMember) (bool, error)

UnbanChatMember unbans a previously banned user in a chat. Since: Bot API 2.0 Returns True on success. See https://core.telegram.org/bots/api#unbanchatmember

func (*API) UnbanChatMemberWithContext

func (api *API) UnbanChatMemberWithContext(ctx context.Context, params UnbanChatMember) (bool, error)

UnbanChatMemberWithContext is the context-aware variant of UnbanChatMember. Since: Bot API 2.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#unbanchatmember

func (*API) UnbanChatSenderChat

func (api *API) UnbanChatSenderChat(params UnbanChatSenderChat) (bool, error)

UnbanChatSenderChat unbans a previously banned channel chat. Since: Bot API 5.6 Returns True on success. See https://core.telegram.org/bots/api#unbanchatsenderchat

func (*API) UnbanChatSenderChatWithContext

func (api *API) UnbanChatSenderChatWithContext(ctx context.Context, params UnbanChatSenderChat) (bool, error)

UnbanChatSenderChatWithContext is the context-aware variant of UnbanChatSenderChat. Since: Bot API 5.6 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#unbanchatsenderchat

func (*API) UnhideGeneralForumTopic

func (api *API) UnhideGeneralForumTopic(params BaseGeneralForumTopic) (bool, error)

UnhideGeneralForumTopic unhides the 'General' topic in a forum supergroup. Since: Bot API 6.4 Returns True on success. See https://core.telegram.org/bots/api#unhidegeneralforumtopic

func (*API) UnhideGeneralForumTopicWithContext

func (api *API) UnhideGeneralForumTopicWithContext(ctx context.Context, params BaseGeneralForumTopic) (bool, error)

UnhideGeneralForumTopicWithContext is the context-aware variant of UnhideGeneralForumTopic. Since: Bot API 6.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#unhidegeneralforumtopic

func (*API) UnpinAllChatMessages

func (api *API) UnpinAllChatMessages(params UnpinAllChatMessages) (bool, error)

UnpinAllChatMessages unpins all pinned messages in a chat. Since: Bot API 5.0 Returns True on success. See https://core.telegram.org/bots/api#unpinallchatmessages

func (*API) UnpinAllChatMessagesWithContext

func (api *API) UnpinAllChatMessagesWithContext(ctx context.Context, params UnpinAllChatMessages) (bool, error)

UnpinAllChatMessagesWithContext is the context-aware variant of UnpinAllChatMessages. Since: Bot API 5.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#unpinallchatmessages

func (*API) UnpinAllForumTopicMessages

func (api *API) UnpinAllForumTopicMessages(params BaseForumTopic) (bool, error)

UnpinAllForumTopicMessages clears the list of pinned messages in a forum topic. Since: Bot API 6.3 Returns True on success. See https://core.telegram.org/bots/api#unpinallforumtopicmessages

func (*API) UnpinAllForumTopicMessagesWithContext

func (api *API) UnpinAllForumTopicMessagesWithContext(ctx context.Context, params BaseForumTopic) (bool, error)

UnpinAllForumTopicMessagesWithContext is the context-aware variant of UnpinAllForumTopicMessages. Since: Bot API 6.3 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#unpinallforumtopicmessages

func (*API) UnpinAllGeneralForumTopicMessages

func (api *API) UnpinAllGeneralForumTopicMessages(params BaseGeneralForumTopic) (bool, error)

UnpinAllGeneralForumTopicMessages clears the list of pinned messages in the 'General' topic. Since: Bot API 6.4 Returns True on success. See https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages

func (*API) UnpinAllGeneralForumTopicMessagesWithContext

func (api *API) UnpinAllGeneralForumTopicMessagesWithContext(ctx context.Context, params BaseGeneralForumTopic) (bool, error)

UnpinAllGeneralForumTopicMessagesWithContext is the context-aware variant of UnpinAllGeneralForumTopicMessages. Since: Bot API 6.4 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages

func (*API) UnpinChatMessage

func (api *API) UnpinChatMessage(params UnpinChatMessage) (bool, error)

UnpinChatMessage unpins a message in a chat. Since: Bot API 3.1 Returns True on success. See https://core.telegram.org/bots/api#unpinchatmessage

func (*API) UnpinChatMessageWithContext

func (api *API) UnpinChatMessageWithContext(ctx context.Context, params UnpinChatMessage) (bool, error)

UnpinChatMessageWithContext is the context-aware variant of UnpinChatMessage. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#unpinchatmessage

func (*API) UpgradeGift

func (api *API) UpgradeGift(params UpgradeGift) (bool, error)

UpgradeGift upgrades a gift. Since: Bot API 9.0 Returns true on success. See https://core.telegram.org/bots/api#upgradegift

func (*API) UpgradeGiftWithContext

func (api *API) UpgradeGiftWithContext(ctx context.Context, params UpgradeGift) (bool, error)

UpgradeGiftWithContext is the context-aware variant of UpgradeGift. Since: Bot API 9.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#upgradegift

func (*API) UploadStickerFile

func (api *API) UploadStickerFile(params UploadStickerFile, sticker UploaderFile) (File, error)

UploadStickerFile uploads a sticker file for later use in sticker set methods. Since: Bot API 3.2 sticker is the file to upload. See https://core.telegram.org/bots/api#uploadstickerfile

func (*API) UploadStickerFileWithContext

func (api *API) UploadStickerFileWithContext(ctx context.Context, params UploadStickerFile, sticker UploaderFile) (File, error)

UploadStickerFileWithContext is the context-aware variant of UploadStickerFile. Since: Bot API 3.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#uploadstickerfile

func (*API) VerifyChat

func (api *API) VerifyChat(params VerifyChat) (bool, error)

VerifyChat verifies a chat. Since: Bot API 8.0 Returns true on success. See https://core.telegram.org/bots/api#verifychat

func (*API) VerifyChatWithContext

func (api *API) VerifyChatWithContext(ctx context.Context, params VerifyChat) (bool, error)

VerifyChatWithContext is the context-aware variant of VerifyChat. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#verifychat

func (*API) VerifyUser

func (api *API) VerifyUser(params VerifyUser) (bool, error)

VerifyUser verifies a user. Since: Bot API 8.0 Returns true on success. See https://core.telegram.org/bots/api#verifyuser

func (*API) VerifyUserWithContext

func (api *API) VerifyUserWithContext(ctx context.Context, params VerifyUser) (bool, error)

VerifyUserWithContext is the context-aware variant of VerifyUser. Since: Bot API 8.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#verifyuser

type APIOpts

type APIOpts struct {
	// contains filtered or unexported fields
}

APIOpts holds configuration options for initializing the Telegram API client. Use the provided setter methods to build options — do not construct directly.

func NewAPIOpts

func NewAPIOpts(token string) *APIOpts

NewAPIOpts creates a new APIOpts with default values. Use setter methods to customize behavior.

func (*APIOpts) SetAPIURL

func (opts *APIOpts) SetAPIURL(apiURL string) *APIOpts

SetAPIURL overrides the default Telegram API URL. Useful for self-hosted bots or proxies.

func (*APIOpts) SetDropRateLimitOverflow

func (opts *APIOpts) SetDropRateLimitOverflow(b bool) *APIOpts

SetDropRateLimitOverflow enables "drop mode" for rate limiting. If true, requests exceeding limits return ErrDropOverflow immediately. If false, requests block until capacity is available.

func (*APIOpts) SetHTTPClient

func (opts *APIOpts) SetHTTPClient(client *http.Client) *APIOpts

SetHTTPClient sets a custom HTTP client. Use this for timeouts, proxies, or custom transport. If not set, a default client with 45s timeout is used.

func (*APIOpts) SetLimiter

func (opts *APIOpts) SetLimiter(limiter *utils.RateLimiter) *APIOpts

SetLimiter sets a rate limiter to enforce Telegram's API limits. Recommended: use utils.NewRateLimiter() for correct per-chat and global throttling.

func (*APIOpts) SetLogFormat

func (opts *APIOpts) SetLogFormat(format utils.LogFormat) *APIOpts

SetLogFormat sets the output format used by API-managed loggers.

func (*APIOpts) SetLogFormatter

func (opts *APIOpts) SetLogFormatter(formatter *sneklog.Formatter) *APIOpts

SetLogFormatter sets the formatter used by API-managed logger writers.

func (*APIOpts) SetMaxRetries added in v1.2.0

func (opts *APIOpts) SetMaxRetries(maxRetries int) *APIOpts

SetMaxRetries sets the maximum number of retries after Telegram returns 429. A non-positive value disables automatic retries. The default is 3.

func (*APIOpts) UseTestServer

func (opts *APIOpts) UseTestServer(use bool) *APIOpts

UseTestServer enables use of Telegram's test server (https://api.test.telegram.org). Only for development/testing.

type AcceptedGiftTypes

type AcceptedGiftTypes struct {
	// UnlimitedGifts True, if unlimited regular gifts are accepted
	UnlimitedGifts bool `json:"unlimited_gifts"`
	// LimitedGifts True, if limited regular gifts are accepted
	LimitedGifts bool `json:"limited_gifts"`
	// UniqueGifts True, if unique gifts or gifts that can be upgraded to unique for free are accepted
	UniqueGifts bool `json:"unique_gifts"`
	// PremiumSubscription True, if a Telegram Premium subscription is accepted
	PremiumSubscription bool `json:"premium_subscription"`
	// GiftsFromChannels True, if transfers of unique gifts from channels are accepted
	GiftsFromChannels bool `json:"gifts_from_channels"`
}

AcceptedGiftTypes represents the types of gifts accepted by a user or chat. Since: Bot API 9.0

type AddStickerToSet

type AddStickerToSet struct {
	// UserID Required. User identifier of sticker set owner
	UserID int64 `json:"user_id"`
	// Name Required. Sticker set name
	Name string `json:"name"`
	// Sticker Required. A JSON-serialized object with information about the added sticker. If exactly the same
	// sticker had already been added to the set, then the set isn't changed.
	Sticker InputSticker `json:"sticker"`
}

AddStickerToSet holds parameters for the addStickerToSet method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#addstickertoset

type Animation

type Animation struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Width Video width as defined by the sender
	Width int `json:"width"`
	// Height Video height as defined by the sender
	Height int `json:"height"`
	// Duration Duration of the video in seconds as defined by the sender
	Duration int `json:"duration"`

	// Thumbnail Optional. Animation thumbnail as defined by the sender
	Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
	// FileName Optional. Original animation filename as defined by the sender
	FileName string `json:"file_name"`
	// MimeType Optional. MIME type of the file as defined by the sender
	MimeType string `json:"mime_type"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int `json:"file_size"`
}

Animation represents an animation file (GIF or H.264/MPEG-4 AVC without sound). Since: Bot API 4.0

type AnswerCallbackQuery

type AnswerCallbackQuery struct {
	// CallbackQueryID Required. Unique identifier for the query to be answered
	CallbackQueryID string `json:"callback_query_id"`
	// Text Optional. Text of the notification. If not specified, nothing will be shown to the user, 0-200
	// characters.
	Text string `json:"text,omitempty"`
	// ShowAlert Optional. If True, an alert will be shown by the client instead of a notification at the top of
	// the chat screen. Defaults to False.
	ShowAlert bool `json:"show_alert,omitempty"`
	// URL Optional. URL that will be opened by the user's client. If you have created a Game and accepted the
	// conditions via @BotFather, specify the URL that opens your game - note that this will only work if the
	// query comes from a callback_game button. Otherwise, you may use links like t.me/your_bot?start=XXXX that
	// open your bot with a parameter.
	URL string `json:"url,omitempty"`
	// CacheTime Optional. The maximum amount of time in seconds that the result of the callback query may be
	// cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
	CacheTime int `json:"cache_time,omitempty"`
}

AnswerCallbackQuery holds parameters for the answerCallbackQuery method. Since: Bot API 2.0 See https://core.telegram.org/bots/api#answercallbackquery

type AnswerChatJoinRequestQuery added in v1.1.0

type AnswerChatJoinRequestQuery struct {
	// ChatJoinRequestQueryID identifies the chat join request query.
	ChatJoinRequestQueryID string `json:"chat_join_request_query_id"`
	// Result contains the decision for the join request query.
	Result ChatJoinRequestQueryResult `json:"result"`
}

AnswerChatJoinRequestQuery holds parameters for the answerChatJoinRequestQuery method. Since: Bot API 10.1 See https://core.telegram.org/bots/api#answerchatjoinrequestquery

type AnswerGuestQuery

type AnswerGuestQuery struct {
	// GuestQueryID Required. Unique identifier for the query to be answered
	GuestQueryID string `json:"guest_query_id"`
	// Result Required. A JSON-serialized object describing the message to be sent
	Result InlineQueryResult `json:"result"`
}

AnswerGuestQuery holds parameters for the answerGuestQuery method. Since: Bot API 10.0 See https://core.telegram.org/bots/api#answerguestquery

type AnswerInlineQuery

type AnswerInlineQuery struct {
	// InlineQueryID Required. Unique identifier for the answered query
	InlineQueryID string `json:"inline_query_id"`
	// Results Required. A JSON-serialized Array of results for the inline query
	Results []InlineQueryResult `json:"results"`
	// CacheTime Optional. The maximum amount of time in seconds that the result of the inline query may be
	// cached on the server. Defaults to 300.
	CacheTime int `json:"cache_time,omitempty"`
	// IsPersonal Optional. Pass True if results may be cached on the server side only for the user that sent
	// the query. By default, results may be returned to any user who sends the same query.
	IsPersonal bool `json:"is_personal,omitempty"`
	// NextOffset Optional. Pass the offset that a client should send in the next query with the same text to
	// receive more results. Pass an empty string if there are no more results or if you don't support
	// pagination. Offset length can't exceed 64 bytes.
	NextOffset string `json:"next_offset,omitempty"`
	// Button Optional. A JSON-serialized object describing a button to be shown above inline query results
	Button *InlineQueryResultsButton `json:"button,omitempty"`
}

AnswerInlineQuery holds parameters for the answerInlineQuery method. Since: Bot API 1.7 See https://core.telegram.org/bots/api#answerinlinequery

type AnswerPreCheckoutQuery

type AnswerPreCheckoutQuery struct {
	// PreCheckoutQueryID Required. Unique identifier for the query to be answered
	PreCheckoutQueryID string `json:"pre_checkout_query_id"`
	// OK Required. Specify True if everything is alright (goods are available, etc.) and the bot is ready to
	// proceed with the order. Use False if there are any problems.
	OK bool `json:"ok"`
	// ErrorMessage Optional. Required if ok is False. Error message in human readable form that explains the
	// reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our
	// amazing black T-shirts while you were busy filling out your payment details. Please choose a different
	// color or garment!"). Telegram will display this message to the user.
	ErrorMessage string `json:"error_message,omitempty"`
}

AnswerPreCheckoutQuery holds parameters for the answerPreCheckoutQuery method. Since: Bot API 3.0 See https://core.telegram.org/bots/api#answerprecheckoutquery

type AnswerShippingQuery

type AnswerShippingQuery struct {
	// ShippingQueryID Required. Unique identifier for the query to be answered
	ShippingQueryID string `json:"shipping_query_id"`
	// OK Required. Pass True if delivery to the specified address is possible and False if there are any
	// problems (for example, if delivery to the specified address is not possible)
	OK bool `json:"ok"`
	// ShippingOptions Optional. Required if ok is True. A JSON-serialized Array of available shipping options.
	ShippingOptions []ShippingOption `json:"shipping_options,omitempty"`
	// ErrorMessage Optional. Required if ok is False. Error message in human readable form that explains why it
	// is impossible to complete the order (e.g. “Sorry, delivery to your desired address is unavailable”).
	// Telegram will display this message to the user.
	ErrorMessage string `json:"error_message,omitempty"`
}

AnswerShippingQuery holds parameters for the answerShippingQuery method. Since: Bot API 3.0 See https://core.telegram.org/bots/api#answershippingquery

type AnswerWebAppQuery

type AnswerWebAppQuery struct {
	// WebAppQueryID Required. Unique identifier for the query to be answered
	WebAppQueryID string `json:"web_app_query_id"`
	// Result Required. A JSON-serialized object describing the message to be sent
	Result InlineQueryResult `json:"result"`
}

AnswerWebAppQuery holds parameters for the answerWebAppQuery method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#answerwebappquery

type ApproveChatJoinRequest

type ApproveChatJoinRequest struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
}

ApproveChatJoinRequest holds parameters for the approveChatJoinRequest method. Since: Bot API 5.4 See https://core.telegram.org/bots/api#approvechatjoinrequest

type ApproveSuggestedPost

type ApproveSuggestedPost struct {
	// ChatID Required. Unique identifier for the target direct messages chat
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Identifier of a suggested post message to approve
	MessageID int `json:"message_id"`
	// SendDate Optional. Point in time (Unix timestamp) when the post is expected to be published; omit if the
	// date has already been specified when the suggested post was created. If specified, then the date must be
	// not more than 2678400 seconds (30 days) in the future.
	SendDate int `json:"send_date,omitempty"`
}

ApproveSuggestedPost holds parameters for the approveSuggestedPost method. Since: Bot API 9.2 See https://core.telegram.org/bots/api#approvesuggestedpost

type Audio

type Audio struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Duration Duration of the audio in seconds as defined by the sender
	Duration int `json:"duration"`

	// Performer Optional. Performer of the audio as defined by the sender or by audio tags
	Performer string `json:"performer,omitempty"`
	// Title Optional. Title of the audio as defined by the sender or by audio tags
	Title string `json:"title,omitempty"`
	// FileName Optional. Original filename as defined by the sender
	FileName string `json:"file_name,omitempty"` // Since: Bot API 5.0
	// MimeType Optional. MIME type of the file as defined by the sender
	MimeType string `json:"mime_type,omitempty"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int64 `json:"file_size,omitempty"`
	// Thumbnail Optional. Thumbnail of the album cover to which the music file belongs
	Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}

Audio represents an audio file to be treated as music by the Telegram clients. Since: Bot API 1.2 See https://core.telegram.org/bots/api#audio

type BackgroundFill

type BackgroundFill struct {
	// Type identifies the concrete fill variant.
	Type BackgroundFillType `json:"type"`

	// Color The color of the background fill in the RGB24 format
	Color int `json:"color,omitempty"`

	// TopColor Top color of the gradient in the RGB24 format
	TopColor int `json:"top_color,omitempty"`
	// BottomColor Bottom color of the gradient in the RGB24 format
	BottomColor int `json:"bottom_color,omitempty"`
	// RotationAngle Clockwise rotation angle of the background fill in degrees; 0-359
	RotationAngle int `json:"rotation_angle,omitempty"`

	// Colors A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24
	// format
	Colors []int `json:"colors,omitempty"`
}

BackgroundFill describes the way a background is filled. Since: Bot API 7.5

type BackgroundFillType

type BackgroundFillType string

BackgroundFillType represents the type of a background fill. Since: Bot API 7.5

const (
	// BackgroundFillSolidType identifies a solid fill.
	BackgroundFillSolidType BackgroundFillType = "solid"
	// BackgroundFillGradientType identifies a two-color gradient.
	BackgroundFillGradientType BackgroundFillType = "gradient"
	// BackgroundFillFreeformGradientType identifies a freeform gradient.
	BackgroundFillFreeformGradientType BackgroundFillType = "freeform_gradient"
)

type BackgroundType

type BackgroundType struct {
	// Type identifies the concrete background variant.
	Type BackgroundTypeType `json:"type"`

	// Fill contains the background fill for fill and pattern variants.
	Fill *BackgroundFill `json:"fill,omitempty"`
	// DarkThemeDimming Dimming of the background in dark themes, as a percentage; 0-100
	DarkThemeDimming int `json:"dark_theme_dimming,omitempty"`

	// Document contains the wallpaper or pattern document for document-backed variants.
	Document *Document `json:"document,omitempty"`
	// IsBlurred Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred
	// with radius 12
	IsBlurred bool `json:"is_blurred,omitempty"`
	// IsMoving Optional. True, if the background moves slightly when the device is tilted
	IsMoving bool `json:"is_moving,omitempty"`

	// Intensity Intensity of the pattern when it is shown above the filled background; 0-100
	Intensity int `json:"intensity,omitempty"`
	// IsInverted Optional. True, if the background fill must be applied only to the pattern itself. All other
	// pixels are black in this case. For dark themes only.
	IsInverted bool `json:"is_inverted,omitempty"`

	// ThemeName Name of the chat theme, which is usually an emoji
	ThemeName string `json:"theme_name,omitempty"`
}

BackgroundType describes the type of a background. Since: Bot API 7.5

type BackgroundTypeType

type BackgroundTypeType string

BackgroundTypeType represents the type of a chat background. Since: Bot API 7.5

const (
	// BackgroundTypeFillType identifies a generated fill.
	BackgroundTypeFillType BackgroundTypeType = "fill"
	// BackgroundTypeWallpaperType identifies a wallpaper.
	BackgroundTypeWallpaperType BackgroundTypeType = "wallpaper"
	// BackgroundTypePatternType identifies a pattern.
	BackgroundTypePatternType BackgroundTypeType = "pattern"
	// BackgroundTypeChatThemeType identifies a chat theme.
	BackgroundTypeChatThemeType BackgroundTypeType = "chat_theme"
)

type BanChatMember

type BanChatMember struct {
	// ChatID Required. Unique identifier for the target group or username of the target supergroup or channel
	// in the format @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// UntilDate Optional. Date when the user will be unbanned; Unix time. If user is banned for more than 366
	// days or less than 30 seconds from the current time they are considered to be banned forever. Applied for
	// supergroups and channels only.
	UntilDate int `json:"until_date,omitempty"`
	// RevokeMessages Optional. Pass True to delete all messages from the chat for the user that is being
	// removed. If False, the user will be able to see messages in the group that were sent before the user was
	// removed. Always True for supergroups and channels.
	RevokeMessages bool `json:"revoke_messages,omitempty"`
}

BanChatMember holds parameters for the banChatMember method. Since: Bot API 5.3 See https://core.telegram.org/bots/api#banchatmember

type BanChatSenderChat

type BanChatSenderChat struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// SenderChatID Required. Unique identifier of the target sender chat
	SenderChatID int64 `json:"sender_chat_id"`
}

BanChatSenderChat holds parameters for the banChatSenderChat method. Since: Bot API 5.6 See https://core.telegram.org/bots/api#banchatsenderchat

type BaseForumTopic

type BaseForumTopic struct {
	// ChatID identifies the target supergroup.
	ChatID int64 `json:"chat_id"`
	// MessageThreadID identifies the target forum topic.
	MessageThreadID int `json:"message_thread_id"`
}

BaseForumTopic contains common fields for forum topic operations that require a chat ID and a message thread ID. Since: Bot API 6.3

type BaseGeneralForumTopic

type BaseGeneralForumTopic struct {
	// ChatID identifies the target supergroup.
	ChatID int64 `json:"chat_id"`
}

BaseGeneralForumTopic contains common fields for general forum topic operations that require a chat ID. Since: Bot API 6.4

type Birthdate

type Birthdate struct {
	// Day Day of the user's birth; 1-31
	Day int `json:"day"`
	// Month Month of the user's birth; 1-12
	Month int `json:"month"`
	// Year Optional. Year of the user's birth
	Year int `json:"year"`
}

Birthdate represents a user's birthdate. Since: Bot API 7.2 See https://core.telegram.org/bots/api#birthdate

type BotAccessSettings

type BotAccessSettings struct {
	// AllowAllPrivateChats reports whether the managed bot may access all private chats of its owner.
	AllowAllPrivateChats bool `json:"allow_all_private_chats"`
}

BotAccessSettings describes access settings of a managed bot. Since: Bot API 10.0 See https://core.telegram.org/bots/api#botaccesssettings

type BotCommand

type BotCommand struct {
	// Command Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and
	// underscores.
	Command string `json:"command"`
	// Description Description of the command; 1-256 characters
	Description string `json:"description"`
	// IsEphemeral marks the command as visible only in ephemeral command contexts.
	IsEphemeral bool `json:"is_ephemeral,omitempty"` // Since: Bot API 10.2
}

BotCommand represents a bot command. Since: Bot API 4.7 See https://core.telegram.org/bots/api#botcommand

type BotCommandScope

type BotCommandScope struct {
	// Type identifies the concrete command-scope variant.
	Type BotCommandScopeType `json:"type"`
	// ChatID Unique identifier for the target chat or username of the target supergroup in the format
	// @username. Channel direct messages chats and channel chats aren't supported.
	ChatID *int64 `json:"chat_id,omitempty"`
	// UserID Unique identifier of the target user
	UserID *int64 `json:"user_id,omitempty"`
}

BotCommandScope represents the scope to which bot commands are applied. Since: Bot API 5.3 See https://core.telegram.org/bots/api#botcommandscope

type BotCommandScopeType

type BotCommandScopeType string

BotCommandScopeType indicates the type of a command scope.

const (
	// BotCommandScopeDefaultType is the default command scope.
	BotCommandScopeDefaultType BotCommandScopeType = "default"
	// BotCommandScopePrivateType covers all private chats.
	BotCommandScopePrivateType BotCommandScopeType = "all_private_chats"
	// BotCommandScopeGroupType covers all group and supergroup chats.
	BotCommandScopeGroupType BotCommandScopeType = "all_group_chats"
	// BotCommandScopeAllChatAdministratorsType covers all chat administrators.
	BotCommandScopeAllChatAdministratorsType BotCommandScopeType = "all_chat_administrators"
	// BotCommandScopeChatType covers a specific chat.
	BotCommandScopeChatType BotCommandScopeType = "chat"
	// BotCommandScopeChatAdministratorsType covers administrators of a specific chat.
	BotCommandScopeChatAdministratorsType BotCommandScopeType = "chat_administrators"
	// BotCommandScopeChatMemberType covers a specific member of a specific chat.
	BotCommandScopeChatMemberType BotCommandScopeType = "chat_member"
)

type BotDescription

type BotDescription struct {
	// Description The bot's description
	Description string `json:"description"`
}

BotDescription represents the bot's description. Since: Bot API 6.6

type BotName

type BotName struct {
	// Name The bot's name
	Name string `json:"name"`
}

BotName represents the bot's name. Since: Bot API 6.7

type BotShortDescription

type BotShortDescription struct {
	// ShortDescription The bot's short description
	ShortDescription string `json:"short_description"`
}

BotShortDescription represents the bot's short description. Since: Bot API 6.6

type BotSubscriptionState added in v1.1.0

type BotSubscriptionState string

BotSubscriptionState identifies the state of a user's subscription to the bot.

Since: Bot API 10.2

const (
	// BotSubscriptionCanceledState indicates that the user canceled the subscription.
	BotSubscriptionCanceledState BotSubscriptionState = "canceled"
	// BotSubscriptionActiveState indicates that the user re-enabled the subscription.
	BotSubscriptionActiveState BotSubscriptionState = "active"
	// BotSubscriptionFailedState indicates that subscription payment failed.
	BotSubscriptionFailedState BotSubscriptionState = "failed"
)

type BotSubscriptionUpdated added in v1.1.0

type BotSubscriptionUpdated struct {
	// User contains the user associated with the value.
	User User `json:"user"`
	// InvoicePayload contains the bot-defined subscription invoice payload.
	InvoicePayload string `json:"invoice_payload"`
	// State is the new subscription state.
	State BotSubscriptionState `json:"state"`
}

BotSubscriptionUpdated describes a change to a user's payment subscription to the bot.

Since: Bot API 10.2

type BusinessBotRights

type BusinessBotRights struct {
	// CanReply Optional. True, if the bot can send and edit messages in the private chats that had incoming
	// messages in the last 24 hours
	CanReply *bool `json:"can_reply,omitempty"`
	// CanReadMessages Optional. True, if the bot can mark incoming private messages as read
	CanReadMessages *bool `json:"can_read_messages,omitempty"`
	// CanDeleteSentMessages Optional. True, if the bot can delete messages sent by the bot
	CanDeleteSentMessages *bool `json:"can_delete_sent_messages,omitempty"`
	// CanDeleteAllMessages Optional. True, if the bot can delete all private messages in managed chats
	CanDeleteAllMessages *bool `json:"can_delete_all_messages,omitempty"`
	// CanEditName Optional. True, if the bot can edit the first and last name of the business account
	CanEditName *bool `json:"can_edit_name,omitempty"`
	// CanEditBio Optional. True, if the bot can edit the bio of the business account
	CanEditBio *bool `json:"can_edit_bio,omitempty"`
	// CanEditProfilePhoto Optional. True, if the bot can edit the profile photo of the business account
	CanEditProfilePhoto *bool `json:"can_edit_profile_photo,omitempty"`
	// CanEditUsername Optional. True, if the bot can edit the username of the business account
	CanEditUsername *bool `json:"can_edit_username,omitempty"`
	// CanChangeGiftSettings Optional. True, if the bot can change the privacy settings pertaining to gifts for
	// the business account
	CanChangeGiftSettings *bool `json:"can_change_gift_settings,omitempty"`
	// CanViewGiftsAndStars Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by
	// the business account
	CanViewGiftsAndStars *bool `json:"can_view_gifts_and_stars,omitempty"`
	// CanConvertGiftsToStars Optional. True, if the bot can convert regular gifts owned by the business account
	// to Telegram Stars
	CanConvertGiftsToStars *bool `json:"can_convert_gifts_to_stars,omitempty"`
	// CanTransferAndUpgradeGifts Optional. True, if the bot can transfer and upgrade gifts owned by the
	// business account
	CanTransferAndUpgradeGifts *bool `json:"can_transfer_and_upgrade_gifts,omitempty"`
	// CanTransferStars Optional. True, if the bot can transfer Telegram Stars received by the business account
	// to its own account, or use them to upgrade and transfer gifts
	CanTransferStars *bool `json:"can_transfer_stars,omitempty"`
	// CanManageStories Optional. True, if the bot can post, edit and delete stories on behalf of the business
	// account
	CanManageStories *bool `json:"can_manage_stories,omitempty"`
}

BusinessBotRights represents the rights of a business bot. All fields are optional booleans that, when present, are always true. Since: Bot API 9.0 See https://core.telegram.org/bots/api#businessbotrights

type BusinessConnection

type BusinessConnection struct {
	// ID Unique identifier of the business connection
	ID string `json:"id"`
	// User Business account user that created the business connection
	User User `json:"user"`
	// UserChatID Identifier of a private chat with the user who created the business connection. This number
	// may have more than 32 significant bits and some programming languages may have difficulty/silent defects
	// in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float
	// type are safe for storing this identifier.
	UserChatID int64 `json:"user_chat_id"`
	// Date Date the connection was established in Unix time
	Date int `json:"date"`
	// Rights Optional. Rights of the business bot
	Rights *BusinessBotRights `json:"rights,omitempty"`
	// IsEnabled True, if the connection is active
	IsEnabled bool `json:"is_enabled"`
}

BusinessConnection contains information about a business connection. Since: Bot API 7.2 See https://core.telegram.org/bots/api#businessconnection

type BusinessIntro

type BusinessIntro struct {
	// Title Optional. Title text of the business intro
	Title string `json:"title,omitempty"`
	// Message Optional. Message text of the business intro
	Message string `json:"message,omitempty"`
	// Sticker Optional. Sticker of the business intro
	Sticker *Sticker `json:"sticker,omitempty"`
}

BusinessIntro contains information about the business intro. Since: Bot API 7.2 See https://core.telegram.org/bots/api#businessintro

type BusinessLocation

type BusinessLocation struct {
	// Address Address of the business
	Address string `json:"address"`
	// Location Optional. Location of the business
	Location *Location `json:"location,omitempty"`
}

BusinessLocation contains information about the business location. Since: Bot API 7.2 See https://core.telegram.org/bots/api#businesslocation

type BusinessMessagesDeleted

type BusinessMessagesDeleted struct {
	// BusinessConnectionID Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// Chat Information about a chat in the business account. The bot may not have access to the chat or the
	// corresponding user.
	Chat Chat `json:"chat"`
	// MessageIDs The list of identifiers of deleted messages in the chat of the business account
	MessageIDs []int `json:"message_ids"`
}

BusinessMessagesDeleted is received when messages are deleted from a connected business account. Since: Bot API 7.2 See https://core.telegram.org/bots/api#businessmessagesdeleted

type BusinessOpeningHours

type BusinessOpeningHours struct {
	// TimeZoneName Unique name of the time zone for which the opening hours are defined
	TimeZoneName string `json:"time_zone_name"`
	// OpeningHours List of time intervals describing business opening hours
	OpeningHours []BusinessOpeningHoursInterval `json:"opening_hours"`
}

BusinessOpeningHours represents the opening hours of a business. Since: Bot API 7.2 See https://core.telegram.org/bots/api#businessopeninghours

type BusinessOpeningHoursInterval

type BusinessOpeningHoursInterval struct {
	// OpeningMinute The minute's sequence number in a week, starting on Monday, marking the start of the time
	// interval during which the business is open; 0 - 7 * 24 * 60
	OpeningMinute int `json:"opening_minute"`
	// ClosingMinute The minute's sequence number in a week, starting on Monday, marking the end of the time
	// interval during which the business is open; 0 - 8 * 24 * 60
	ClosingMinute int `json:"closing_minute"`
}

BusinessOpeningHoursInterval represents an interval of opening hours. Since: Bot API 7.2 See https://core.telegram.org/bots/api#businessopeninghoursinterval

type CallbackGame

type CallbackGame struct{}

CallbackGame is a placeholder for the future use of callback games. Since: Bot API 2.2

type CallbackQuery

type CallbackQuery struct {
	// ID Unique identifier for this query
	ID string `json:"id"`
	// From Sender
	From User `json:"from"`
	// Message Optional. Message sent by the bot with the callback button that originated the query
	Message *Message `json:"message,omitempty"`
	// InlineMessageID Optional. Identifier of the message sent via the bot in inline mode, that originated the
	// query
	InlineMessageID *string `json:"inline_message_id,omitempty"`
	// ChatInstance Global identifier, uniquely corresponding to the chat to which the message with the callback
	// button was sent. Useful for high scores in games.
	ChatInstance string `json:"chat_instance,omitempty"`
	// Data Optional. Data associated with the callback button. Be aware that the message originated the query
	// can contain no callback buttons with this data.
	Data string `json:"data,omitempty"`
	// GameShortName Optional. Short name of a Game to be returned, serves as the unique identifier for the game
	GameShortName string `json:"game_short_name,omitempty"`
}

CallbackQuery represents an incoming callback query from a callback button in an inline keyboard. Since: Bot API 2.0 See https://core.telegram.org/bots/api#callbackquery

type Chat

type Chat struct {
	// ID Unique identifier for this chat. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this
	// identifier.
	ID int64 `json:"id"`
	// Type Type of the chat, can be either “private”, “group”, “supergroup” or “channel”
	Type ChatType `json:"type"`
	// Title Optional. Title, for supergroups, channels and group chats
	Title *string `json:"title,omitempty"`
	// Username Optional. Username, for private chats, supergroups and channels if available
	Username *string `json:"username,omitempty"`
	// FirstName Optional. First name of the other party in a private chat
	FirstName *string `json:"first_name,omitempty"`
	// LastName Optional. Last name of the other party in a private chat
	LastName *string `json:"last_name,omitempty"`
	// IsForum Optional. True, if the supergroup chat is a forum (has topics enabled)
	IsForum *bool `json:"is_forum,omitempty"` // Since: Bot API 6.3
	// IsDirectMessages Optional. True, if the chat is the direct messages chat of a channel
	IsDirectMessages *bool `json:"is_direct_messages,omitempty"` // Since: Bot API 9.2
}

Chat represents a chat (private, group, supergroup, channel). Since: Bot API 1.0 See https://core.telegram.org/bots/api#chat

type ChatActionType

type ChatActionType string

ChatActionType represents the type of chat action.

const (
	// ChatActionTyping tells Telegram the bot is typing.
	ChatActionTyping ChatActionType = "typing"
	// ChatActionUploadPhoto tells Telegram the bot is uploading a photo.
	ChatActionUploadPhoto ChatActionType = "upload_photo"
	// ChatActionUploadVideo tells Telegram the bot is uploading a video.
	ChatActionUploadVideo ChatActionType = "upload_video"
	// ChatActionUploadVoice tells Telegram the bot is uploading a voice message.
	ChatActionUploadVoice ChatActionType = "upload_voice"
	// ChatActionUploadDocument tells Telegram the bot is uploading a document.
	ChatActionUploadDocument ChatActionType = "upload_document"
	// ChatActionChooseSticker tells Telegram the bot is choosing a sticker.
	ChatActionChooseSticker ChatActionType = "choose_sticker"
	// ChatActionFindLocation tells Telegram the bot is finding a location.
	ChatActionFindLocation ChatActionType = "find_location"
	// ChatActionUploadVideoNote tells Telegram the bot is uploading a video note.
	ChatActionUploadVideoNote ChatActionType = "upload_video_note"
	// ChatActionUploadVideoNone is a deprecated alias for ChatActionUploadVideoNote.
	ChatActionUploadVideoNone = ChatActionUploadVideoNote
)

type ChatAdministratorRights

type ChatAdministratorRights struct {
	// IsAnonymous True, if the user's presence in the chat is hidden
	IsAnonymous bool `json:"is_anonymous"`
	// CanManageChat True, if the administrator can access the chat event log, get boost list, see hidden
	// supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat
	// without paying Telegram Stars. Implied by any other administrator privilege.
	CanManageChat bool `json:"can_manage_chat"`
	// CanDeleteMessages True, if the administrator can delete messages of other users
	CanDeleteMessages bool `json:"can_delete_messages"`
	// CanManageVideoChats True, if the administrator can manage video chats
	CanManageVideoChats bool `json:"can_manage_video_chats"`
	// CanRestrictMembers True, if the administrator can restrict, ban or unban chat members, or access
	// supergroup statistics
	CanRestrictMembers bool `json:"can_restrict_members"`
	// CanPromoteMembers True, if the administrator can add new administrators with a subset of their own
	// privileges or demote administrators that they have promoted, directly or indirectly (promoted by
	// administrators that were appointed by the user)
	CanPromoteMembers bool `json:"can_promote_members"`
	// CanChangeInfo True, if the user is allowed to change the chat title, photo and other settings
	CanChangeInfo bool `json:"can_change_info"`
	// CanInviteUsers True, if the user is allowed to invite new users to the chat
	CanInviteUsers bool `json:"can_invite_users"`
	// CanPostStories True, if the administrator can post stories to the chat
	CanPostStories bool `json:"can_post_stories"`
	// CanEditStories True, if the administrator can edit stories posted by other users, post stories to the
	// chat page, pin chat stories, and access the chat's story archive
	CanEditStories bool `json:"can_edit_stories"`
	// CanDeleteStories True, if the administrator can delete stories posted by other users
	CanDeleteStories bool `json:"can_delete_stories"`

	// CanPostMessages Optional. True, if the administrator can post messages in the channel, approve suggested
	// posts, or access channel statistics; for channels only
	CanPostMessages *bool `json:"can_post_messages,omitempty"`
	// CanEditMessages Optional. True, if the administrator can edit messages of other users and can pin
	// messages; for channels only
	CanEditMessages *bool `json:"can_edit_messages,omitempty"`
	// CanPinMessages Optional. True, if the user is allowed to pin messages; for groups and supergroups only
	CanPinMessages *bool `json:"can_pin_messages,omitempty"`
	// CanManageTopics Optional. True, if the user is allowed to create, rename, close, and reopen forum topics;
	// for supergroups only
	CanManageTopics *bool `json:"can_manage_topics,omitempty"`
	// CanManageDirectMessages Optional. True, if the administrator can manage direct messages of the channel
	// and decline suggested posts; for channels only
	CanManageDirectMessages *bool `json:"can_manage_direct_messages,omitempty"`
	// CanManageTags Optional. True, if the administrator can edit the tags of regular members; for groups and
	// supergroups only. If omitted, defaults to the value of can_pin_messages.
	CanManageTags *bool `json:"can_manage_tags,omitempty"`
}

ChatAdministratorRights represents the rights of an administrator in a chat. Since: Bot API 6.0 See https://core.telegram.org/bots/api#chatadministratorrights

type ChatBackground

type ChatBackground struct {
	// Type Type of the background
	Type BackgroundType `json:"type"`
}

ChatBackground represents a chat background. Since: Bot API 7.5

type ChatBoost

type ChatBoost struct {
	// BoostID Unique identifier of the boost
	BoostID string `json:"boost_id"`
	// AddDate Point in time (Unix timestamp) when the chat was boosted
	AddDate int `json:"add_date"`
	// ExpirationDate Point in time (Unix timestamp) when the boost will automatically expire, unless the
	// booster's Telegram Premium subscription is prolonged
	ExpirationDate int `json:"expiration_date"`
	// Source Source of the added boost
	Source ChatBoostSource `json:"source"`
}

ChatBoost represents a boost added to a chat. Since: Bot API 7.0 See https://core.telegram.org/bots/api#chatboost

type ChatBoostAdded

type ChatBoostAdded struct {
	// BoostCount Number of boosts added by the user
	BoostCount int `json:"boost_count"`
}

ChatBoostAdded describes a service message about a user boosting a chat. Since: Bot API 7.1

type ChatBoostRemoved

type ChatBoostRemoved struct {
	// Chat Chat which was boosted
	Chat Chat `json:"chat"`
	// BoostID Unique identifier of the boost
	BoostID string `json:"boost_id"`
	// RemoveDate Point in time (Unix timestamp) when the boost was removed
	RemoveDate int `json:"remove_date"`
	// Source Source of the removed boost
	Source ChatBoostSource `json:"source"`
}

ChatBoostRemoved represents a boost removed from a chat. Since: Bot API 7.0 See https://core.telegram.org/bots/api#chatboostremoved

type ChatBoostSource

type ChatBoostSource struct {
	// Source identifies the source variant: premium, gift_code, or giveaway.
	Source string `json:"source"`
	// User is the user responsible for the boost when supplied by the source variant.
	User User `json:"user"`

	// GiveawayMessageID Identifier of a message in the chat with the giveaway; the message could have been
	// deleted already. May be 0 if the message isn't sent yet.
	// Giveaway
	GiveawayMessageID *int `json:"giveaway_message_id,omitempty"`
	// PrizeStarCount Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram
	// Star giveaways only
	PrizeStarCount *int `json:"prize_star_count,omitempty"`
	// IsUnclaimed Optional. True, if the giveaway was completed, but there was no user to win the prize
	IsUnclaimed *bool `json:"is_unclaimed,omitempty"`
}

ChatBoostSource describes the source of a chat boost. Since: Bot API 7.0 See https://core.telegram.org/bots/api#chatboostsource

type ChatBoostUpdated

type ChatBoostUpdated struct {
	// Chat Chat which was boosted
	Chat Chat `json:"chat"`
	// Boost Information about the chat boost
	Boost ChatBoost `json:"boost"`
}

ChatBoostUpdated represents a boost added to a chat or changed. Since: Bot API 7.0 See https://core.telegram.org/bots/api#chatboostupdated

type ChatFullInfo

type ChatFullInfo struct {
	// ID Unique identifier for this chat. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this
	// identifier.
	ID int64 `json:"id"`
	// Type Type of the chat, can be either “private”, “group”, “supergroup” or “channel”
	Type ChatType `json:"type"`
	// Title Optional. Title, for supergroups, channels and group chats
	Title string `json:"title"`
	// Username Optional. Username, for private chats, supergroups and channels if available
	Username string `json:"username"`
	// FirstName Optional. First name of the other party in a private chat
	FirstName string `json:"first_name"`
	// LastName Optional. Last name of the other party in a private chat
	LastName string `json:"last_name"`
	// IsForum Optional. True, if the supergroup chat is a forum (has topics enabled)
	IsForum bool `json:"is_forum"`
	// IsDirectMessages Optional. True, if the chat is the direct messages chat of a channel
	IsDirectMessages bool `json:"is_direct_messages"`
	// AccentColorID Identifier of the accent color for the chat name and backgrounds of the chat photo, reply
	// header, and link preview. See accent colors for more details.
	AccentColorID int `json:"accent_color_id"`
	// MaxReactionCount The maximum number of reactions that can be set on a message in the chat
	MaxReactionCount int `json:"max_reaction_count"`
	// Photo Optional. Chat photo
	Photo *ChatPhoto `json:"photo,omitempty"`
	// ActiveUsernames Optional. If non-empty, the list of all active chat usernames; for private chats,
	// supergroups and channels
	ActiveUsernames []string `json:"active_usernames,omitempty"`
	// Birthdate Optional. For private chats, the date of birth of the user
	Birthdate *Birthdate `json:"birthdate,omitempty"`

	// BusinessIntro Optional. For private chats with business accounts, the intro of the business
	BusinessIntro *BusinessIntro `json:"business_intro,omitempty"`
	// BusinessLocation Optional. For private chats with business accounts, the location of the business
	BusinessLocation *BusinessLocation `json:"business_location,omitempty"`
	// BusinessOpeningHours Optional. For private chats with business accounts, the opening hours of the
	// business
	BusinessOpeningHours *BusinessOpeningHours `json:"business_opening_hours,omitempty"`

	// PersonalChat Optional. For private chats, the personal channel of the user
	PersonalChat *Chat `json:"personal_chat,omitempty"`
	// ParentChat Optional. Information about the corresponding channel chat; for direct messages chats only
	ParentChat *Chat `json:"parent_chat,omitempty"` // Since: Bot API 9.2

	// AvailableReaction Optional. List of available reactions allowed in the chat. If omitted, then all emoji
	// reactions are allowed.
	// Subject to change in v2: the Go field name may be pluralized to AvailableReactions.
	AvailableReaction []ReactionType `json:"available_reactions,omitempty"`

	// BackgroundCustomEmojiID Optional. Custom emoji identifier of the emoji chosen by the chat for the reply
	// header and link preview background
	BackgroundCustomEmojiID *string `json:"background_custom_emoji_id,omitempty"`
	// ProfileAccentColorID Optional. Identifier of the accent color for the chat's profile background. See
	// profile accent colors for more details.
	ProfileAccentColorID *int `json:"profile_accent_color_id,omitempty"`
	// ProfileBackgroundCustomEmojiID Optional. Custom emoji identifier of the emoji chosen by the chat for its
	// profile background
	ProfileBackgroundCustomEmojiID *string `json:"profile_background_custom_emoji_id,omitempty"`
	// EmojiStatusCustomEmojiID Optional. Custom emoji identifier of the emoji status of the chat or the other
	// party in a private chat
	EmojiStatusCustomEmojiID *string `json:"emoji_status_custom_emoji_id,omitempty"`
	// EmojiStatusExpirationDate Optional. Expiration date of the emoji status of the chat or the other party in
	// a private chat, in Unix time, if any
	EmojiStatusExpirationDate *int `json:"emoji_status_expiration_date,omitempty"`

	// Bio Optional. Bio of the other party in a private chat
	Bio *string `json:"bio,omitempty"`
	// HasPrivateForwards Optional. True, if privacy settings of the other party in the private chat allows to
	// use tg://user?id=<user_id> links only in chats with the user
	HasPrivateForwards *bool `json:"has_private_forwards,omitempty"`
	// HasRestrictedVoiceAndVideoMessages Optional. True, if the privacy settings of the other party restrict
	// sending voice and video note messages in the private chat
	HasRestrictedVoiceAndVideoMessages *bool `json:"has_restricted_voice_and_video_messages,omitempty"`
	// JoinToSendMessages Optional. True, if users need to join the supergroup before they can send messages
	JoinToSendMessages *bool `json:"join_to_send_messages,omitempty"`
	// JoinByRequest Optional. True, if all users directly joining the supergroup without using an invite link
	// need to be approved by supergroup administrators
	JoinByRequest *bool `json:"join_by_request,omitempty"`

	// Description Optional. Description, for groups, supergroups and channel chats
	Description *string `json:"description,omitempty"`
	// InviteLink Optional. Primary invite link, for groups, supergroups and channel chats
	InviteLink *string `json:"invite_link,omitempty"`
	// PinnedMessage Optional. The most recent pinned message (by sending date)
	PinnedMessage *Message `json:"pinned_message,omitempty"`
	// Permissions Optional. Default chat member permissions, for groups and supergroups
	Permissions *ChatPermissions `json:"permissions,omitempty"`
	// AcceptedGiftTypes Information about types of gifts that are accepted by the chat or by the corresponding
	// user for private chats
	AcceptedGiftTypes *AcceptedGiftTypes `json:"accepted_gift_types,omitempty"`

	// CanSendPaidMedia Optional. True, if paid media messages can be sent or forwarded to the channel chat. The
	// field is available only for channel chats.
	CanSendPaidMedia *bool `json:"can_send_paid_media,omitempty"`
	// SlowModeDelay Optional. For supergroups, the minimum allowed delay between consecutive messages sent by
	// each unprivileged user; in seconds
	SlowModeDelay *int `json:"slow_mode_delay,omitempty"`
	// UnrestrictedBoostCount is the number of unrestricted boosts available to the chat.
	UnrestrictedBoostCount *int `json:"unrestricted_boost_count,omitempty"`
	// MessageAutoDeleteTime Optional. The time after which all messages sent to the chat will be automatically
	// deleted; in seconds
	MessageAutoDeleteTime *int `json:"message_auto_delete_time,omitempty"`
	// HasAggressiveAntiSpamEnabled Optional. True, if aggressive anti-spam checks are enabled in the
	// supergroup. The field is only available to chat administrators.
	HasAggressiveAntiSpamEnabled *bool `json:"has_aggressive_anti_spam_enabled,omitempty"`
	// HasHiddenMembers Optional. True, if non-administrators can only get the list of bots and administrators
	// in the chat
	HasHiddenMembers *bool `json:"has_hidden_members,omitempty"`
	// HasProtectedContent Optional. True, if messages from the chat can't be forwarded to other chats
	HasProtectedContent *bool `json:"has_protected_content,omitempty"`
	// HasVisibleHistory Optional. True, if new chat members will have access to old messages; available only to
	// chat administrators
	HasVisibleHistory *bool `json:"has_visible_history,omitempty"`
	// StickerSetName Optional. For supergroups, name of the group sticker set
	StickerSetName *string `json:"sticker_set_name,omitempty"`
	// CanSetStickerSet Optional. True, if the bot can change the group sticker set
	CanSetStickerSet *bool `json:"can_set_sticker_set,omitempty"`
	// CustomEmojiStickerSetName Optional. For supergroups, the name of the group's custom emoji sticker set.
	// Custom emoji from this set can be used by all users and bots in the group.
	CustomEmojiStickerSetName *string `json:"custom_emoji_sticker_set_name,omitempty"`
	// LinkedChatID Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a
	// channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits
	// and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller
	// than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this
	// identifier.
	LinkedChatID *int64 `json:"linked_chat_id,omitempty"`

	// Location Optional. For supergroups, the location to which the supergroup is connected
	Location *ChatLocation `json:"location,omitempty"`
	// Rating Optional. For private chats, the rating of the user if any
	Rating *UserRating `json:"rating,omitempty"`
	// FirstProfileAudio Optional. For private chats, the first audio added to the profile of the user
	FirstProfileAudio *Audio `json:"first_profile_audio,omitempty"` // Since: Bot API 9.4
	// UniqueGiftColors Optional. The color scheme based on a unique gift that must be used for the chat's name,
	// message replies and link previews
	UniqueGiftColors *UniqueGiftColors `json:"unique_gift_colors,omitempty"` // Since: Bot API 9.3
	// PaidMessageStarCount Optional. The number of Telegram Stars a general user has to pay to send a message
	// to the chat
	PaidMessageStarCount *int `json:"paid_message_star_count,omitempty"` // Since: Bot API 9.3
	// GuardBot contains the guard bot visible to chat administrators.
	GuardBot *User `json:"guard_bot,omitempty"` // Since: Bot API 10.1; visible to chat administrators only
	// Community contains information about the affected community.
	Community *Community `json:"community,omitempty"` // Since: Bot API 10.2
}

ChatFullInfo contains full information about a chat. Since: Bot API 7.5 See https://core.telegram.org/bots/api#chatfullinfo

type ChatInviteLink struct {
	// InviteLink The invite link. If the link was created by another chat administrator, then the second part
	// of the link will be replaced with “…”.
	InviteLink string `json:"invite_link"`
	// Creator Creator of the link
	Creator User `json:"creator"`
	// CreateJoinRequest True, if users joining the chat via the link need to be approved by chat administrators
	CreateJoinRequest bool `json:"creates_join_request"`
	// IsPrimary True, if the link is primary
	IsPrimary bool `json:"is_primary"`
	// IsRevoked True, if the link is revoked
	IsRevoked bool `json:"is_revoked"`

	// Name Optional. Invite link name
	Name *string `json:"name,omitempty"`
	// ExpireDate Optional. Point in time (Unix timestamp) when the link will expire or has been expired
	ExpireDate *int `json:"expire_date,omitempty"`
	// MemberLimit Optional. The maximum number of users that can be members of the chat simultaneously after
	// joining the chat via this invite link; 1-99999
	MemberLimit *int `json:"member_limit,omitempty"`
	// PendingJoinRequestCount Optional. Number of pending join requests created using this link
	PendingJoinRequestCount *int `json:"pending_join_request_count,omitempty"`
	// SubscriptionPeriod Optional. The number of seconds the subscription will be active for before the next
	// payment
	SubscriptionPeriod *int `json:"subscription_period,omitempty"`
	// SubscriptionPrice Optional. The amount of Telegram Stars a user must pay initially and after each
	// subsequent subscription period to be a member of the chat using the link
	SubscriptionPrice *int `json:"subscription_price,omitempty"`
}

ChatInviteLink represents an invite link for a chat. Since: Bot API 5.1 See https://core.telegram.org/bots/api#chatinvitelink

type ChatJoinRequest

type ChatJoinRequest struct {
	// Chat Chat to which the request was sent
	Chat Chat `json:"chat"`
	// From User that sent the join request
	From User `json:"from"`
	// UserChatID Identifier of a private chat with the user who sent the join request. This number may have
	// more than 32 significant bits and some programming languages may have difficulty/silent defects in
	// interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float
	// type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages
	// until the join request is processed, assuming no other administrator contacted the user.
	UserChatID int64 `json:"user_chat_id"`
	// Date Date the request was sent in Unix time
	Date int64 `json:"date"`
	// Bio Optional. Bio of the user
	Bio *string `json:"bio,omitempty"`
	// InviteLink Optional. Chat invite link that was used by the user to send the join request
	InviteLink *ChatInviteLink `json:"invite_link,omitempty"`

	// QueryID identifies the join request query; present only for bots
	// assigned to process join requests. When set, the bot must call
	// SendChatJoinRequestWebApp or AnswerChatJoinRequestQuery within 10 seconds.
	QueryID *string `json:"query_id,omitempty"` // Since: Bot API 10.1
}

ChatJoinRequest represents a join request sent to a chat. Since: Bot API 5.4 See https://core.telegram.org/bots/api#chatjoinrequest

type ChatJoinRequestQueryResult added in v1.1.0

type ChatJoinRequestQueryResult string

ChatJoinRequestQueryResult is the verdict passed to answerChatJoinRequestQuery. Since: Bot API 10.1

const (
	// JoinRequestApprove allows the user to join the chat.
	JoinRequestApprove ChatJoinRequestQueryResult = "approve"
	// JoinRequestDecline disallows the user to join the chat.
	JoinRequestDecline ChatJoinRequestQueryResult = "decline"
	// JoinRequestQueue leaves the decision to other administrators.
	JoinRequestQueue ChatJoinRequestQueryResult = "queue"
)

type ChatLocation

type ChatLocation struct {
	// Location The location to which the supergroup is connected. Can't be a live location.
	Location Location `json:"location"`
	// Address Location address; 1-64 characters, as defined by the chat owner
	Address string `json:"address"`
}

ChatLocation represents a location to which a chat is connected. Since: Bot API 5.0 See https://core.telegram.org/bots/api#chatlocation

type ChatMember

type ChatMember struct {
	// Status is the member's current status in the chat.
	Status ChatMemberStatusType `json:"status"`
	// User Information about the user
	User User `json:"user"`
	// Tag Optional. Tag of the member
	Tag string `json:"tag,omitempty"` // Since: Bot API 9.5

	// IsAnonymous True, if the user's presence in the chat is hidden
	// Owner
	IsAnonymous *bool `json:"is_anonymous"`
	// CustomTitle Optional. Custom title for this user
	CustomTitle *string `json:"custom_title,omitempty"`

	// CanBeEdited True, if the bot is allowed to edit administrator privileges of that user
	// Administrator
	CanBeEdited *bool `json:"can_be_edited,omitempty"`
	// CanManageChat True, if the administrator can access the chat event log, get boost list, see hidden
	// supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat
	// without paying Telegram Stars. Implied by any other administrator privilege.
	CanManageChat *bool `json:"can_manage_chat,omitempty"`
	// CanDeleteMessages True, if the administrator can delete messages of other users
	CanDeleteMessages *bool `json:"can_delete_messages,omitempty"`
	// CanManageVideoChats True, if the administrator can manage video chats
	CanManageVideoChats *bool `json:"can_manage_video_chats,omitempty"`
	// CanRestrictMembers True, if the administrator can restrict, ban or unban chat members, or access
	// supergroup statistics
	CanRestrictMembers *bool `json:"can_restrict_members,omitempty"`
	// CanPromoteMembers True, if the administrator can add new administrators with a subset of their own
	// privileges or demote administrators that they have promoted, directly or indirectly (promoted by
	// administrators that were appointed by the user)
	CanPromoteMembers *bool `json:"can_promote_members,omitempty"`
	// CanChangeInfo True, if the user is allowed to change the chat title, photo and other settings
	CanChangeInfo *bool `json:"can_change_info,omitempty"`
	// CanInviteUsers True, if the user is allowed to invite new users to the chat
	CanInviteUsers *bool `json:"can_invite_users,omitempty"`
	// CanPostStories True, if the administrator can post stories to the chat
	CanPostStories *bool `json:"can_post_stories,omitempty"` // Since: Bot API 6.9
	// CanEditStories True, if the administrator can edit stories posted by other users, post stories to the
	// chat page, pin chat stories, and access the chat's story archive
	CanEditStories *bool `json:"can_edit_stories,omitempty"` // Since: Bot API 6.9
	// CanDeleteStories True, if the administrator can delete stories posted by other users
	CanDeleteStories *bool `json:"can_delete_stories,omitempty"` // Since: Bot API 6.9

	// CanPostMessages Optional. True, if the administrator can post messages in the channel, approve suggested
	// posts, or access channel statistics; for channels only
	CanPostMessages *bool `json:"can_post_messages,omitempty"`
	// CanEditMessages Optional. True, if the administrator can edit messages of other users and can pin
	// messages; for channels only
	CanEditMessages *bool `json:"can_edit_messages,omitempty"`
	// CanPinMessages reports whether the member may pin messages.
	CanPinMessages *bool `json:"can_pin_messages,omitempty"`
	// CanManageTopics reports whether the member may manage forum topics.
	CanManageTopics *bool `json:"can_manage_topics,omitempty"` // Since: Bot API 6.3
	// CanManageDirectMessages Optional. True, if the administrator can manage direct messages of the channel
	// and decline suggested posts; for channels only
	CanManageDirectMessages *bool `json:"can_manage_direct_messages,omitempty"` // Since: Bot API 9.1
	// CanManageTags Optional. True, if the administrator can edit the tags of regular members; for groups and
	// supergroups only. If omitted, defaults to the value of can_pin_messages.
	CanManageTags *bool `json:"can_manage_tags,omitempty"` // Since: Bot API 9.5

	// UntilDate is the Unix time when restrictions expire; zero means forever.
	// Member
	UntilDate *int `json:"until_date,omitempty"`

	// IsMember True, if the user is a member of the chat at the moment of the request
	// Restricted
	IsMember *bool `json:"is_member,omitempty"`
	// CanSendMessages True, if the user is allowed to send text messages, rich messages, contacts, giveaways,
	// giveaway winners, invoices, locations and venues
	CanSendMessages *bool `json:"can_send_messages,omitempty"`
	// CanSendAudios True, if the user is allowed to send audios
	CanSendAudios *bool `json:"can_send_audios,omitempty"` // Since: Bot API 6.5
	// CanSendDocuments True, if the user is allowed to send documents
	CanSendDocuments *bool `json:"can_send_documents,omitempty"` // Since: Bot API 6.5
	// CanSendPhotos True, if the user is allowed to send photos
	CanSendPhotos *bool `json:"can_send_photos,omitempty"` // Since: Bot API 6.5
	// CanSendVideos True, if the user is allowed to send videos
	CanSendVideos *bool `json:"can_send_videos,omitempty"` // Since: Bot API 6.5
	// CanSendVideoNotes True, if the user is allowed to send video notes
	CanSendVideoNotes *bool `json:"can_send_video_notes,omitempty"` // Since: Bot API 6.5
	// CanSendVoiceNotes True, if the user is allowed to send voice notes
	CanSendVoiceNotes *bool `json:"can_send_voice_notes,omitempty"` // Since: Bot API 6.5
	// CanSendPolls True, if the user is allowed to send polls and checklists
	CanSendPolls *bool `json:"can_send_polls,omitempty"`
	// CanSendOtherMessages True, if the user is allowed to send animations, games, stickers and use inline bots
	CanSendOtherMessages *bool `json:"can_send_other_messages,omitempty"`
	// CanAddWebPagePreview True, if the user is allowed to add web page previews to their messages
	CanAddWebPagePreview *bool `json:"can_add_web_page_previews,omitempty"`
	// CanReactToMessages True, if the user is allowed to react to messages
	CanReactToMessages *bool `json:"can_react_to_messages,omitempty"` // Since: Bot API 10.0
	// CanEditTag True, if the user is allowed to edit their own tag
	CanEditTag *bool `json:"can_edit_tag,omitempty"` // Since: Bot API 9.5
}

ChatMember contains information about one member of a chat. Since: Bot API 3.1 See https://core.telegram.org/bots/api#chatmember

type ChatMemberStatusType

type ChatMemberStatusType string

ChatMemberStatusType indicates the status of a chat member.

const (
	// ChatMemberStatusOwner identifies a chat owner.
	ChatMemberStatusOwner ChatMemberStatusType = "owner"
	// ChatMemberStatusAdministrator identifies a chat administrator.
	ChatMemberStatusAdministrator ChatMemberStatusType = "administrator"
	// ChatMemberStatusMember identifies a regular member.
	ChatMemberStatusMember ChatMemberStatusType = "member"
	// ChatMemberStatusRestricted identifies a restricted member.
	ChatMemberStatusRestricted ChatMemberStatusType = "restricted"
	// ChatMemberStatusLeft identifies a user who left the chat.
	ChatMemberStatusLeft ChatMemberStatusType = "left"
	// ChatMemberStatusBanned identifies a banned user.
	ChatMemberStatusBanned ChatMemberStatusType = "kicked"
)

type ChatMemberUpdated

type ChatMemberUpdated struct {
	// Chat Chat the user belongs to
	Chat Chat `json:"chat"`
	// From Performer of the action, which resulted in the change
	From User `json:"from"`
	// Date Date the change was done in Unix time
	Date int64 `json:"date"`
	// OldChatMember Previous information about the chat member
	OldChatMember ChatMember `json:"old_chat_member"`
	// NewChatMember New information about the chat member
	NewChatMember ChatMember `json:"new_chat_member"`
	// InviteLink Optional. Chat invite link, which was used by the user to join the chat; for joining by invite
	// link events only
	InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
	// ViaJoinRequest Optional. True, if the user joined the chat after sending a direct join request without
	// using an invite link and being approved by an administrator
	ViaJoinRequest *bool `json:"via_join_request,omitempty"`
	// ViaChatFolderInviteLink Optional. True, if the user joined the chat via a chat folder invite link
	ViaChatFolderInviteLink *bool `json:"via_chat_folder_invite_link,omitempty"`
}

ChatMemberUpdated represents changes in the status of a chat member. Since: Bot API 5.1 See https://core.telegram.org/bots/api#chatmemberupdated

type ChatOwnerChanged

type ChatOwnerChanged struct {
	// NewOwner The new owner of the chat
	NewOwner User `json:"new_owner"`
}

ChatOwnerChanged describes a service message about a chat owner change. Since: Bot API 9.4 See https://core.telegram.org/bots/api#chatownerchanged

type ChatOwnerLeft

type ChatOwnerLeft struct {
	// NewOwner Optional. The user who will become the new owner of the chat if the previous owner does not
	// return to the chat
	NewOwner *User `json:"new_owner,omitempty"`
}

ChatOwnerLeft describes a service message about a chat owner leaving. Since: Bot API 9.4 See https://core.telegram.org/bots/api#chatownerleft

type ChatPermissions

type ChatPermissions struct {
	// CanSendMessages Optional. True, if the user is allowed to send text messages, rich messages, contacts,
	// giveaways, giveaway winners, invoices, locations and venues
	CanSendMessages bool `json:"can_send_messages"`
	// CanSendAudios Optional. True, if the user is allowed to send audios
	CanSendAudios bool `json:"can_send_audios"` // Since: Bot API 6.5
	// CanSendDocuments Optional. True, if the user is allowed to send documents
	CanSendDocuments bool `json:"can_send_documents"` // Since: Bot API 6.5
	// CanSendPhotos Optional. True, if the user is allowed to send photos
	CanSendPhotos bool `json:"can_send_photos"` // Since: Bot API 6.5
	// CanSendVideos Optional. True, if the user is allowed to send videos
	CanSendVideos bool `json:"can_send_videos"` // Since: Bot API 6.5
	// CanSendVideoNotes Optional. True, if the user is allowed to send video notes
	CanSendVideoNotes bool `json:"can_send_video_notes"` // Since: Bot API 6.5
	// CanSendVoiceNotes Optional. True, if the user is allowed to send voice notes
	CanSendVoiceNotes bool `json:"can_send_voice_notes"` // Since: Bot API 6.5
	// CanSendPolls Optional. True, if the user is allowed to send polls and checklists
	CanSendPolls bool `json:"can_send_polls"`
	// CanSendOtherMessages Optional. True, if the user is allowed to send animations, games, stickers and use
	// inline bots
	CanSendOtherMessages bool `json:"can_send_other_messages"`
	// CanAddWebPagePreview Optional. True, if the user is allowed to add web page previews to their messages
	CanAddWebPagePreview bool `json:"can_add_web_page_previews"`
	// CanReactToMessages Optional. True, if the user is allowed to react to messages. If omitted, defaults to
	// the value of can_send_messages.
	CanReactToMessages bool `json:"can_react_to_messages"` // Since: Bot API 10.0
	// CanEditTag Optional. True, if the user is allowed to edit their own tag. If omitted, defaults to the
	// value of can_pin_messages.
	CanEditTag bool `json:"can_edit_tag"` // Since: Bot API 9.5
	// CanChangeInfo Optional. True, if the user is allowed to change the chat title, photo and other settings.
	// Ignored in public supergroups.
	CanChangeInfo bool `json:"can_change_info"`
	// CanInviteUsers Optional. True, if the user is allowed to invite new users to the chat
	CanInviteUsers bool `json:"can_invite_users"`
	// CanPinMessages Optional. True, if the user is allowed to pin messages. Ignored in public supergroups.
	CanPinMessages bool `json:"can_pin_messages"`
	// CanManageTopics Optional. True, if the user is allowed to create forum topics. If omitted, defaults to
	// the value of can_pin_messages.
	CanManageTopics bool `json:"can_manage_topics"` // Since: Bot API 6.3
}

ChatPermissions describes actions that a non‑administrator user is allowed to take in a chat. Since: Bot API 4.4 See https://core.telegram.org/bots/api#chatpermissions

type ChatPhoto

type ChatPhoto struct {
	// SmallFileID File identifier of small (160x160) chat photo. This file_id can be used only for photo
	// download and only for as long as the photo is not changed.
	SmallFileID string `json:"small_file_id"`
	// SmallFileUniqueID Unique file identifier of small (160x160) chat photo, which is supposed to be the same
	// over time and for different bots. Can't be used to download or reuse the file.
	SmallFileUniqueID string `json:"small_file_unique_id"`
	// BigFileID File identifier of big (640x640) chat photo. This file_id can be used only for photo download
	// and only for as long as the photo is not changed.
	BigFileID string `json:"big_file_id"`
	// BigFileUniqueID Unique file identifier of big (640x640) chat photo, which is supposed to be the same over
	// time and for different bots. Can't be used to download or reuse the file.
	BigFileUniqueID string `json:"big_file_unique_id"`
}

ChatPhoto represents a chat photo. Since: Bot API 3.1 See https://core.telegram.org/bots/api#chatphoto

type ChatShared

type ChatShared struct {
	// RequestID Identifier of the request
	RequestID int `json:"request_id"`
	// ChatID Identifier of the shared chat. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a 64-bit integer or double-precision float type are safe for storing this
	// identifier. The bot may not have access to the chat and could be unable to use this identifier, unless
	// the chat is already known to the bot by some other means.
	ChatID int64 `json:"chat_id"`
	// Title Optional. Title of the chat, if the title was requested by the bot
	Title string `json:"title,omitempty"`
	// Username Optional. Username of the chat, if the username was requested by the bot and available
	Username string `json:"username,omitempty"`
	// Photo Optional. Available sizes of the chat photo, if the photo was requested by the bot
	Photo []PhotoSize `json:"photo,omitempty"`
}

ChatShared represents a service message about a chat shared via a KeyboardButtonRequestChat button. Since: Bot API 6.5

type ChatType

type ChatType string

ChatType represents the type of a chat.

const (
	// ChatTypePrivate identifies a private chat.
	ChatTypePrivate ChatType = "private"
	// ChatTypeGroup identifies a basic group chat.
	ChatTypeGroup ChatType = "group"
	// ChatTypeSupergroup identifies a supergroup chat.
	ChatTypeSupergroup ChatType = "supergroup"
	// ChatTypeChannel identifies a channel chat.
	ChatTypeChannel ChatType = "channel"
)

type Checklist

type Checklist struct {
	// Title Title of the checklist
	Title string `json:"title"`
	// TitleEntities Optional. Special entities that appear in the checklist title
	TitleEntities []MessageEntity `json:"title_entities,omitempty"`
	// Tasks List of tasks in the checklist
	Tasks []ChecklistTask `json:"tasks"`
	// OthersCanAddTasks Optional. True, if users other than the creator of the list can add tasks to the list
	OthersCanAddTasks bool `json:"others_can_add_tasks,omitempty"`
	// OthersCanMarkTasksAsDone Optional. True, if users other than the creator of the list can mark tasks as
	// done or not done
	OthersCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done,omitempty"`
}

Checklist represents a checklist. Since: Bot API 9.1

type ChecklistTask

type ChecklistTask struct {
	// ID Unique identifier of the task
	ID int `json:"id"`
	// Text Text of the task
	Text string `json:"text"`
	// TextEntities Optional. Special entities that appear in the task text
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	// CompletedByUser Optional. User that completed the task; omitted if the task wasn't completed by a user
	CompletedByUser *User `json:"completed_by_user,omitempty"`
	// CompletedByChat Optional. Chat that completed the task; omitted if the task wasn't completed by a chat
	CompletedByChat *Chat `json:"completed_by_chat,omitempty"`
	// CompletionDate Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't
	// completed
	CompletionDate int `json:"completion_date,omitempty"`
}

ChecklistTask represents a single task in a checklist. Since: Bot API 9.1

type ChecklistTaskDone

type ChecklistTaskDone struct {
	// ChecklistMessage is the checklist message when it is available.
	ChecklistMessage *Message `json:"checklist_message,omitempty"`
	// MarkedAsDoneTaskIDs Optional. Identifiers of the tasks that were marked as done
	MarkedAsDoneTaskIDs []int `json:"marked_as_done_task_ids,omitempty"`
	// MarkedAsNotDoneTaskIDs Optional. Identifiers of the tasks that were marked as not done
	MarkedAsNotDoneTaskIDs []int `json:"marked_as_not_done_task_ids,omitempty"`
}

ChecklistTaskDone describes a service message about checklist tasks being marked as done. Since: Bot API 9.1

type ChecklistTasksAdded

type ChecklistTasksAdded struct {
	// ChecklistMessage Optional. Message containing the checklist to which the tasks were added. Note that the
	// Message object in this field will not contain the reply_to_message field even if it itself is a reply.
	ChecklistMessage *Message `json:"checklist_message,omitempty"`
	// Tasks List of tasks added to the checklist
	Tasks []ChecklistTask `json:"tasks"`
}

ChecklistTasksAdded describes a service message about new checklist tasks being added. Since: Bot API 9.1

type ChosenInlineResult

type ChosenInlineResult struct {
	// ResultID The unique identifier for the result that was chosen
	ResultID string `json:"result_id"`
	// From The user that chose the result
	From User `json:"from"`
	// Location Optional. Sender location, only for bots that require user location
	Location *Location `json:"location,omitempty"`
	// InlineMessageID Optional. Identifier of the sent inline message. Available only if there is an inline
	// keyboard attached to the message. Will be also received in callback queries and can be used to edit the
	// message.
	InlineMessageID string `json:"inline_message_id"`
	// Query The query that was used to obtain the result
	Query string `json:"query"`
}

ChosenInlineResult represents a result of an inline query that was chosen by the user. Since: Bot API 1.8 See https://core.telegram.org/bots/api#choseninlineresult

type Community added in v1.1.0

type Community struct {
	// ID uniquely identifies the value within its containing object.
	ID int64 `json:"id"`
	// Name is the user-facing or reference name of the value.
	Name string `json:"name"`
}

Community represents a group of chats.

Since: Bot API 10.2

type CommunityChatAdded added in v1.1.0

type CommunityChatAdded struct {
	// Community contains information about the affected community.
	Community Community `json:"community"`
}

CommunityChatAdded describes a service message about a chat joining a community.

Since: Bot API 10.2

type CommunityChatRemoved added in v1.1.0

type CommunityChatRemoved struct{}

CommunityChatRemoved describes a service message about a chat leaving a community.

Since: Bot API 10.2

type Contact

type Contact struct {
	// PhoneNumber Contact's phone number
	PhoneNumber string `json:"phone_number"`
	// FirstName Contact's first name
	FirstName string `json:"first_name"`
	// LastName Optional. Contact's last name
	LastName string `json:"last_name,omitempty"`
	// UserID Optional. Contact's user identifier in Telegram. This number may have more than 32 significant
	// bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at
	// most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this
	// identifier.
	UserID int64 `json:"user_id,omitempty"`
	// Vcard Optional. Additional data about the contact in the form of a vCard
	Vcard string `json:"vcard,omitempty"`
}

Contact represents a phone contact. Since: Bot API 1.0

type ConvertGiftToStars

type ConvertGiftToStars struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// OwnedGiftID Required. Unique identifier of the regular gift that should be converted to Telegram Stars
	OwnedGiftID string `json:"owned_gift_id"`
}

ConvertGiftToStars holds parameters for the convertGiftToStars method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#convertgifttostars

type CopyMessage

type CopyMessage struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// FromChatID Required. Unique identifier for the chat where the original message was sent (or username of
	// the target bot, supergroup or channel in the format @username)
	FromChatID int64 `json:"from_chat_id"`
	// MessageID Required. Message identifier in the chat specified in from_chat_id
	MessageID int `json:"message_id"`
	// VideoStartTimestamp Optional. New start timestamp for the copied video in the message
	VideoStartTimestamp int `json:"video_start_timestamp,omitempty"`
	// Caption Optional. New caption for media, 0-1024 characters after entities parsing. If not specified, the
	// original caption is kept.
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the new caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`

	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the new caption,
	// which can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media. Ignored
	// if a new caption isn't specified.
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; only
	// available when copying to private chats
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

CopyMessage holds parameters for the copyMessage method. Since: Bot API 5.0 See https://core.telegram.org/bots/api#copymessage

type CopyMessages

type CopyMessages struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the messages will be
	// sent; required if the messages are sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// FromChatID Required. Unique identifier for the chat where the original messages were sent (or username of
	// the target bot, supergroup or channel in the format @username)
	FromChatID int64 `json:"from_chat_id,omitempty"`
	// MessageIDs Required. A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to
	// copy. The identifiers must be specified in a strictly increasing order.
	MessageIDs []int `json:"message_ids,omitempty"`
	// DisableNotification Optional. Sends the messages silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent messages from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// RemoveCaption Optional. Pass True to copy the messages without their captions
	RemoveCaption bool `json:"remove_caption,omitempty"`
}

CopyMessages holds parameters for the copyMessages method. Since: Bot API 7.0 See https://core.telegram.org/bots/api#copymessages

type CreateChatInviteLink struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// Name Optional. Invite link name; 0-32 characters
	Name *string `json:"name,omitempty"`
	// ExpireDate Optional. Point in time (Unix timestamp) when the link will expire
	ExpireDate int `json:"expire_date,omitempty"`
	// MemberLimit Optional. The maximum number of users that can be members of the chat simultaneously after
	// joining the chat via this invite link; 1-99999
	MemberLimit int `json:"member_limit,omitempty"`
	// CreatesJoinRequest Optional. True, if users joining the chat via the link need to be approved by chat
	// administrators. If True, member_limit can't be specified.
	CreatesJoinRequest bool `json:"creates_join_request,omitempty"`
}

CreateChatInviteLink holds parameters for the createChatInviteLink method. Since: Bot API 5.1 See https://core.telegram.org/bots/api#createchatinvitelink

type CreateChatSubscriptionInviteLink struct {
	// ChatID Required. Unique identifier for the target channel chat or username of the target channel in the
	// format @username
	ChatID int64 `json:"chat_id"`
	// Name Optional. Invite link name; 0-32 characters
	Name string `json:"name,omitempty"`
	// SubscriptionPeriod Required. The number of seconds the subscription will be active for before the next
	// payment. Currently, it must always be 2592000 (30 days).
	SubscriptionPeriod int `json:"subscription_period,omitempty"`
	// SubscriptionPrice Required. The amount of Telegram Stars a user must pay initially and after each
	// subsequent subscription period to be a member of the chat; 1-10000
	SubscriptionPrice int `json:"subscription_price,omitempty"`
}

CreateChatSubscriptionInviteLink holds parameters for the createChatSubscriptionInviteLink method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#createchatsubscriptioninvitelink

type CreateForumTopic

type CreateForumTopic struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// Name Required. Topic name, 1-128 characters
	Name string `json:"name"`
	// IconColor Optional. Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0),
	// 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047
	// (0xFB6F5F).
	IconColor ForumTopicIconColor `json:"icon_color"`
	// IconCustomEmojiID Optional. Unique identifier of the custom emoji shown as the topic icon. Use
	// getForumTopicIconStickers to get all allowed custom emoji identifiers.
	IconCustomEmojiID string `json:"icon_custom_emoji_id"`
}

CreateForumTopic holds parameters for the createForumTopic method. Since: Bot API 6.3 See https://core.telegram.org/bots/api#createforumtopic

type CreateInvoiceLink struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the link
	// will be created. For payments in Telegram Stars only.
	BusinessConnectionID string `json:"business_connection_id,omitempty"`

	// Title Required. Product name, 1-32 characters
	Title string `json:"title"`
	// Description Required. Product description, 1-255 characters
	Description string `json:"description"`
	// Payload Required. Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use
	// it for your internal processes.
	Payload string `json:"payload"`
	// ProviderToken Optional. Payment provider token, obtained via @BotFather. Pass an empty string for
	// payments in Telegram Stars.
	ProviderToken string `json:"provider_token,omitempty"`
	// Currency Required. Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for
	// payments in Telegram Stars.
	Currency string `json:"currency"`
	// Prices Required. Price breakdown, a JSON-serialized list of components (e.g. product price, tax,
	// discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in
	// Telegram Stars.
	Prices []LabeledPrice `json:"prices"`

	// SubscriptionPeriod Optional. The number of seconds the subscription will be active for before the next
	// payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it
	// must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot
	// at the same time, including multiple concurrent subscriptions from the same user. Subscription price must
	// no exceed 10000 Telegram Stars.
	SubscriptionPeriod int `json:"subscription_period,omitempty"`
	// MaxTipAmount Optional. The maximum accepted amount for tips in the smallest units of the currency
	// (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See
	// the exp parameter in currencies.json, it shows the number of digits past the decimal point for each
	// currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.
	MaxTipAmount int `json:"max_tip_amount,omitempty"`
	// SuggestedTipAmounts Optional. A JSON-serialized Array of suggested amounts of tips in the smallest units
	// of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The
	// suggested tip amounts must be positive, passed in a strictly increased order and must not exceed
	// max_tip_amount.
	SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"`
	// ProviderData Optional. JSON-serialized data about the invoice, which will be shared with the payment
	// provider. A detailed description of required fields should be provided by the payment provider.
	ProviderData string `json:"provider_data,omitempty"`
	// PhotoURL Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing
	// image for a service.
	PhotoURL string `json:"photo_url,omitempty"`
	// PhotoSize Optional. Photo size in bytes
	PhotoSize int `json:"photo_size,omitempty"`
	// PhotoWidth Optional. Photo width
	PhotoWidth int `json:"photo_width,omitempty"`
	// PhotoHeight Optional. Photo height
	PhotoHeight int `json:"photo_height,omitempty"`
	// NeedName Optional. Pass True if you require the user's full name to complete the order. Ignored for
	// payments in Telegram Stars.
	NeedName bool `json:"need_name,omitempty"`
	// NeedPhoneNumber Optional. Pass True if you require the user's phone number to complete the order. Ignored
	// for payments in Telegram Stars.
	NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
	// NeedEmail Optional. Pass True if you require the user's email address to complete the order. Ignored for
	// payments in Telegram Stars.
	NeedEmail bool `json:"need_email,omitempty"`
	// NeedShippingAddress Optional. Pass True if you require the user's shipping address to complete the order.
	// Ignored for payments in Telegram Stars.
	NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
	// SendPhoneToProvider Optional. Pass True if the user's phone number should be sent to the provider.
	// Ignored for payments in Telegram Stars.
	SendPhoneToProvider bool `json:"send_phone_number_to_provider,omitempty"`
	// SendEmailToProvider Optional. Pass True if the user's email address should be sent to the provider.
	// Ignored for payments in Telegram Stars.
	SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
	// IsFlexible Optional. Pass True if the final price depends on the shipping method. Ignored for payments in
	// Telegram Stars.
	IsFlexible bool `json:"is_flexible,omitempty"`
}

CreateInvoiceLink holds parameters for the createInvoiceLink method. Since: Bot API 6.1 See https://core.telegram.org/bots/api#createinvoicelink

type CreateNewStickerSet

type CreateNewStickerSet struct {
	// UserID Required. User identifier of created sticker set owner
	UserID int64 `json:"user_id"`
	// Name Required. Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can
	// contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive
	// underscores and must end in "_by_<bot_username>". <bot_username> is case insensitive. 1-64 characters.
	Name string `json:"name"`
	// Title Required. Sticker set title, 1-64 characters
	Title string `json:"title"`

	// Stickers Required. A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
	Stickers []InputSticker `json:"stickers"`
	// StickerType Optional. Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”.
	// By default, a regular sticker set is created.
	StickerType StickerType `json:"sticker_type,omitempty"`
	// NeedsRepainting Optional. Pass True if stickers in the sticker set must be repainted to the color of text
	// when used in messages, the accent color if used as emoji status, white on chat photos, or another
	// appropriate color based on context; for custom emoji sticker sets only
	NeedsRepainting bool `json:"needs_repainting,omitempty"`
}

CreateNewStickerSet holds parameters for the createNewStickerSet method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#createnewstickerset

type DeclineChatJoinRequest

type DeclineChatJoinRequest struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
}

DeclineChatJoinRequest holds parameters for the declineChatJoinRequest method. Since: Bot API 5.4 See https://core.telegram.org/bots/api#declinechatjoinrequest

type DeclineSuggestedPost

type DeclineSuggestedPost struct {
	// ChatID Required. Unique identifier for the target direct messages chat
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Identifier of a suggested post message to decline
	MessageID int `json:"message_id"`
	// Comment Optional. Comment for the creator of the suggested post; 0-128 characters
	Comment string `json:"comment,omitempty"`
}

DeclineSuggestedPost holds parameters for the declineSuggestedPost method. Since: Bot API 9.2 See https://core.telegram.org/bots/api#declinesuggestedpost

type DeleteAllMessageReactions

type DeleteAllMessageReactions struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// UserID Optional. Identifier of the user whose reactions will be removed, if the reactions were added by a
	// user
	UserID int64 `json:"user_id,omitempty"`
	// ActorChatID Optional. Identifier of the chat whose reactions will be removed, if the reactions were added
	// by a chat
	ActorChatID int64 `json:"actor_chat_id,omitempty"`
}

DeleteAllMessageReactions holds parameters for the deleteAllMessageReactions method. Since: Bot API 10.0 See https://core.telegram.org/bots/api#deleteallmessagereactions

type DeleteBusinessMessages

type DeleteBusinessMessages struct {
	// BusinessConnectionID Required. Unique identifier of the business connection on behalf of which to delete
	// the messages
	BusinessConnectionID string `json:"business_connection_id"`
	// MessageIDs Required. A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must
	// be from the same chat. See deleteMessage for limitations on which messages can be deleted.
	MessageIDs []int `json:"message_ids"`
}

DeleteBusinessMessages holds parameters for the deleteBusinessMessages method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#deletebusinessmessages

type DeleteChatPhoto

type DeleteChatPhoto struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
}

DeleteChatPhoto holds parameters for the deleteChatPhoto method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#deletechatphoto

type DeleteChatStickerSet

type DeleteChatStickerSet struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
}

DeleteChatStickerSet holds parameters for the deleteChatStickerSet method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#deletechatstickerset

type DeleteEphemeralMessage added in v1.1.0

type DeleteEphemeralMessage struct {
	// ChatID identifies the target chat.
	ChatID int64 `json:"chat_id"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id"`
	// EphemeralMessageID identifies the ephemeral message.
	EphemeralMessageID int64 `json:"ephemeral_message_id"`
}

DeleteEphemeralMessage holds parameters for deleting an ephemeral message.

Since: Bot API 10.2

type DeleteMessage

type DeleteMessage struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Identifier of the message to delete
	MessageID int `json:"message_id"`
}

DeleteMessage holds parameters for the deleteMessage method. Since: Bot API 3.0 See https://core.telegram.org/bots/api#deletemessage

type DeleteMessageReaction

type DeleteMessageReaction struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Identifier of the target message
	MessageID int `json:"message_id"`
	// UserID Optional. Identifier of the user whose reaction will be removed, if the reaction was added by a
	// user
	UserID int64 `json:"user_id,omitempty"`
	// ActorChatID Optional. Identifier of the chat whose reaction will be removed, if the reaction was added by
	// a chat
	ActorChatID int64 `json:"actor_chat_id,omitempty"`
}

DeleteMessageReaction holds parameters for the deleteMessageReaction method. Since: Bot API 10.0 See https://core.telegram.org/bots/api#deletemessagereaction

type DeleteMessages

type DeleteMessages struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageIDs Required. A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage
	// for limitations on which messages can be deleted.
	MessageIDs []int `json:"message_ids"`
}

DeleteMessages holds parameters for the deleteMessages method. Since: Bot API 7.0 See https://core.telegram.org/bots/api#deletemessages

type DeleteMyCommands

type DeleteMyCommands struct {
	// Scope Optional. A JSON-serialized object, describing scope of users for which the commands are relevant.
	// Defaults to BotCommandScopeDefault.
	Scope *BotCommandScope `json:"scope,omitempty"`
	// Language Optional. A two-letter ISO 639-1 language code. If empty, commands will be applied to all users
	// from the given scope, for whose language there are no dedicated commands.
	Language string `json:"language_code,omitempty"`
}

DeleteMyCommands holds parameters for the deleteMyCommands method. Since: Bot API 5.3 See https://core.telegram.org/bots/api#deletemycommands

type DeleteStickerFromSet

type DeleteStickerFromSet struct {
	// Sticker Required. File identifier of the sticker
	Sticker string `json:"sticker"`
}

DeleteStickerFromSet holds parameters for the deleteStickerFromSet method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#deletestickerfromset

type DeleteStickerSet

type DeleteStickerSet struct {
	// Name Required. Sticker set name
	Name string `json:"name"`
}

DeleteStickerSet holds parameters for the deleteStickerSet method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#deletestickerset

type DeleteStory

type DeleteStory struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// StoryID Required. Unique identifier of the story to delete
	StoryID int `json:"story_id"`
}

DeleteStory holds parameters for the deleteStory method. Since: Bot API 7.2 See https://core.telegram.org/bots/api#deletestory

type DeleteWebhook

type DeleteWebhook struct {
	// DropPendingUpdates Optional. Pass True to drop all pending updates
	DropPendingUpdates bool `json:"drop_pending_updates,omitempty"`
}

DeleteWebhook holds parameters for the deleteWebhook method. See https://core.telegram.org/bots/api#deletewebhook

type Dice

type Dice struct {
	// Emoji Emoji on which the dice throw animation is based
	Emoji string `json:"emoji"`
	// Value Value of the dice, 1-6 for “”, “” and “” base emoji, 1-5 for “” and “” base
	// emoji, 1-64 for “” base emoji
	Value int `json:"value"`
}

Dice represents an animated emoji with a random value. Since: Bot API 4.7

type DirectMessagePriceChanged

type DirectMessagePriceChanged struct {
	// AreDirectMessagesEnabled True, if direct messages are enabled for the channel chat; False otherwise
	AreDirectMessagesEnabled bool `json:"are_direct_messages_enabled"`
	// DirectMessageStarCount Optional. The new number of Telegram Stars that must be paid by users for each
	// direct message sent to the channel. Does not apply to users who have been exempted by administrators.
	// Defaults to 0.
	DirectMessageStarCount int `json:"direct_message_star_count,omitempty"`
}

DirectMessagePriceChanged represents a service message about a change in the price of direct messages. Since: Bot API 9.1

type DirectMessageTopic

type DirectMessageTopic struct {
	// TopicID Unique identifier of the topic. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a 64-bit integer or double-precision float type are safe for storing this
	// identifier.
	TopicID int64 `json:"topic_id"`
	// User is the user associated with the direct-message topic when available.
	User *User `json:"user,omitempty"`
}

DirectMessageTopic represents a forum topic in a direct message. Since: Bot API 9.2

type Document

type Document struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Thumbnail Optional. Document thumbnail as defined by the sender
	Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
	// FileName Optional. Original filename as defined by the sender
	FileName string `json:"file_name"`
	// MimeType Optional. MIME type of the file as defined by the sender
	MimeType string `json:"mime_type"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int `json:"file_size,omitempty"`
}

Document represents a general file (as opposed to photos, voice messages and audio files). Since: Bot API 1.0

type EditChatInviteLink struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// InviteLink Required. The invite link to edit
	InviteLink string `json:"invite_link"`

	// Name Optional. Invite link name; 0-32 characters
	Name string `json:"name,omitempty"`
	// ExpireDate Optional. Point in time (Unix timestamp) when the link will expire
	ExpireDate int `json:"expire_date,omitempty"`
	// MemberLimit Optional. The maximum number of users that can be members of the chat simultaneously after
	// joining the chat via this invite link; 1-99999
	MemberLimit int `json:"member_limit,omitempty"`
	// CreatesJoinRequest Optional. True, if users joining the chat via the link need to be approved by chat
	// administrators. If True, member_limit can't be specified.
	CreatesJoinRequest bool `json:"creates_join_request,omitempty"`
}

EditChatInviteLink holds parameters for the editChatInviteLink method. Since: Bot API 5.1 See https://core.telegram.org/bots/api#editchatinvitelink

type EditChatSubscriptionInviteLink struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// InviteLink Required. The invite link to edit
	InviteLink string `json:"invite_link"`
	// Name Optional. Invite link name; 0-32 characters
	Name string `json:"name,omitempty"`
}

EditChatSubscriptionInviteLink holds parameters for the editChatSubscriptionInviteLink method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#editchatsubscriptioninvitelink

type EditEphemeralMessageCaption added in v1.1.0

type EditEphemeralMessageCaption struct {
	// ChatID identifies the target chat.
	ChatID int64 `json:"chat_id"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id"`
	// EphemeralMessageID identifies the ephemeral message.
	EphemeralMessageID int64 `json:"ephemeral_message_id"`

	// Caption contains the media or block caption.
	Caption string `json:"caption,omitempty"`
	// ParseMode selects the formatting syntax used by the text or caption.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities describes formatting entities in Caption.
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// ReplyMarkup defines the message's inline keyboard.
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageCaption holds parameters for editing an ephemeral message caption.

Since: Bot API 10.2

type EditEphemeralMessageMedia added in v1.1.0

type EditEphemeralMessageMedia struct {
	// ChatID identifies the target chat.
	ChatID int64 `json:"chat_id"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id"`
	// EphemeralMessageID identifies the ephemeral message.
	EphemeralMessageID int64 `json:"ephemeral_message_id"`
	// Media contains or identifies media associated with the value.
	Media InputMedia `json:"media"`
	// ReplyMarkup defines the message's inline keyboard.
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageMedia holds parameters for editing ephemeral message media. New files cannot be uploaded; use a file ID or URL.

Since: Bot API 10.2

type EditEphemeralMessageReplyMarkup added in v1.1.0

type EditEphemeralMessageReplyMarkup struct {
	// ChatID identifies the target chat.
	ChatID int64 `json:"chat_id"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id"`
	// EphemeralMessageID identifies the ephemeral message.
	EphemeralMessageID int64 `json:"ephemeral_message_id"`
	// ReplyMarkup defines the message's inline keyboard.
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageReplyMarkup holds parameters for editing an ephemeral message's inline keyboard.

Since: Bot API 10.2

type EditEphemeralMessageText added in v1.1.0

type EditEphemeralMessageText struct {
	// ChatID identifies the target chat.
	ChatID int64 `json:"chat_id"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id"`
	// EphemeralMessageID identifies the ephemeral message.
	EphemeralMessageID int64 `json:"ephemeral_message_id"`
	// Text contains the formatted or plain text content.
	Text string `json:"text"`

	// ParseMode selects the formatting syntax used by the text or caption.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// Entities describes explicit formatting entities in Text.
	Entities []MessageEntity `json:"entities,omitempty"`
	// LinkPreviewOptions controls link preview generation for Text.
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
	// ReplyMarkup defines the message's inline keyboard.
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageText holds parameters for editing an ephemeral text message.

Since: Bot API 10.2

type EditForumTopic

type EditForumTopic struct {
	BaseForumTopic
	// Name Optional. New topic name, 0-128 characters. If not specified or empty, the current name of the topic
	// will be kept.
	Name string `json:"name"`
	// IconCustomEmojiID Optional. New unique identifier of the custom emoji shown as the topic icon. Use
	// getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the
	// icon. If not specified, the current icon will be kept.
	IconCustomEmojiID string `json:"icon_custom_emoji_id"`
}

EditForumTopic holds parameters for the editForumTopic method. Since: Bot API 6.3 See https://core.telegram.org/bots/api#editforumtopic

type EditGeneralForumTopic

type EditGeneralForumTopic struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// Name Required. New topic name, 1-128 characters
	Name string `json:"name"`
}

EditGeneralForumTopic holds parameters for the editGeneralForumTopic method. Since: Bot API 6.4 See https://core.telegram.org/bots/api#editgeneralforumtopic

type EditMessageCaption

type EditMessageCaption struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message to be edited was sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or
	// username of the target bot, supergroup or channel in the format @username.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the message to edit.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
	// Caption Optional. New caption of the message, 0-1024 characters after entities parsing
	Caption string `json:"caption"`
	// ParseMode Optional. Mode for parsing entities in the message caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media. Supported
	// only for animation, photo and video messages.
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// ReplyMarkup Optional. A JSON-serialized object for an inline keyboard
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

EditMessageCaption holds parameters for the editMessageCaption method. Since: Bot API 2.0 See https://core.telegram.org/bots/api#editmessagecaption

type EditMessageChecklist

type EditMessageChecklist struct {
	// BusinessConnectionID Required. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Unique identifier for the target message
	MessageID int `json:"message_id"`
	// Checklist Required. A JSON-serialized object for the new checklist
	Checklist InputChecklist `json:"checklist"`
	// ReplyMarkup Optional. A JSON-serialized object for the new inline keyboard for the message
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageChecklist holds parameters for the editMessageChecklist method. Since: Bot API 9.1 See https://core.telegram.org/bots/api#editmessagechecklist

type EditMessageLiveLocation

type EditMessageLiveLocation struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message to be edited was sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or
	// username of the target bot, supergroup or channel in the format @username.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the message to edit.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`

	// Latitude Required. Latitude of new location
	Latitude float64 `json:"latitude"`
	// Longitude Required. Longitude of new location
	Longitude float64 `json:"longitude"`
	// LivePeriod Optional. New period in seconds during which the location can be updated, starting from the
	// message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the
	// new value must not exceed the current live_period by more than a day, and the live location expiration
	// date must remain within the next 90 days. If not specified, then live_period remains unchanged.
	LivePeriod int `json:"live_period,omitempty"`
	// HorizontalAccuracy Optional. The radius of uncertainty for the location, measured in meters; 0-1500
	HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
	// Heading Optional. Direction in which the user is moving, in degrees. Must be between 1 and 360 if
	// specified.
	Heading int `json:"heading,omitempty"`
	// ProximityAlertRadius Optional. The maximum distance for proximity alerts about approaching another chat
	// member, in meters. Must be between 1 and 100000 if specified.
	ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
	// ReplyMarkup Optional. A JSON-serialized object for a new inline keyboard
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageLiveLocation holds parameters for the editMessageLiveLocation method. Since: Bot API 3.4 See https://core.telegram.org/bots/api#editmessagelivelocation

type EditMessageMedia

type EditMessageMedia struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message to be edited was sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or
	// username of the target bot, supergroup or channel in the format @username.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the message to edit.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
	// Media Required. A JSON-serialized object for the new media content of the message
	Media InputMedia `json:"media"`
	// ReplyMarkup Optional. A JSON-serialized object for a new inline keyboard
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageMedia holds parameters for the editMessageMedia method. Since: Bot API 4.0 See https://core.telegram.org/bots/api#editmessagemedia

type EditMessageReplyMarkup

type EditMessageReplyMarkup struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message to be edited was sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or
	// username of the target bot, supergroup or channel in the format @username.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the message to edit.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
	// ReplyMarkup Optional. A JSON-serialized object for an inline keyboard
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageReplyMarkup holds parameters for the editMessageReplyMarkup method. Since: Bot API 2.0 See https://core.telegram.org/bots/api#editmessagereplymarkup

type EditMessageText

type EditMessageText struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message to be edited was sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or
	// username of the target bot, supergroup or channel in the format @username.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the message to edit.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
	// Text Optional. New text of the message, 1-4096 characters after entity parsing; required if rich_message
	// isn't specified
	Text string `json:"text,omitempty"` // required unless RichMessage is set
	// ParseMode Optional. Mode for parsing entities in the message text. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// Entities Optional. A JSON-serialized list of special entities that appear in message text, which can be
	// specified instead of parse_mode
	Entities []MessageEntity `json:"entities,omitempty"`
	// LinkPreviewOptions Optional. Link preview generation options for the message
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
	// RichMessage contains structured rich-message content.
	RichMessage *InputRichMessage `json:"rich_message,omitempty"` // Since: Bot API 10.1; required if Text is not specified
	// ReplyMarkup Optional. A JSON-serialized object for an inline keyboard
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

EditMessageText holds parameters for the editMessageText method. Since: Bot API 2.0 See https://core.telegram.org/bots/api#editmessagetext

type EditStory

type EditStory struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// StoryID Required. Unique identifier of the story to edit
	StoryID int `json:"story_id"`
	// Content Required. Content of the story
	Content InputStoryContent `json:"content"`

	// Caption Optional. Caption of the story, 0-2048 characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the story caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// Areas Optional. A JSON-serialized list of clickable areas to be shown on the story
	Areas []StoryArea `json:"areas,omitempty"`
}

EditStory holds parameters for the editStory method. Since: Bot API 7.2 See https://core.telegram.org/bots/api#editstory

type EditUserStarSubscription

type EditUserStarSubscription struct {
	// UserID Required. Identifier of the user whose subscription will be edited
	UserID int64 `json:"user_id"`
	// TelegramPaymentChargeID Required. Telegram payment identifier for the subscription
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
	// IsCanceled Required. Pass True to cancel extension of the user subscription; the subscription must be
	// active up to the end of the current subscription period. Pass False to allow the user to re-enable a
	// subscription that was previously canceled by the bot.
	IsCanceled bool `json:"is_canceled"`
}

EditUserStarSubscription holds parameters for the editUserStarSubscription method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#edituserstarsubscription

type EmptyParams

type EmptyParams struct{}

EmptyParams is a placeholder for methods that take no parameters.

type EncryptedCredentials

type EncryptedCredentials struct {
	// Data Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets
	// required for EncryptedPassportElement decryption and authentication
	Data string `json:"data"`
	// Hash Base64-encoded data hash for data authentication
	Hash string `json:"hash"`
	// Secret Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption
	Secret string `json:"secret"`
}

EncryptedCredentials contains data required for decrypting and authenticating EncryptedPassportElement. Since: Bot API 4.0

type EncryptedPassportElement

type EncryptedPassportElement struct {
	// Type Element type. One of “personal_details”, “passport”, “driver_license”,
	// “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”,
	// “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”,
	// “email”.
	Type PassportElementType `json:"type"`
	// Data Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available
	// only for “personal_details”, “passport”, “driver_license”, “identity_card”,
	// “internal_passport” and “address” types. Can be decrypted and verified using the accompanying
	// EncryptedCredentials.
	Data string `json:"data,omitempty"`
	// PhoneNumber Optional. User's verified phone number; available only for “phone_number” type
	PhoneNumber string `json:"phone_number,omitempty"`
	// Email Optional. User's verified email address; available only for “email” type
	Email string `json:"email,omitempty"`
	// Files Optional. Array of encrypted files with documents provided by the user; available only for
	// “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and
	// “temporary_registration” types. Files can be decrypted and verified using the accompanying
	// EncryptedCredentials.
	Files []PassportFile `json:"files,omitempty"`
	// FrontSide Optional. Encrypted file with the front side of the document, provided by the user; available
	// only for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file
	// can be decrypted and verified using the accompanying EncryptedCredentials.
	FrontSide *PassportFile `json:"front_side,omitempty"`
	// ReverseSide Optional. Encrypted file with the reverse side of the document, provided by the user;
	// available only for “driver_license” and “identity_card”. The file can be decrypted and verified
	// using the accompanying EncryptedCredentials.
	ReverseSide *PassportFile `json:"reverse_side,omitempty"`
	// Selfie Optional. Encrypted file with the selfie of the user holding a document, provided by the user;
	// available if requested for “passport”, “driver_license”, “identity_card” and
	// “internal_passport”. The file can be decrypted and verified using the accompanying
	// EncryptedCredentials.
	Selfie *PassportFile `json:"selfie,omitempty"`
	// Translation Optional. Array of encrypted files with translated versions of documents provided by the
	// user; available if requested for “passport”, “driver_license”, “identity_card”,
	// “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”,
	// “passport_registration” and “temporary_registration” types. Files can be decrypted and verified
	// using the accompanying EncryptedCredentials.
	Translation *PassportFile `json:"translation,omitempty"`
	// Hash Base64-encoded element hash for using in PassportElementErrorUnspecified
	Hash string `json:"hash,omitempty"`
}

EncryptedPassportElement contains information about documents or other Telegram Passport elements. Since: Bot API 4.0

type ExportChatInviteLink struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
}

ExportChatInviteLink holds parameters for the exportChatInviteLink method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#exportchatinvitelink

type ExternalReplyInfo

type ExternalReplyInfo struct {
	// Origin Origin of the message replied to by the given message
	Origin MessageOrigin `json:"origin"`
	// Chat Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a
	// channel.
	Chat *Chat `json:"chat,omitempty"`
	// MessageID Optional. Unique message identifier inside the original chat. Available only if the original
	// chat is a supergroup or a channel.
	MessageID int `json:"message_id,omitempty"`
	// LinkPreviewOptions Optional. Options used for link preview generation for the original message, if it is
	// a text message
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
	// Animation Optional. Message is an animation, information about the animation
	Animation *Animation `json:"animation,omitempty"`
	// Audio Optional. Message is an audio file, information about the file
	Audio *Audio `json:"audio,omitempty"`
	// Document Optional. Message is a general file, information about the file
	Document *Document `json:"document,omitempty"`
	// PaidMedia Optional. Message contains paid media; information about the paid media
	PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"` // Since: Bot API 7.6
	// Photo Optional. Message is a photo, available sizes of the photo
	Photo []PhotoSize `json:"photo,omitempty"`
	// LivePhoto Optional. Message is a live photo, information about the live photo
	LivePhoto *LivePhoto `json:"live_photo,omitempty"` // Since: Bot API 10.0
	// Sticker Optional. Message is a sticker, information about the sticker
	Sticker *Sticker `json:"sticker,omitempty"`
	// Story Optional. Message is a forwarded story
	Story *Story `json:"story,omitempty"`
	// Video Optional. Message is a video, information about the video
	Video *Video `json:"video,omitempty"`
	// VideoNote Optional. Message is a video note, information about the video message
	VideoNote *VideoNote `json:"video_note,omitempty"`
	// Voice Optional. Message is a voice message, information about the file
	Voice *Voice `json:"voice,omitempty"`
	// HasMediaSpoiler Optional. True, if the message media is covered by a spoiler animation
	HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"`
	// Checklist Optional. Message is a checklist
	Checklist *Checklist `json:"checklist,omitempty"` // Since: Bot API 9.1
	// Contact Optional. Message is a shared contact, information about the contact
	Contact *Contact `json:"contact,omitempty"`
	// Dice Optional. Message is a dice with random value
	Dice *Dice `json:"dice,omitempty"`
	// Game Optional. Message is a game, information about the game. More about games »
	Game *Game `json:"game,omitempty"`
	// Giveaway Optional. Message is a scheduled giveaway, information about the giveaway
	Giveaway *Giveaway `json:"giveaway,omitempty"`
	// GiveawayWinners Optional. A giveaway with public winners was completed
	GiveawayWinners *GiveawayWinners `json:"giveaway_winners,omitempty"`
	// Invoice Optional. Message is an invoice for a payment, information about the invoice. More about payments
	// »
	Invoice *Invoice `json:"invoice,omitempty"`
	// Location Optional. Message is a shared location, information about the location
	Location *Location `json:"location,omitempty"`
	// Poll Optional. Message is a native poll, information about the poll
	Poll *Poll `json:"poll,omitempty"`
	// Venue Optional. Message is a venue, information about the venue
	Venue *Venue `json:"venue,omitempty"`
}

ExternalReplyInfo contains information about a message that is being replied to. Since: Bot API 7.0

type File

type File struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int64 `json:"file_size,omitempty"`
	// FilePath Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
	FilePath string `json:"file_path,omitempty"`
}

File represents a file ready to be downloaded. Since: Bot API 1.0 See https://core.telegram.org/bots/api#file

type ForumTopic

type ForumTopic struct {
	// MessageThreadID Unique identifier of the forum topic
	MessageThreadID int `json:"message_thread_id"`
	// Name Name of the topic
	Name string `json:"name"`
	// IconColor Color of the topic icon in RGB format
	IconColor int `json:"icon_color"`
	// IconCustomEmojiID Optional. Unique identifier of the custom emoji shown as the topic icon
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
	// IsNameImplicit Optional. True, if the name of the topic wasn't specified explicitly by its creator and
	// likely needs to be changed by the bot
	IsNameImplicit bool `json:"is_name_implicit,omitempty"`
}

ForumTopic represents a forum topic. Since: Bot API 6.3 See https://core.telegram.org/bots/api#forumtopic

type ForumTopicClosed

type ForumTopicClosed struct{}

ForumTopicClosed represents a service message about a forum topic closed. Since: Bot API 6.3

type ForumTopicCreated

type ForumTopicCreated struct {
	// Name Name of the topic
	Name string `json:"name"`
	// IconColor Color of the topic icon in RGB format
	IconColor int `json:"icon_color"`
	// IconCustomEmojiID Optional. Unique identifier of the custom emoji shown as the topic icon
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
	// IsNameImplicit Optional. True, if the name of the topic wasn't specified explicitly by its creator and
	// likely needs to be changed by the bot
	IsNameImplicit bool `json:"is_name_implicit,omitempty"`
}

ForumTopicCreated represents a service message about a new forum topic created. Since: Bot API 6.3

type ForumTopicEdited

type ForumTopicEdited struct {
	// Name Optional. New name of the topic, if it was edited
	Name string `json:"name,omitempty"`
	// IconCustomEmojiID Optional. New identifier of the custom emoji shown as the topic icon, if it was edited;
	// an empty string if the icon was removed
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}

ForumTopicEdited represents a service message about an edited forum topic. Since: Bot API 6.4

type ForumTopicIconColor

type ForumTopicIconColor int

ForumTopicIconColor represents the color of a forum topic icon. The value is an integer representing the color in RGB format. Since: Bot API 6.3 See https://core.telegram.org/bots/api#forumtopiciconcolor

const (
	// ForumTopicIconColorBlue is the blue color for forum topic icons (value 7322096).
	ForumTopicIconColorBlue ForumTopicIconColor = 7322096
)

type ForumTopicReopened

type ForumTopicReopened struct{}

ForumTopicReopened represents a service message about a forum topic reopened. Since: Bot API 6.3

type ForwardMessage

type ForwardMessage struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// forwarded; required if the message is forwarded to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// MessageID Required. Message identifier in the chat specified in from_chat_id
	MessageID int `json:"message_id,omitempty"`
	// FromChatID Required. Unique identifier for the chat where the original message was sent (or username of
	// the target bot, supergroup or channel in the format @username)
	FromChatID int64 `json:"from_chat_id,omitempty"`
	// VideoStartTimestamp Optional. New start timestamp for the forwarded video in the message
	VideoStartTimestamp int `json:"video_start_timestamp,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the forwarded message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`

	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; only
	// available when forwarding to private chats
	MessageEffectID string `json:"message_effect_id,omitempty"`
	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
}

ForwardMessage holds parameters for the forwardMessage method. Since: Bot API 1.0 See https://core.telegram.org/bots/api#forwardmessage

type ForwardMessages

type ForwardMessages struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the messages will be
	// forwarded; required if the messages are forwarded to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// FromChatID Required. Unique identifier for the chat where the original messages were sent (or username of
	// the target bot, supergroup or channel in the format @username)
	FromChatID int64 `json:"from_chat_id,omitempty"`
	// MessageIDs Required. A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to
	// forward. The identifiers must be specified in a strictly increasing order.
	MessageIDs []int `json:"message_ids,omitempty"`
	// DisableNotification Optional. Sends the messages silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the forwarded messages from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
}

ForwardMessages holds parameters for the forwardMessages method. Since: Bot API 7.0 See https://core.telegram.org/bots/api#forwardmessages

type Game

type Game struct {
	// Title Title of the game
	Title string `json:"title"`
	// Description Description of the game
	Description string `json:"description"`
	// Photo Photo that will be displayed in the game message in chats
	Photo []PhotoSize `json:"photo"`
	// Text Optional. Brief description of the game or high scores included in the game message. Can be
	// automatically edited to include current high scores for the game when the bot calls setGameScore, or
	// manually edited using editMessageText. 0-4096 characters.
	Text string `json:"text,omitempty"`
	// TextEntities Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	// Animation Optional. Animation that will be displayed in the game message in chats. Upload via BotFather.
	Animation *Animation `json:"animation,omitempty"`
}

Game represents a game. Since: Bot API 2.2

type GameHighScore

type GameHighScore struct {
	// Position Position in high score table for the game
	Position int `json:"position"`
	// User User
	User User `json:"user"`
	// Score Score
	Score int `json:"score"`
}

GameHighScore represents one row in a game high score table. Since: Bot API 2.2 See https://core.telegram.org/bots/api#gamehighscore

type GeneralForumTopicHidden

type GeneralForumTopicHidden struct{}

GeneralForumTopicHidden represents a service message about the General forum topic hidden. Since: Bot API 6.4

type GeneralForumTopicUnhidden

type GeneralForumTopicUnhidden struct{}

GeneralForumTopicUnhidden represents a service message about the General forum topic unhidden. Since: Bot API 6.4

type GetBusinessAccountGifts

type GetBusinessAccountGifts struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// ExcludeUnsaved Optional. Pass True to exclude gifts that aren't saved to the account's profile page
	ExcludeUnsaved bool `json:"exclude_unsaved,omitempty"`
	// ExcludeSaved Optional. Pass True to exclude gifts that are saved to the account's profile page
	ExcludeSaved bool `json:"exclude_saved,omitempty"`
	// ExcludeUnlimited Optional. Pass True to exclude gifts that can be purchased an unlimited number of times
	ExcludeUnlimited bool `json:"exclude_unlimited,omitempty"`
	// ExcludeLimitedUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number of
	// times and can be upgraded to unique
	ExcludeLimitedUpgradable bool `json:"exclude_limited_upgradable,omitempty"`
	// ExcludeLimitedNonUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number
	// of times and can't be upgraded to unique
	ExcludeLimitedNonUpgradable bool `json:"exclude_limited_non_upgradable,omitempty"`
	// ExcludeUnique Optional. Pass True to exclude unique gifts
	ExcludeUnique bool `json:"exclude_unique,omitempty"`
	// ExcludeFromBlockchain Optional. Pass True to exclude gifts that were assigned from the TON blockchain and
	// can't be resold or transferred in Telegram
	ExcludeFromBlockchain bool `json:"exclude_from_blockchain,omitempty"`
	// SortByPrice Optional. Pass True to sort results by gift price instead of send date. Sorting is applied
	// before pagination.
	SortByPrice bool `json:"sort_by_price,omitempty"`
	// Offset Optional. Offset of the first entry to return as received from the previous request; use empty
	// string to get the first chunk of results
	Offset string `json:"offset,omitempty"`
	// Limit Optional. The maximum number of gifts to be returned; 1-100. Defaults to 100.
	Limit int `json:"limit,omitempty"`
}

GetBusinessAccountGifts holds parameters for the getBusinessAccountGifts method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#getbusinessaccountgifts

type GetBusinessAccountStarBalance

type GetBusinessAccountStarBalance struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
}

GetBusinessAccountStarBalance holds parameters for the getBusinessAccountStarBalance method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#getbusinessaccountstarbalance

type GetBusinessConnection

type GetBusinessConnection struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
}

GetBusinessConnection holds parameters for the getBusinessConnection method. Since: Bot API 7.2 See https://core.telegram.org/bots/api#getbusinessconnection

type GetChat

type GetChat struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup or channel in
	// the format @username
	ChatID int64 `json:"chat_id"`
}

GetChat holds parameters for the getChat method. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchat

type GetChatAdministrators

type GetChatAdministrators struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup or channel in
	// the format @username
	ChatID int64 `json:"chat_id"`
	// ReturnBots Optional. Pass True to additionally receive all bots that are administrators of the chat. By
	// default, bots other than the current bot are omitted.
	ReturnBots bool `json:"return_bots,omitempty"` // Since: Bot API 10.0
}

GetChatAdministrators holds parameters for the getChatAdministrators method. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchatadministrators

type GetChatGifts

type GetChatGifts struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// ExcludeUnsaved Optional. Pass True to exclude gifts that aren't saved to the chat's profile page. Always
	// True, unless the bot has the can_post_messages administrator right in the channel.
	ExcludeUnsaved bool `json:"exclude_unsaved,omitempty"`
	// ExcludeSaved Optional. Pass True to exclude gifts that are saved to the chat's profile page. Always
	// False, unless the bot has the can_post_messages administrator right in the channel.
	ExcludeSaved bool `json:"exclude_saved,omitempty"`
	// ExcludeUnlimited Optional. Pass True to exclude gifts that can be purchased an unlimited number of times
	ExcludeUnlimited bool `json:"exclude_unlimited,omitempty"`
	// ExcludeLimitedUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number of
	// times and can be upgraded to unique
	ExcludeLimitedUpgradable bool `json:"exclude_limited_upgradable,omitempty"`
	// ExcludeLimitedNonUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number
	// of times and can't be upgraded to unique
	ExcludeLimitedNonUpgradable bool `json:"exclude_limited_non_upgradable,omitempty"`
	// ExcludeUnique Optional. Pass True to exclude unique gifts
	ExcludeUnique bool `json:"exclude_unique,omitempty"`
	// ExcludeFromBlockchain Optional. Pass True to exclude gifts that were assigned from the TON blockchain and
	// can't be resold or transferred in Telegram
	ExcludeFromBlockchain bool `json:"exclude_from_blockchain,omitempty"`
	// SortByPrice Optional. Pass True to sort results by gift price instead of send date. Sorting is applied
	// before pagination.
	SortByPrice bool `json:"sort_by_price,omitempty"`
	// Offset Optional. Offset of the first entry to return as received from the previous request; use an empty
	// string to get the first chunk of results
	Offset string `json:"offset,omitempty"`
	// Limit Optional. The maximum number of gifts to be returned; 1-100. Defaults to 100.
	Limit int `json:"limit,omitempty"`
}

GetChatGifts holds parameters for the getChatGifts method. Since: Bot API 9.3 See https://core.telegram.org/bots/api#getchatgifts

type GetChatMember

type GetChatMember struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup or channel in
	// the format @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
}

GetChatMember holds parameters for the getChatMember method. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchatmember

type GetChatMemberCount

type GetChatMemberCount struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup or channel in
	// the format @username
	ChatID int64 `json:"chat_id"`
}

GetChatMemberCount holds parameters for the getChatMemberCount method. Since: Bot API 2.1 See https://core.telegram.org/bots/api#getchatmembercount

type GetChatMenuButton

type GetChatMenuButton struct {
	// ChatID Optional. Unique identifier for the target private chat. If not specified, the bot's default menu
	// button will be returned.
	ChatID int64 `json:"chat_id,omitempty"`
}

GetChatMenuButton holds parameters for the getChatMenuButton method. Since: Bot API 6.0 See https://core.telegram.org/bots/api#getchatmenubutton

type GetCustomEmojiStickers

type GetCustomEmojiStickers struct {
	// CustomEmojiIDs Required. A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji
	// identifiers can be specified.
	CustomEmojiIDs []string `json:"custom_emoji_ids"`
}

GetCustomEmojiStickers holds parameters for the getCustomEmojiStickers method. Since: Bot API 6.2 See https://core.telegram.org/bots/api#getcustomemojistickers

type GetFile

type GetFile struct {
	// FileID Required. File identifier to get information about
	FileID string `json:"file_id"`
}

GetFile holds parameters for the getFile method. See https://core.telegram.org/bots/api#getfile

type GetGameHighScores

type GetGameHighScores struct {
	// UserID Required. Target user id
	UserID int64 `json:"user_id"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the sent message.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
}

GetGameHighScores holds parameters for the getGameHighScores method. Since: Bot API 2.2 See https://core.telegram.org/bots/api#getgamehighscores

type GetManagedBotAccessSettings

type GetManagedBotAccessSettings struct {
	// BotUserID identifies the managed bot.
	BotUserID int64 `json:"bot_user_id"`
}

GetManagedBotAccessSettings holds parameters for the getManagedBotAccessSettings method. Since: Bot API 10.0 See https://core.telegram.org/bots/api#getmanagedbotaccesssettings

type GetManagedBotToken

type GetManagedBotToken struct {
	// UserID Required. User identifier of the managed bot whose token will be returned
	UserID int64 `json:"user_id"`
}

GetManagedBotToken holds parameters for the getManagedBotToken method. See https://core.telegram.org/bots/api#getmanagedbottoken

type GetMyCommands

type GetMyCommands struct {
	// Scope Optional. A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.
	Scope *BotCommandScope `json:"scope,omitempty"`
	// Language Optional. A two-letter ISO 639-1 language code or an empty string
	Language string `json:"language_code,omitempty"`
}

GetMyCommands holds parameters for the getMyCommands method. Since: Bot API 4.7 See https://core.telegram.org/bots/api#getmycommands

type GetMyDefaultAdministratorRights

type GetMyDefaultAdministratorRights struct {
	// ForChannels Optional. Pass True to get default administrator rights of the bot in channels. Otherwise,
	// default administrator rights of the bot for groups and supergroups will be returned.
	ForChannels bool `json:"for_channels"`
}

GetMyDefaultAdministratorRights holds parameters for the getMyDefaultAdministratorRights method. Since: Bot API 6.0 See https://core.telegram.org/bots/api#getmydefaultadministratorrights

type GetMyDescription

type GetMyDescription struct {
	// Language Optional. A two-letter ISO 639-1 language code or an empty string
	Language string `json:"language_code,omitempty"`
}

GetMyDescription holds parameters for the getMyDescription method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#getmydescription

type GetMyName

type GetMyName struct {
	// Language Optional. A two-letter ISO 639-1 language code or an empty string
	Language string `json:"language_code,omitempty"`
}

GetMyName holds parameters for the getMyName method. Since: Bot API 6.7 See https://core.telegram.org/bots/api#getmyname

type GetMyShortDescription

type GetMyShortDescription struct {
	// Language Optional. A two-letter ISO 639-1 language code or an empty string
	Language string `json:"language_code,omitempty"`
}

GetMyShortDescription holds parameters for the getMyShortDescription method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#getmyshortdescription

type GetStarTransactions

type GetStarTransactions struct {
	// Offset Optional. Number of transactions to skip in the response
	Offset int `json:"offset,omitempty"`
	// Limit Optional. The maximum number of transactions to be retrieved. Values between 1-100 are accepted.
	// Defaults to 100.
	Limit int `json:"limit,omitempty"`
}

GetStarTransactions holds parameters for the getStarTransactions method. Since: Bot API 7.5 See https://core.telegram.org/bots/api#getstartransactions

type GetStickerSet

type GetStickerSet struct {
	// Name Required. Name of the sticker set
	Name string `json:"name"`
}

GetStickerSet holds parameters for the getStickerSet method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#getstickerset

type GetUserChatBoosts

type GetUserChatBoosts struct {
	// ChatID Required. Unique identifier for the chat or username of the channel in the format @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
}

GetUserChatBoosts holds parameters for the getUserChatBoosts method. Since: Bot API 7.0 See https://core.telegram.org/bots/api#getuserchatboosts

type GetUserGifts

type GetUserGifts struct {
	// UserID Required. Unique identifier of the user
	UserID int64 `json:"user_id"`
	// ExcludeUnlimited Optional. Pass True to exclude gifts that can be purchased an unlimited number of times
	ExcludeUnlimited bool `json:"exclude_unlimited,omitempty"`
	// ExcludeLimitedUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number of
	// times and can be upgraded to unique
	ExcludeLimitedUpgradable bool `json:"exclude_limited_upgradable,omitempty"`
	// ExcludeLimitedNonUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number
	// of times and can't be upgraded to unique
	ExcludeLimitedNonUpgradable bool `json:"exclude_limited_non_upgradable,omitempty"`
	// ExcludeUnique Optional. Pass True to exclude unique gifts
	ExcludeUnique bool `json:"exclude_unique,omitempty"`
	// ExcludeFromBlockchain Optional. Pass True to exclude gifts that were assigned from the TON blockchain and
	// can't be resold or transferred in Telegram
	ExcludeFromBlockchain bool `json:"exclude_from_blockchain,omitempty"`
	// SortByPrice Optional. Pass True to sort results by gift price instead of send date. Sorting is applied
	// before pagination.
	SortByPrice bool `json:"sort_by_price,omitempty"`
	// Offset Optional. Offset of the first entry to return as received from the previous request; use an empty
	// string to get the first chunk of results
	Offset string `json:"offset,omitempty"`
	// Limit Optional. The maximum number of gifts to be returned; 1-100. Defaults to 100.
	Limit int `json:"limit,omitempty"`
}

GetUserGifts holds parameters for the GetUserGifts method. Since: Bot API 9.3 See https://core.telegram.org/bots/api#getusergifts

type GetUserPersonalChatMessages

type GetUserPersonalChatMessages struct {
	// UserID Required. Unique identifier for the target user
	UserID int64 `json:"user_id"`
	// Offset is the zero-based offset of the first message to return.
	Offset int `json:"offset,omitempty"`
	// Limit Required. The maximum number of messages to return; 1-20
	Limit int `json:"limit,omitempty"`
}

GetUserPersonalChatMessages holds parameters for the getUserPersonalChatMessages method. Since: Bot API 10.0 See https://core.telegram.org/bots/api#getuserpersonalchatmessages

type GetUserProfileAudios

type GetUserProfileAudios struct {
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// Offset Optional. Sequential number of the first audio to be returned. By default, all audios are
	// returned.
	Offset int `json:"offset,omitempty"`
	// Limit Optional. Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults
	// to 100.
	Limit int `json:"limit,omitempty"`
}

GetUserProfileAudios holds parameters for the GetUserProfileAudios method. Since: Bot API 9.3 See https://core.telegram.org/bots/api#getuserprofileaudios

type GetUserProfilePhotos

type GetUserProfilePhotos struct {
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// Offset Optional. Sequential number of the first photo to be returned. By default, all photos are
	// returned.
	Offset int `json:"offset,omitempty"`
	// Limit Optional. Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults
	// to 100.
	Limit int `json:"limit,omitempty"`
}

GetUserProfilePhotos holds parameters for the GetUserProfilePhotos method. Since: Bot API 1.4 See https://core.telegram.org/bots/api#getuserprofilephotos

type Gift

type Gift struct {
	// ID Unique identifier of the gift
	ID string `json:"id"`
	// Sticker The sticker that represents the gift
	Sticker Sticker `json:"sticker"`
	// StarCount The number of Telegram Stars that must be paid to send the sticker
	StarCount int `json:"star_count"`
	// UpdateStarCount is the number of Stars required to upgrade the gift.
	UpdateStarCount *int `json:"update_star_count,omitempty"`
	// IsPremium Optional. True, if the gift can only be purchased by Telegram Premium subscribers
	IsPremium *bool `json:"is_premium,omitempty"`
	// HasColors Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance
	HasColors *bool `json:"has_colors,omitempty"`
	// TotalCount Optional. The total number of gifts of this type that can be sent by all users; for limited
	// gifts only
	TotalCount *int `json:"total_count,omitempty"`
	// RemainingCount Optional. The number of remaining gifts of this type that can be sent by all users; for
	// limited gifts only
	RemainingCount *int `json:"remaining_count,omitempty"`
	// PersonalTotalCount Optional. The total number of gifts of this type that can be sent by the bot; for
	// limited gifts only
	PersonalTotalCount *int `json:"personal_total_count,omitempty"`
	// PersonalRemainingCount Optional. The number of remaining gifts of this type that can be sent by the bot;
	// for limited gifts only
	PersonalRemainingCount *int `json:"personal_remaining_count,omitempty"`
	// Background Optional. Background of the gift
	Background *GiftBackground `json:"background,omitempty"`
	// UniqueGiftVariantColor identifies the color used by unique variants of the gift.
	UniqueGiftVariantColor *int `json:"unique_gift_variant_color,omitempty"`
	// PublisherChat Optional. Information about the chat that published the gift
	PublisherChat *Chat `json:"publisher_chat,omitempty"`
}

Gift represents a gift that can be sent. Since: Bot API 9.0

type GiftBackground

type GiftBackground struct {
	// CenterColor Center color of the background in RGB format
	CenterColor int `json:"center_color"`
	// EdgeColor Edge color of the background in RGB format
	EdgeColor int `json:"edge_color"`
	// TextColor Text color of the background in RGB format
	TextColor int `json:"text_color"`
}

GiftBackground represents the background of a gift. Since: Bot API 9.0

type GiftInfo

type GiftInfo struct {
	// Gift Information about the gift
	Gift Gift `json:"gift"`

	// OwnedGiftID Optional. Unique identifier of the received gift for the bot; only present for gifts received
	// on behalf of business accounts
	OwnedGiftID string `json:"owned_gift_id,omitempty"`
	// ConvertStarCount Optional. Number of Telegram Stars that can be claimed by the receiver by converting the
	// gift; omitted if conversion to Telegram Stars is impossible
	ConvertStarCount int `json:"convert_star_count,omitempty"`
	// PrepaidUpgradeStarCount Optional. Number of Telegram Stars that were prepaid for the ability to upgrade
	// the gift
	PrepaidUpgradeStarCount int `json:"prepaid_upgrade_star_count,omitempty"`
	// IsUpgradeSeparate Optional. True, if the gift's upgrade was purchased after the gift was sent
	IsUpgradeSeparate bool `json:"is_upgrade_separate,omitempty"`
	// CanBeUpgraded Optional. True, if the gift can be upgraded to a unique gift
	CanBeUpgraded bool `json:"can_be_upgraded,omitempty"`
	// Text Optional. Text of the message that was added to the gift
	Text string `json:"text,omitempty"`
	// Entities Optional. Special entities that appear in the text
	Entities []MessageEntity `json:"entities,omitempty"`
	// IsPrivate Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise,
	// everyone will be able to see them
	IsPrivate bool `json:"is_private,omitempty"`
	// UniqueGiftNumber Optional. Unique number reserved for this gift when upgraded. See the number field in
	// UniqueGift.
	UniqueGiftNumber int `json:"unique_gift_number,omitempty"`
}

GiftInfo contains information about a received gift. Since: Bot API 9.0

type GiftPremiumSubscription

type GiftPremiumSubscription struct {
	// UserID Required. Unique identifier of the target user who will receive a Telegram Premium subscription
	UserID int64 `json:"user_id"`
	// MonthCount Required. Number of months the Telegram Premium subscription will be active for the user; must
	// be one of 3, 6, or 12
	MonthCount int `json:"month_count"`
	// StarCount Required. Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000
	// for 3 months, 1500 for 6 months, and 2500 for 12 months
	StarCount int `json:"star_count"`
	// Text Optional. Text that will be shown along with the service message about the subscription; 0-128
	// characters
	Text string `json:"text,omitempty"`
	// TextParseMode Optional. Mode for parsing entities in the text. See formatting options for more details.
	// Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”,
	// “custom_emoji”, and “date_time” are ignored.
	TextParseMode ParseMode `json:"text_parse_mode,omitempty"`
	// TextEntities Optional. A JSON-serialized list of special entities that appear in the gift text. It can be
	// specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”,
	// “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
}

GiftPremiumSubscription holds parameters for the giftPremiumSubscription method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#giftpremiumsubscription

type Gifts

type Gifts struct {
	// Gifts The list of gifts
	Gifts []Gift `json:"gifts"`
}

Gifts represents a list of gifts. Since: Bot API 9.0

type Giveaway

type Giveaway struct {
	// Chats The list of chats which the user must join to participate in the giveaway
	Chats []Chat `json:"chats"`
	// WinnersSelectionDate Point in time (Unix timestamp) when winners of the giveaway will be selected
	WinnersSelectionDate int `json:"winners_selection_date"`
	// WinnerCount The number of users which are supposed to be selected as winners of the giveaway
	WinnerCount int `json:"winner_count"`

	// OnlyNewMembers Optional. True, if only users who join the chats after the giveaway started should be
	// eligible to win
	OnlyNewMembers bool `json:"only_new_members,omitempty"`
	// HasPublicWinners Optional. True, if the list of giveaway winners will be visible to everyone
	HasPublicWinners bool `json:"has_public_winners,omitempty"`
	// PrizeDescription Optional. Description of additional giveaway prize
	PrizeDescription string `json:"prize_description,omitempty"`
	// CountryCodes Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries
	// from which eligible users for the giveaway must come. If empty, then all users can participate in the
	// giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.
	CountryCodes []string `json:"country_codes,omitempty"`
	// PrizeStarCount Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram
	// Star giveaways only
	PrizeStarCount int `json:"prize_star_count,omitempty"`
	// PremiumSubscriptionMonthCount Optional. The number of months the Telegram Premium subscription won from
	// the giveaway will be active for; for Telegram Premium giveaways only
	PremiumSubscriptionMonthCount int `json:"premium_subscription_month_count,omitempty"`
}

Giveaway represents a message about a scheduled giveaway. Since: Bot API 7.0

type GiveawayCompleted

type GiveawayCompleted struct {
	// WinnerCount Number of winners in the giveaway
	WinnerCount int `json:"winner_count"`
	// UnclaimedPrizeCount Optional. Number of undistributed prizes
	UnclaimedPrizeCount int `json:"unclaimed_prize_count,omitempty"`
	// GiveawayMessage Optional. Message with the giveaway that was completed, if it wasn't deleted
	GiveawayMessage *Message `json:"giveaway_message,omitempty"`
	// IsStarGiveaway Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the
	// giveaway is a Telegram Premium giveaway.
	IsStarGiveaway bool `json:"is_star_giveaway,omitempty"`
}

GiveawayCompleted represents a service message about the completion of a giveaway without public winners. Since: Bot API 7.0

type GiveawayCreated

type GiveawayCreated struct {
	// PrizeStarCount Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram
	// Star giveaways only
	PrizeStarCount int `json:"prize_star_count,omitempty"`
}

GiveawayCreated represents a service message about a giveaway being created. Since: Bot API 7.0

type GiveawayWinners

type GiveawayWinners struct {
	// Chat The chat that created the giveaway
	Chat Chat `json:"chat"`
	// GiveawayMessageID Identifier of the message with the giveaway in the chat
	GiveawayMessageID int `json:"giveaway_message_id"`
	// WinnersSelectionDate Point in time (Unix timestamp) when winners of the giveaway were selected
	WinnersSelectionDate int `json:"winners_selection_date"`
	// WinnerCount Total number of winners in the giveaway
	WinnerCount int `json:"winner_count"`
	// Winners List of up to 100 winners of the giveaway
	Winners []User `json:"winners"`

	// AdditionalChatCount Optional. The number of other chats the user had to join in order to be eligible for
	// the giveaway
	AdditionalChatCount int `json:"additional_chat_count,omitempty"`
	// PrizeStarCount Optional. The number of Telegram Stars that were split between giveaway winners; for
	// Telegram Star giveaways only
	PrizeStarCount int `json:"prize_star_count,omitempty"`
	// PremiumSubscriptionMonthCount Optional. The number of months the Telegram Premium subscription won from
	// the giveaway will be active for; for Telegram Premium giveaways only
	PremiumSubscriptionMonthCount int `json:"premium_subscription_month_count,omitempty"`
	// UnclaimedPrizeCount Optional. Number of undistributed prizes
	UnclaimedPrizeCount int `json:"unclaimed_prize_count,omitempty"`
	// OnlyNewMembers Optional. True, if only users who had joined the chats after the giveaway started were
	// eligible to win
	OnlyNewMembers bool `json:"only_new_members,omitempty"`
	// WasRefunded Optional. True, if the giveaway was canceled because the payment for it was refunded
	WasRefunded bool `json:"was_refunded,omitempty"`
	// PrizeDescription Optional. Description of additional giveaway prize
	PrizeDescription string `json:"prize_description,omitempty"`
}

GiveawayWinners represents a message about the completion of a giveaway with public winners. Since: Bot API 7.0

type InaccessibleMessage

type InaccessibleMessage struct {
	// Chat Chat the message belonged to
	Chat Chat `json:"chat"`
	// MessageID Unique message identifier inside the chat
	MessageID int `json:"message_id"`
	// Date Always 0. The field can be used to differentiate regular and inaccessible messages.
	Date int `json:"date"`
}

InaccessibleMessage describes a message that was deleted or is otherwise inaccessible. Since: Bot API 7.0 See https://core.telegram.org/bots/api#inaccessiblemessage

type InlineKeyboardButton

type InlineKeyboardButton struct {
	// Text Label text on the button
	Text string `json:"text"`
	// URL Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can
	// be used to mention a user by their identifier without using a username, if this is allowed by their
	// privacy settings.
	URL string `json:"url,omitempty"`
	// CallbackData Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64
	// bytes
	CallbackData string `json:"callback_data,omitempty"`
	// Style Optional. Style of the button. Must be one of “danger” (red), “success” (green) or
	// “primary” (blue). If omitted, then an app-specific style is used.
	Style KeyboardButtonStyle `json:"style,omitempty"` // Since: Bot API 9.4
	// IconCustomEmojiID Optional. Unique identifier of the custom emoji shown before the text of the button.
	// Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent
	// by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium
	// subscription.
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` // Since: Bot API 9.4
}

InlineKeyboardButton represents one button of an inline keyboard. Since: Bot API 2.0 See https://core.telegram.org/bots/api#inlinekeyboardbutton

type InlineKeyboardMarkup

type InlineKeyboardMarkup struct {
	// InlineKeyboard Array of button rows, each represented by an Array of InlineKeyboardButton objects
	InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard,omitempty"`
}

InlineKeyboardMarkup represents an inline keyboard that appears right next to the message it belongs to. Since: Bot API 2.0 See https://core.telegram.org/bots/api#inlinekeyboardmarkup

type InlineQuery

type InlineQuery struct {
	// ID Unique identifier for this query
	ID string `json:"id"`
	// From Sender
	From User `json:"from"`
	// Query Text of the query (up to 256 characters)
	Query string `json:"query"`
	// Offset Offset of the results to be returned, can be controlled by the bot
	Offset string `json:"offset"`
	// ChatType Optional. Type of the chat from which the inline query was sent. Can be either “sender” for
	// a private chat with the inline query sender, “private”, “group”, “supergroup”, or
	// “channel”. The chat type should be always known for requests sent from official clients and most
	// third-party clients, unless the request was sent from a secret chat.
	ChatType *ChatType `json:"chat_type,omitempty"`
	// Location Optional. Sender location, only for bots that request user location
	Location *Location `json:"location,omitempty"`
}

InlineQuery represents an incoming inline query. Since: Bot API 1.7 See https://core.telegram.org/bots/api#inlinequery

type InlineQueryResult

type InlineQueryResult map[string]any

InlineQueryResult is a JSON-serializable inline query result object. Since: Bot API 1.7 See https://core.telegram.org/bots/api#inlinequeryresult

type InlineQueryResultsButton

type InlineQueryResultsButton struct {
	// Text Label text on the button
	Text string `json:"text"`
	// WebApp Optional. Description of the Web App that will be launched when the user presses the button. The
	// Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web
	// App.
	WebApp *WebAppInfo `json:"web_app,omitempty"`
	// StartParameter Optional. Deep-linking parameter for the /start message sent to the bot when a user
	// presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that
	// sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results
	// accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even
	// before showing any. The user presses the button, switches to a private chat with the bot and, in doing
	// so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer
	// a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's
	// inline capabilities.
	StartParameter string `json:"start_parameter,omitempty"`
}

InlineQueryResultsButton represents a button shown above inline query results. Since: Bot API 6.3 See https://core.telegram.org/bots/api#inlinequeryresultsbutton

type InputChecklist

type InputChecklist struct {
	// Title Title of the checklist; 1-255 characters after entities parsing
	Title string `json:"title"`
	// ParseMode Optional. Mode for parsing entities in the title. See formatting options for more details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// TitleEntities Optional. List of special entities that appear in the title, which can be specified instead
	// of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and
	// date_time entities are allowed.
	TitleEntities []MessageEntity `json:"title_entities,omitempty"`
	// Tasks List of 1-30 tasks in the checklist
	Tasks []InputChecklistTask `json:"tasks"`
	// OtherCanAddTasks Optional. Pass True if other users can add tasks to the checklist
	// Subject to change in v2: the Go field name may be corrected to OthersCanAddTasks.
	OtherCanAddTasks bool `json:"others_can_add_tasks,omitempty"`
	// OtherCanMarkTasksAsDone Optional. Pass True if other users can mark tasks as done or not done in the
	// checklist
	// Subject to change in v2: the Go field name may be corrected to OthersCanMarkTasksAsDone.
	OtherCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done,omitempty"`
}

InputChecklist represents a checklist to be sent. Since: Bot API 9.1

type InputChecklistTask

type InputChecklistTask struct {
	// ID Unique identifier of the task; must be positive and unique among all task identifiers currently
	// present in the checklist
	ID int `json:"id"`
	// Text Text of the task; 1-100 characters after entities parsing
	Text string `json:"text"`
	// ParseMode Optional. Mode for parsing entities in the text. See formatting options for more details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// TextEntities Optional. List of special entities that appear in the text, which can be specified instead
	// of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and
	// date_time entities are allowed.
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
}

InputChecklistTask describes a task in a checklist. Since: Bot API 9.1

type InputMedia

type InputMedia struct {
	// Type identifies the concrete input-media variant.
	Type InputMediaType `json:"type"`
	// Media is a file_id, HTTP URL, or attach:// reference for the media.
	Media string `json:"media"`

	// Caption is the optional media caption.
	Caption *string `json:"caption,omitempty"`
	// ParseMode selects how entities in Caption are parsed.
	ParseMode *ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. List of special entities that appear in the caption, which can be specified
	// instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia *bool `json:"show_caption_above_media,omitempty"` // Since: Bot API 7.4
	// HasSpoiler requests that supported media be covered by a spoiler animation.
	HasSpoiler *bool `json:"has_spoiler,omitempty"` // Since: Bot API 6.4

	// Cover Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the
	// Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name>
	// name. More information on Sending Files »
	Cover *string `json:"cover"` // Since: Bot API 8.3
	// StartTimestamp Optional. Start timestamp for the video in the message
	StartTimestamp *int `json:"start_timestamp"` // Since: Bot API 8.3
	// Width is the optional media width in pixels.
	Width *int `json:"width,omitempty"`
	// Height is the optional media height in pixels.
	Height *int `json:"height,omitempty"`
	// Duration is the optional duration of the media in seconds.
	Duration *int `json:"duration,omitempty"`
	// SupportsStreaming Optional. Pass True if the uploaded video is suitable for streaming
	SupportsStreaming *bool `json:"supports_streaming,omitempty"`

	// Performer Optional. Performer of the audio
	Performer *string `json:"performer,omitempty"`
	// Title is the optional title of audio or venue media.
	Title *string `json:"title,omitempty"`

	// Emoji Optional. Emoji associated with the sticker; only for just uploaded stickers
	Emoji *string `json:"emoji,omitempty"`

	// Latitude Latitude of the location
	Latitude *float64 `json:"latitude,omitempty"`
	// Longitude Longitude of the location
	Longitude *float64 `json:"longitude,omitempty"`
	// Address Address of the venue
	Address *string `json:"address,omitempty"`
	// FoursquareID Optional. Foursquare identifier of the venue
	FoursquareID *string `json:"foursquare_id,omitempty"`
	// FoursquareType Optional. Foursquare type of the venue, if known. (For example,
	// “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
	FoursquareType *string `json:"foursquare_type,omitempty"`
	// GooglePlaceID Optional. Google Places identifier of the venue
	GooglePlaceID *string `json:"google_place_id,omitempty"`
	// GooglePlaceType Optional. Google Places type of the venue. (See supported types.)
	GooglePlaceType *string `json:"google_place_type,omitempty"`

	// HorizontalAccuracy Optional. The radius of uncertainty for the location, measured in meters; 0-1500
	HorizontalAccuracy *float64 `json:"horizontal_accuracy,omitempty"`
}

InputMedia represents the content of a media message to be sent. Since: Bot API 4.0 See https://core.telegram.org/bots/api#inputmedia

type InputMediaType

type InputMediaType string

InputMediaType represents the type of input media.

const (
	// InputMediaTypeAnimation is a GIF or H.264/MPEG-4 AVC video without sound.
	InputMediaTypeAnimation InputMediaType = "animation"
	// InputMediaTypeDocument is a general file.
	InputMediaTypeDocument InputMediaType = "document"
	// InputMediaTypePhoto is a photo.
	InputMediaTypePhoto InputMediaType = "photo"
	// InputMediaTypeVideo is a video.
	InputMediaTypeVideo InputMediaType = "video"
	// InputMediaTypeAudio is an audio file.
	InputMediaTypeAudio InputMediaType = "audio"
	// InputMediaTypeVoiceNote is a voice message.
	//
	// Since: Bot API 10.2
	InputMediaTypeVoiceNote InputMediaType = "voice_note"

	// InputMediaTypeSticker is a sticker.
	InputMediaTypeSticker InputMediaType = "sticker"
	// InputMediaTypeLocation is a location.
	InputMediaTypeLocation InputMediaType = "location"
	// InputMediaTypeVenue is a venue.
	InputMediaTypeVenue InputMediaType = "venue"
	// InputMediaTypeLivePhoto is a live photo.
	InputMediaTypeLivePhoto InputMediaType = "live_photo" // Since: Bot API 10.0
)

type InputPaidMedia

type InputPaidMedia struct {
	// Type identifies the concrete paid-media variant.
	Type InputPaidMediaType `json:"type"`
	// Media is a file_id, HTTP URL, or attach:// reference for the paid media.
	Media string `json:"media"`

	// Cover Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the
	// Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name>
	// name. More information on Sending Files »
	Cover *string `json:"cover,omitempty"` // Since: Bot API 8.3
	// StartTimestamp Optional. Start timestamp for the video in the message
	StartTimestamp *int64 `json:"start_timestamp,omitempty"` // Since: Bot API 8.3
	// Width Optional. Video width
	Width *int `json:"width,omitempty"`
	// Height Optional. Video height
	Height *int `json:"height,omitempty"`
	// Duration Optional. Video duration in seconds
	Duration *int `json:"duration,omitempty"`
	// SupportsStreaming Optional. Pass True if the uploaded video is suitable for streaming
	SupportsStreaming *bool `json:"supports_streaming,omitempty"`
}

InputPaidMedia describes the paid media to be sent. Since: Bot API 7.6 See https://core.telegram.org/bots/api#inputpaidmedia

type InputPaidMediaType

type InputPaidMediaType string

InputPaidMediaType represents the type of paid media.

const (
	// InputPaidMediaTypeVideo represents a paid video.
	InputPaidMediaTypeVideo InputPaidMediaType = "video"
	// InputPaidMediaTypePhoto represents a paid photo.
	InputPaidMediaTypePhoto InputPaidMediaType = "photo"
	// InputPaidMediaTypeLivePhoto represents a paid live photo.
	InputPaidMediaTypeLivePhoto InputPaidMediaType = "live_photo" // Since: Bot API 10.0
)

type InputPollMedia

type InputPollMedia struct {
	// Type identifies the poll-media variant.
	Type string `json:"type"`
	// Media is the file_id or URL of the poll media.
	Media string `json:"media"`
}

InputPollMedia describes the media to attach to a poll or its explanation. Since: Bot API 10.0 See https://core.telegram.org/bots/api#inputpollmedia

type InputPollOption

type InputPollOption struct {
	// Text Option text, 1-100 characters
	Text string `json:"text"`
	// TextParseMode Optional. Mode for parsing entities in the text. See formatting options for more details.
	// Currently, only custom emoji entities are allowed.
	TextParseMode ParseMode `json:"text_parse_mode,omitempty"`
	// TextEntities Optional. A JSON-serialized list of special entities that appear in the poll option text. It
	// can be specified instead of text_parse_mode.
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	// Media Optional. Media added to the poll option
	Media *InputPollOptionMedia `json:"media,omitempty"` // Since: Bot API 10.0
}

InputPollOption contains information about one answer option in a poll to be sent. Since: Bot API 7.3 See https://core.telegram.org/bots/api#inputpolloption

type InputPollOptionMedia

type InputPollOptionMedia struct {
	// Type identifies the poll-option media variant.
	Type string `json:"type"`
	// Media is the file_id or URL of the option media for non-link variants.
	Media string `json:"media,omitempty"`
	// URL contains the HTTP URL.
	URL string `json:"url,omitempty"` // Since: Bot API 10.1; for type "link"
}

InputPollOptionMedia describes the media to attach to a poll option. For type "link" set URL instead of Media. Since: Bot API 10.0 See https://core.telegram.org/bots/api#inputpolloptionmedia

type InputProfilePhoto

type InputProfilePhoto struct {
	// Type identifies the static-photo or animated-photo variant.
	Type InputProfilePhotoType `json:"type"`

	// Photo The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so
	// you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under
	// <file_attach_name>. More information on Sending Files »
	// Static fields (for static photos)
	Photo *string `json:"photo,omitempty"`

	// Animation The animated profile photo. Profile photos can't be reused and can only be uploaded as a new
	// file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using
	// multipart/form-data under <file_attach_name>. More information on Sending Files »
	// Animated fields (for animated profile videos)
	Animation *string `json:"animation,omitempty"`
	// MainFrameTimestamp Optional. Timestamp in seconds of the frame that will be used as the static profile
	// photo. Defaults to 0.0.
	MainFrameTimestamp *float64 `json:"main_frame_timestamp,omitempty"`
}

InputProfilePhoto describes a profile photo to set. Since: Bot API 9.0 See https://core.telegram.org/bots/api#inputprofilephoto

type InputProfilePhotoType

type InputProfilePhotoType string

InputProfilePhotoType indicates the type of a profile photo input.

const (
	// InputProfilePhotoStaticType identifies a static profile photo input.
	InputProfilePhotoStaticType InputProfilePhotoType = "static"
	// InputProfilePhotoAnimatedType identifies an animated profile photo input.
	InputProfilePhotoAnimatedType InputProfilePhotoType = "animated"
)

type InputRichBlock added in v1.1.0

type InputRichBlock interface {
	// contains filtered or unexported methods
}

InputRichBlock represents a block available to format an outgoing rich message.

Since: Bot API 10.2

type InputRichBlockAnchor added in v1.1.0

type InputRichBlockAnchor struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Name is the user-facing or reference name of the value.
	Name string `json:"name"`
}

InputRichBlockAnchor is a block containing an anchor corresponding to an HTML <a> tag with a name attribute.

Since: Bot API 10.2

type InputRichBlockAnimation added in v1.1.0

type InputRichBlockAnimation struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Animation contains the animation rendered by the block.
	Animation InputMedia `json:"animation"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockAnimation is an animation block corresponding to the HTML <video> tag. The animation caption is ignored; use Caption instead.

Since: Bot API 10.2

type InputRichBlockAudio added in v1.1.0

type InputRichBlockAudio struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Audio contains the audio rendered by the block.
	Audio InputMedia `json:"audio"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockAudio is a music-file block corresponding to the HTML <audio> tag. The audio caption is ignored; use Caption instead.

Since: Bot API 10.2

type InputRichBlockBlockQuotation added in v1.1.0

type InputRichBlockBlockQuotation struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Blocks contains the nested rich-message blocks.
	Blocks []InputRichBlock `json:"blocks"`
	// Credit contains attribution displayed with the block.
	Credit *RichText `json:"credit,omitempty"`
}

InputRichBlockBlockQuotation is a block quotation in an input rich message.

Since: Bot API 10.2

type InputRichBlockCollage added in v1.1.0

type InputRichBlockCollage struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Blocks contains the nested rich-message blocks.
	Blocks []InputRichBlock `json:"blocks"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockCollage is a collage in an input rich message.

Since: Bot API 10.2

type InputRichBlockDetails added in v1.1.0

type InputRichBlockDetails struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Summary contains the visible summary of a details block.
	Summary RichText `json:"summary"`
	// Blocks contains the nested rich-message blocks.
	Blocks []InputRichBlock `json:"blocks"`
	// IsOpen requests the details block to be expanded initially.
	IsOpen bool `json:"is_open,omitempty"`
}

InputRichBlockDetails is an expandable block in an input rich message.

Since: Bot API 10.2

type InputRichBlockDivider added in v1.1.0

type InputRichBlockDivider struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
}

InputRichBlockDivider is a divider corresponding to the HTML <hr/> tag.

Since: Bot API 10.2

type InputRichBlockFooter added in v1.1.0

type InputRichBlockFooter struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Text contains the formatted or plain text content.
	Text RichText `json:"text"`
}

InputRichBlockFooter is a footer corresponding to the HTML <footer> tag.

Since: Bot API 10.2

type InputRichBlockList added in v1.1.0

type InputRichBlockList struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Items contains the list items.
	Items []InputRichBlockListItem `json:"items"`
}

InputRichBlockList is a list of input rich-message blocks.

Since: Bot API 10.2

type InputRichBlockListItem added in v1.1.0

type InputRichBlockListItem struct {
	// Blocks contains the nested rich-message blocks.
	Blocks []InputRichBlock `json:"blocks"`
	// HasCheckbox reports whether the list item includes a checkbox.
	HasCheckbox bool `json:"has_checkbox,omitempty"`
	// IsChecked reports whether the list-item checkbox is checked.
	IsChecked bool `json:"is_checked,omitempty"`
	// Value sets the numeric marker value for an ordered list item.
	Value int `json:"value,omitempty"`
	// Type is the Bot API type discriminator.
	Type RichBlockListItemType `json:"type,omitempty"`
}

InputRichBlockListItem represents an item in an input rich-message list.

Since: Bot API 10.2

func NewInputRichBlockListItem added in v1.1.0

func NewInputRichBlockListItem(blocks ...InputRichBlock) *InputRichBlockListItem

NewInputRichBlockListItem creates a list item containing blocks.

Since: Bot API 10.2

func (*InputRichBlockListItem) Check added in v1.1.0

Check marks the list item's checkbox as checked.

Since: Bot API 10.2

func (*InputRichBlockListItem) SetCheckbox added in v1.1.0

func (i *InputRichBlockListItem) SetCheckbox(hasCheckbox bool) *InputRichBlockListItem

SetCheckbox configures whether the list item has a checkbox.

Since: Bot API 10.2

func (*InputRichBlockListItem) SetType added in v1.1.0

SetType sets the label style of an ordered-list item.

Since: Bot API 10.2

func (*InputRichBlockListItem) SetValue added in v1.1.0

SetValue sets the numeric value of an ordered-list item.

Since: Bot API 10.2

type InputRichBlockMap added in v1.1.0

type InputRichBlockMap struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Location contains the map location.
	Location Location `json:"location"`
	// Zoom sets the map zoom level.
	Zoom uint8 `json:"zoom,omitempty"`
	// Width is the requested media or map width in pixels.
	Width uint16 `json:"width,omitempty"`
	// Height is the requested media or map height in pixels.
	Height uint16 `json:"height,omitempty"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockMap is a location map in an input rich message.

Since: Bot API 10.2

type InputRichBlockMath added in v1.1.0

type InputRichBlockMath struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Expression contains the mathematical expression source.
	Expression string `json:"expression"`
}

InputRichBlockMath is a block containing a mathematical expression in LaTeX format, corresponding to the custom HTML <tg-math-block> tag.

Since: Bot API 10.2

type InputRichBlockParagraph added in v1.1.0

type InputRichBlockParagraph struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Text contains the formatted or plain text content.
	Text RichText `json:"text"`
}

InputRichBlockParagraph is a text paragraph corresponding to the HTML <p> tag.

Since: Bot API 10.2

type InputRichBlockPhoto added in v1.1.0

type InputRichBlockPhoto struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Photo contains or identifies the associated photo.
	Photo InputMedia `json:"photo"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockPhoto is a photo block corresponding to the HTML <img> tag. The photo caption is ignored; use Caption instead.

Since: Bot API 10.2

type InputRichBlockPreformatted added in v1.1.0

type InputRichBlockPreformatted struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Text contains the formatted or plain text content.
	Text RichText `json:"text"`
	// Language identifies the programming language used for syntax highlighting.
	Language string `json:"language,omitempty"`
}

InputRichBlockPreformatted is a preformatted text block corresponding to nested HTML <pre> and <code> tags.

Since: Bot API 10.2

type InputRichBlockPullQuotation added in v1.1.0

type InputRichBlockPullQuotation struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Text contains the formatted or plain text content.
	Text RichText `json:"text"`
	// Credit contains attribution displayed with the block.
	Credit *RichText `json:"credit,omitempty"`
}

InputRichBlockPullQuotation is a centered quotation in an input rich message.

Since: Bot API 10.2

type InputRichBlockSectionHeading added in v1.1.0

type InputRichBlockSectionHeading struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Text contains the formatted or plain text content.
	Text RichText `json:"text"`
	// Size selects the section heading level from 1 through 6.
	Size uint8 `json:"size"`
}

InputRichBlockSectionHeading is a section heading corresponding to an HTML <h1> through <h6> tag.

Since: Bot API 10.2

type InputRichBlockSlideshow added in v1.1.0

type InputRichBlockSlideshow struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Blocks contains the nested rich-message blocks.
	Blocks []InputRichBlock `json:"blocks"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockSlideshow is a slideshow in an input rich message.

Since: Bot API 10.2

type InputRichBlockTable added in v1.1.0

type InputRichBlockTable struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Cells contains the table rows and cells.
	Cells [][]RichBlockTableCell `json:"cells"`
	// IsBordered requests visible table borders.
	IsBordered bool `json:"is_bordered,omitempty"`
	// IsStriped requests alternating table row styling.
	IsStriped bool `json:"is_striped,omitempty"`
	// Caption contains the media or block caption.
	Caption *RichText `json:"caption,omitempty"`
}

InputRichBlockTable is a table in an input rich message.

Since: Bot API 10.2

type InputRichBlockThinking added in v1.1.0

type InputRichBlockThinking struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Text contains the formatted or plain text content.
	Text RichText `json:"text"`
}

InputRichBlockThinking is a block for displaying a thinking state.

Since: Bot API 10.2

type InputRichBlockVideo added in v1.1.0

type InputRichBlockVideo struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// Video contains the video rendered by the block.
	Video InputMedia `json:"video"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockVideo is a video block corresponding to the HTML <video> tag. The video caption is ignored; use Caption instead.

Since: Bot API 10.2

type InputRichBlockVoiceNote added in v1.1.0

type InputRichBlockVoiceNote struct {
	// Type is the Bot API type discriminator.
	Type InputRichType `json:"type"`
	// VoiceNote contains the voice note rendered by the block.
	VoiceNote InputMedia `json:"voice_note"`
	// Caption contains the media or block caption.
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockVoiceNote is a voice-note block corresponding to the HTML <audio> tag. The voice-note caption is ignored; use Caption instead.

Since: Bot API 10.2

type InputRichMessage added in v1.1.0

type InputRichMessage struct {
	// Blocks contains the nested rich-message blocks.
	Blocks []InputRichBlock `json:"blocks,omitempty"` // Since: Bot API 10.2
	// HTML contains rich-message content in Telegram HTML syntax.
	HTML string `json:"html,omitempty"`
	// Markdown contains rich-message content in Telegram Markdown syntax.
	Markdown string `json:"markdown,omitempty"`
	// Media contains or identifies media associated with the value.
	Media []InputRichMessageMedia `json:"media,omitempty"` // Since: Bot API 10.2
	// IsRTL requests right-to-left rich-message layout.
	IsRTL bool `json:"is_rtl,omitempty"`
	// SkipEntityDetection disables automatic detection of links, mentions, hashtags, commands, phone numbers, and bank cards.
	SkipEntityDetection bool `json:"skip_entity_detection,omitempty"`
}

InputRichMessage describes a rich message to be sent. Exactly one of HTML, Markdown, or Blocks must be used.

Since: Bot API 10.1

type InputRichMessageContent added in v1.1.0

type InputRichMessageContent struct {
	// RichMessage contains structured rich-message content.
	RichMessage InputRichMessage `json:"rich_message"`
}

InputRichMessageContent represents the content of a rich message to be sent as the result of an inline query. Use it as the input_message_content value of an InlineQueryResult. Since: Bot API 10.1 See https://core.telegram.org/bots/api#inputrichmessagecontent

type InputRichMessageMedia added in v1.1.0

type InputRichMessageMedia struct {
	// ID uniquely identifies the value within its containing object.
	ID string `json:"id"`
	// Media contains or identifies media associated with the value.
	Media InputMedia `json:"media"`
}

InputRichMessageMedia describes media embedded in outgoing rich-message HTML or Markdown.

Since: Bot API 10.2

type InputRichType added in v1.1.0

type InputRichType string

InputRichType identifies the JSON type of an input rich block.

Since: Bot API 10.2

const (
	// InputRichTypeParagraph identifies a paragraph block.
	InputRichTypeParagraph InputRichType = "paragraph"
	// InputRichTypeSectionHeading identifies a section-heading block.
	InputRichTypeSectionHeading InputRichType = "heading"
	// InputRichTypePre identifies a preformatted block.
	InputRichTypePre InputRichType = "pre"
	// InputRichTypeFooter identifies a footer block.
	InputRichTypeFooter InputRichType = "footer"
	// InputRichTypeDivider identifies a divider block.
	InputRichTypeDivider InputRichType = "divider"
	// InputRichTypeMathematicalExpression identifies a mathematical-expression block.
	InputRichTypeMathematicalExpression InputRichType = "mathematical_expression"
	// InputRichTypeAnchor identifies an anchor block.
	InputRichTypeAnchor InputRichType = "anchor"
	// InputRichTypeList identifies a list block.
	InputRichTypeList InputRichType = "list"
	// InputRichTypeBlockQuotation identifies a block-quotation block.
	InputRichTypeBlockQuotation InputRichType = "blockquote"
	// InputRichTypePullQuotation identifies a pull-quotation block.
	InputRichTypePullQuotation InputRichType = "pullquote"
	// InputRichTypeCollage identifies a collage block.
	InputRichTypeCollage InputRichType = "collage"
	// InputRichTypeSlideshow identifies a slideshow block.
	InputRichTypeSlideshow InputRichType = "slideshow"
	// InputRichTypeTable identifies a table block.
	InputRichTypeTable InputRichType = "table"
	// InputRichTypeDetails identifies an expandable details block.
	InputRichTypeDetails InputRichType = "details"
	// InputRichTypeMap identifies a map block.
	InputRichTypeMap InputRichType = "map"
	// InputRichTypeAnimation identifies an animation block.
	InputRichTypeAnimation InputRichType = "animation"
	// InputRichTypeAudio identifies an audio block.
	InputRichTypeAudio InputRichType = "audio"
	// InputRichTypePhoto identifies a photo block.
	InputRichTypePhoto InputRichType = "photo"
	// InputRichTypeVideo identifies a video block.
	InputRichTypeVideo InputRichType = "video"
	// InputRichTypeVoiceNote identifies a voice-note block.
	InputRichTypeVoiceNote InputRichType = "voice_note"
	// InputRichTypeThinking identifies a thinking block.
	InputRichTypeThinking InputRichType = "thinking"
)

type InputSticker

type InputSticker struct {
	// Sticker The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram
	// servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass
	// “attach://<file_attach_name>” to upload a new file using multipart/form-data under <file_attach_name>
	// name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »
	Sticker string `json:"sticker"`
	// Format Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated”
	// for a .TGS animation, “video” for a .WEBM video
	Format InputStickerFormat `json:"format"`
	// EmojiList List of 1-20 emoji associated with the sticker
	EmojiList []string `json:"emoji_list"`
	// MaskPosition Optional. Position where the mask should be placed on faces. For “mask” stickers only.
	MaskPosition *MaskPosition `json:"mask_position,omitempty"`
	// Keywords Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters.
	// For “regular” and “custom_emoji” stickers only.
	Keywords []string `json:"keywords,omitempty"`
}

InputSticker describes a sticker to be added to a sticker set. Since: Bot API 6.6 See https://core.telegram.org/bots/api#inputsticker

type InputStickerFormat

type InputStickerFormat string

InputStickerFormat represents the format of an input sticker.

const (
	// InputStickerFormatStatic is a static sticker (WEBP).
	InputStickerFormatStatic InputStickerFormat = "static"
	// InputStickerFormatAnimated is an animated sticker (TGS).
	InputStickerFormatAnimated InputStickerFormat = "animated"
	// InputStickerFormatVideo is a video sticker (WEBM).
	InputStickerFormatVideo InputStickerFormat = "video"
)

type InputStoryContent

type InputStoryContent struct {
	// Type identifies the photo or video story-content variant.
	Type InputStoryContentType `json:"type"`

	// Photo fields
	Photo *string `json:"photo,omitempty"`

	// Video fields
	Video *string `json:"video,omitempty"`
	// Duration Optional. Precise duration of the video in seconds; 0-60
	Duration *float64 `json:"duration,omitempty"`
	// CoverFrameTimestamp Optional. Timestamp in seconds of the frame that will be used as the static cover for
	// the story. Defaults to 0.0.
	CoverFrameTimestamp *float64 `json:"cover_frame_timestamp,omitempty"`
	// IsAnimation Optional. Pass True if the video has no sound
	IsAnimation *bool `json:"is_animation,omitempty"`
}

InputStoryContent represents the content of a story to be posted. Since: Bot API 9.0 See https://core.telegram.org/bots/api#inputstorycontent

type InputStoryContentType

type InputStoryContentType string

InputStoryContentType indicates the type of input story content.

const (
	// InputStoryContentPhotoType identifies photo story content.
	InputStoryContentPhotoType InputStoryContentType = "photo"
	// InputStoryContentVideoType identifies video story content.
	InputStoryContentVideoType InputStoryContentType = "video"
)

type Invoice

type Invoice struct {
	// Title Product name
	Title string `json:"title"`
	// Description Product description
	Description string `json:"description"`
	// StartParameter Unique bot deep-linking parameter that can be used to generate this invoice
	StartParameter string `json:"start_parameter"`
	// Currency Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars
	Currency string `json:"currency"`
	// TotalAmount Total price in the smallest units of the currency (integer, not float/double). For example,
	// for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number
	// of digits past the decimal point for each currency (2 for the majority of currencies).
	TotalAmount int `json:"total_amount"`
}

Invoice contains basic information about an invoice. Since: Bot API 3.0

type KeyboardButton

type KeyboardButton struct {
	// Text Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used,
	// it will be sent as a message when the button is pressed.
	Text string `json:"text"`
	// IconCustomEmojiID Optional. Unique identifier of the custom emoji shown before the text of the button.
	// Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent
	// by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium
	// subscription.
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` // Since: Bot API 9.4
	// Style Optional. Style of the button. Must be one of “danger” (red), “success” (green) or
	// “primary” (blue). If omitted, then an app-specific style is used.
	Style KeyboardButtonStyle `json:"style,omitempty"` // Since: Bot API 9.4
	// RequestUsers Optional. If specified, pressing the button will open a list of suitable users. Identifiers
	// of selected users will be sent to the bot in a “users_shared” service message. Available in private
	// chats only.
	RequestUsers *KeyboardButtonRequestUsers `json:"request_users,omitempty"` // Since: Bot API 7.0
	// RequestChat Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a
	// chat will send its identifier to the bot in a “chat_shared” service message. Available in private
	// chats only.
	RequestChat *KeyboardButtonRequestChat `json:"request_chat,omitempty"` // Since: Bot API 6.5
	// RequestManagedBot Optional. If specified, pressing the button will ask the user to create and share a bot
	// that will be managed by the current bot. Available for bots that enabled management of other bots in the
	// @BotFather Mini App. Available in private chats only.
	RequestManagedBot *KeyboardButtonRequestManagedBot `json:"request_managed_bot,omitempty"` // Since: Bot API 9.6
	// RequestContact Optional. If True, the user's phone number will be sent as a contact when the button is
	// pressed. Available in private chats only.
	RequestContact bool `json:"request_contact,omitempty"`
	// RequestLocation Optional. If True, the user's current location will be sent when the button is pressed.
	// Available in private chats only.
	RequestLocation bool `json:"request_location,omitempty"`
	// RequestPoll Optional. If specified, the user will be asked to create a poll and send it to the bot when
	// the button is pressed. Available in private chats only.
	RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"` // Since: Bot API 4.6
	// WebApp Optional. If specified, the described Web App will be launched when the button is pressed. The Web
	// App will be able to send a “web_app_data” service message. Available in private chats only.
	WebApp *WebAppInfo `json:"web_app,omitempty"` // Since: Bot API 6.0
}

KeyboardButton represents one button of the reply keyboard. Since: Bot API 2.0 See https://core.telegram.org/bots/api#keyboardbutton

type KeyboardButtonPollType

type KeyboardButtonPollType struct {
	// Type Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If
	// regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a
	// poll of any type.
	Type PollType `json:"type,omitempty"`
}

KeyboardButtonPollType represents the type of a poll that may be created from a keyboard button. Since: Bot API 4.6 See https://core.telegram.org/bots/api#keyboardbuttonpolltype

type KeyboardButtonRequestChat

type KeyboardButtonRequestChat struct {
	// RequestID Signed 32-bit identifier of the request, which will be received back in the ChatShared object.
	// Must be unique within the message.
	RequestID int `json:"request_id"`
	// ChatIsChannel Pass True to request a channel chat, pass False to request a group or a supergroup chat
	ChatIsChannel bool `json:"chat_is_channel"`
	// ChatIsForum Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If
	// not specified, no additional restrictions are applied.
	ChatIsForum *bool `json:"chat_is_forum,omitempty"`
	// ChatHasUsername Optional. Pass True to request a supergroup or a channel with a username, pass False to
	// request a chat without a username. If not specified, no additional restrictions are applied.
	ChatHasUsername *bool `json:"chat_has_username,omitempty"`
	// ChatIsCreated Optional. Pass True to request a chat owned by the user. Otherwise, no additional
	// restrictions are applied.
	ChatIsCreated *bool `json:"chat_is_created,omitempty"`
	// UserAdministratorRights Optional. A JSON-serialized object listing the required administrator rights of
	// the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no
	// additional restrictions are applied.
	UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"`
	// BotAdministratorRights Optional. A JSON-serialized object listing the required administrator rights of
	// the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no
	// additional restrictions are applied.
	BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"`
	// BotIsMember Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional
	// restrictions are applied.
	BotIsMember bool `json:"bot_is_member,omitempty"`
	// RequestTitle Optional. Pass True to request the chat's title
	RequestTitle bool `json:"request_title,omitempty"`
	// RequestUsername Optional. Pass True to request the chat's username
	RequestUsername bool `json:"request_username,omitempty"`
	// RequestPhoto Optional. Pass True to request the chat's photo
	RequestPhoto bool `json:"request_photo,omitempty"`
}

KeyboardButtonRequestChat defines criteria used to request a suitable chat. Since: Bot API 6.5 See https://core.telegram.org/bots/api#keyboardbuttonrequestchat

type KeyboardButtonRequestManagedBot

type KeyboardButtonRequestManagedBot struct {
	// RequestID Signed 32-bit identifier of the request. Must be unique within the message.
	RequestID int32 `json:"request_id"`
	// SuggestedName Optional. Suggested name for the bot
	SuggestedName string `json:"suggested_name,omitempty"`
	// SuggestedUsername Optional. Suggested username for the bot
	SuggestedUsername string `json:"suggested_username,omitempty"`
}

KeyboardButtonRequestManagedBot defines criteria used to request a managed bot. Since: Bot API 9.6 See https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot

type KeyboardButtonRequestUsers

type KeyboardButtonRequestUsers struct {
	// RequestID Signed 32-bit identifier of the request that will be received back in the UsersShared object.
	// Must be unique within the message.
	RequestID int `json:"request_id"`
	// UserIsBot Optional. Pass True to request bots, pass False to request regular users. If not specified, no
	// additional restrictions are applied.
	UserIsBot *bool `json:"user_is_bot,omitempty"`
	// UserIsPremium Optional. Pass True to request premium users, pass False to request non-premium users. If
	// not specified, no additional restrictions are applied.
	UserIsPremium *bool `json:"user_is_premium,omitempty"`
	// MaxQuantity Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
	MaxQuantity int `json:"max_quantity,omitempty"`
	// RequestName Optional. Pass True to request the users' first and last names
	RequestName bool `json:"request_name,omitempty"`
	// RequestUsername Optional. Pass True to request the users' usernames
	RequestUsername bool `json:"request_username,omitempty"`
	// RequestPhoto Optional. Pass True to request the users' photos
	RequestPhoto bool `json:"request_photo,omitempty"`
}

KeyboardButtonRequestUsers defines criteria used to request suitable users. Since: Bot API 7.0 See https://core.telegram.org/bots/api#keyboardbuttonrequestusers

type KeyboardButtonStyle

type KeyboardButtonStyle string

KeyboardButtonStyle represents the style of a keyboard button.

const (
	// KeyboardButtonStyleDanger marks a destructive keyboard button.
	KeyboardButtonStyleDanger KeyboardButtonStyle = "danger"
	// KeyboardButtonStyleSuccess marks a confirmatory keyboard button.
	KeyboardButtonStyleSuccess KeyboardButtonStyle = "success"
	// KeyboardButtonStylePrimary marks a primary keyboard button.
	KeyboardButtonStylePrimary KeyboardButtonStyle = "primary"
)

type LabeledPrice

type LabeledPrice struct {
	// Label Portion label
	Label string `json:"label"`
	// Amount Price of the product in the smallest units of the currency (integer, not float/double). For
	// example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows
	// the number of digits past the decimal point for each currency (2 for the majority of currencies).
	Amount int `json:"amount"`
}

LabeledPrice represents a price portion. Since: Bot API 3.0 See https://core.telegram.org/bots/api#labeledprice

type LeaveChat

type LeaveChat struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup or channel in
	// the format @username. Channel direct messages chats aren't supported; leave the corresponding channel
	// instead.
	ChatID int64 `json:"chat_id"`
}

LeaveChat holds parameters for the leaveChat method. Since: Bot API 2.1 See https://core.telegram.org/bots/api#leavechat

type Link struct {
	// URL contains the HTTP URL.
	URL string `json:"url"`
}

Link represents an HTTP link. Since: Bot API 10.1 See https://core.telegram.org/bots/api#link

type LinkPreviewOptions

type LinkPreviewOptions struct {
	// IsDisabled Optional. True, if the link preview is disabled
	IsDisabled bool `json:"is_disabled,omitempty"`
	// URL Optional. URL to use for the link preview. If empty, then the first URL found in the message text
	// will be used.
	URL string `json:"url,omitempty"`
	// PreferSmallMedia Optional. True, if the media in the link preview is supposed to be shrunk; ignored if
	// the URL isn't explicitly specified or media size change isn't supported for the preview
	PreferSmallMedia bool `json:"prefer_small_media,omitempty"`
	// PreferLargeMedia Optional. True, if the media in the link preview is supposed to be enlarged; ignored if
	// the URL isn't explicitly specified or media size change isn't supported for the preview
	PreferLargeMedia bool `json:"prefer_large_media,omitempty"`
	// ShowAboveText Optional. True, if the link preview must be shown above the message text; otherwise, the
	// link preview will be shown below the message text
	ShowAboveText bool `json:"show_above_text,omitempty"`
}

LinkPreviewOptions describes the options used for link preview generation. Since: Bot API 7.0 See https://core.telegram.org/bots/api#linkpreviewoptions

type LivePhoto

type LivePhoto struct {
	// Photo Optional. Available sizes of the corresponding static photo
	Photo []PhotoSize `json:"photo,omitempty"`
	// FileID Identifier for the video file which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for the video file which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Width Video width as defined by the sender
	Width int `json:"width"`
	// Height Video height as defined by the sender
	Height int `json:"height"`
	// Duration Duration of the video in seconds as defined by the sender
	Duration int `json:"duration"`
	// MIMEType Optional. MIME type of the file as defined by the sender
	MIMEType string `json:"mime_type,omitempty"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int64 `json:"file_size,omitempty"`
}

LivePhoto represents a live photo (a photo with a short video attached). Since: Bot API 10.0

type Location

type Location struct {
	// Latitude Latitude as defined by the sender
	Latitude float64 `json:"latitude"`
	// Longitude Longitude as defined by the sender
	Longitude float64 `json:"longitude"`
	// HorizontalAccuracy Optional. The radius of uncertainty for the location, measured in meters; 0-1500
	HorizontalAccuracy float64 `json:"horizontal_accuracy"`
	// LivePeriod Optional. Time relative to the message sending date, during which the location can be updated;
	// in seconds. For active live locations only.
	LivePeriod int `json:"live_period"`
	// Heading Optional. The direction in which user is moving, in degrees; 1-360. For active live locations
	// only.
	Heading int `json:"heading"`
	// ProximityAlertRadius Optional. The maximum distance for proximity alerts about approaching another chat
	// member, in meters. For sent live locations only.
	ProximityAlertRadius int `json:"proximity_alert_radius"`
}

Location represents a point on the map. Since: Bot API 1.0 See https://core.telegram.org/bots/api#location

type LocationAddress

type LocationAddress struct {
	// CountryCode The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located
	CountryCode string `json:"country_code"`
	// State Optional. State of the location
	State *string `json:"state,omitempty"`
	// City Optional. City of the location
	City *string `json:"city,omitempty"`
	// Street Optional. Street address of the location
	Street *string `json:"street,omitempty"`
}

LocationAddress represents a human-readable address of a location. Since: Bot API 8.0

type ManagedBotCreated

type ManagedBotCreated struct {
	// Bot Information about the bot. The bot's token can be fetched using the method getManagedBotToken.
	Bot User `json:"bot"`
}

ManagedBotCreated describes a service message about a newly created managed bot. Since: Bot API 9.6 See https://core.telegram.org/bots/api#managedbotcreated

type ManagedBotUpdated

type ManagedBotUpdated struct {
	// User User that created the bot
	User User `json:"user"`
	// Bot Information about the bot. Token of the bot can be fetched using the method getManagedBotToken.
	Bot User `json:"bot"`
}

ManagedBotUpdated describes an update about a managed bot and its manager. Since: Bot API 9.6 See https://core.telegram.org/bots/api#managedbotupdated

type MaskPosition

type MaskPosition struct {
	// Point The part of the face relative to which the mask should be placed. One of “forehead”,
	// “eyes”, “mouth”, or “chin”.
	Point MaskPositionPoint `json:"point"`
	// XShift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For
	// example, choosing -1.0 will place mask just to the left of the default mask position.
	XShift float32 `json:"x_shift"`
	// YShift Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For
	// example, 1.0 will place the mask just below the default mask position.
	YShift float32 `json:"y_shift"`
	// Scale Mask scaling coefficient. For example, 2.0 means double size.
	Scale float32 `json:"scale"`
}

MaskPosition describes the position on faces where a mask should be placed by default. Since: Bot API 3.2 See https://core.telegram.org/bots/api#maskposition

type MaskPositionPoint

type MaskPositionPoint string

MaskPositionPoint represents the part of the face where a mask should be placed.

const (
	// MaskPositionForehead places the mask on the forehead.
	MaskPositionForehead MaskPositionPoint = "forehead"
	// MaskPositionEyes places the mask on the eyes.
	MaskPositionEyes MaskPositionPoint = "eyes"
	// MaskPositionMouth places the mask on the mouth.
	MaskPositionMouth MaskPositionPoint = "mouth"
	// MaskPositionChin places the mask on the chin.
	MaskPositionChin MaskPositionPoint = "chin"
)

type MaybeInaccessibleMessage

type MaybeInaccessibleMessage struct {
	// contains filtered or unexported fields
}

MaybeInaccessibleMessage is a union type that can be either Message or InaccessibleMessage. Since: Bot API 7.0 See https://core.telegram.org/bots/api#maybeinaccessiblemessage

func (*MaybeInaccessibleMessage) Chat

func (m *MaybeInaccessibleMessage) Chat() *Chat

Chat returns the chat from either payload form.

func (*MaybeInaccessibleMessage) InaccessibleMessage

func (m *MaybeInaccessibleMessage) InaccessibleMessage() *InaccessibleMessage

InaccessibleMessage returns the inaccessible message payload when present.

func (*MaybeInaccessibleMessage) IsAccessible

func (m *MaybeInaccessibleMessage) IsAccessible() bool

IsAccessible reports whether the payload is an accessible message.

func (*MaybeInaccessibleMessage) IsInaccessible

func (m *MaybeInaccessibleMessage) IsInaccessible() bool

IsInaccessible reports whether the payload is an inaccessible message.

func (*MaybeInaccessibleMessage) MarshalJSON

func (m *MaybeInaccessibleMessage) MarshalJSON() ([]byte, error)

MarshalJSON encodes the populated accessible or inaccessible message payload.

func (*MaybeInaccessibleMessage) Message

func (m *MaybeInaccessibleMessage) Message() *Message

Message returns the accessible message payload when present.

func (*MaybeInaccessibleMessage) MessageID

func (m *MaybeInaccessibleMessage) MessageID() int

MessageID returns the message identifier from either payload form.

func (*MaybeInaccessibleMessage) UnmarshalJSON

func (m *MaybeInaccessibleMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes either an accessible Message or an InaccessibleMessage.

type MenuButton struct {
	// Type identifies the commands, web_app, or default menu-button variant.
	Type MenuButtonType `json:"type"`

	// Text Text on the button
	// WebApp fields (for web_app button)
	Text *string `json:"text"`
	// WebApp Description of the Web App that will be launched when the user presses the button. The Web App
	// will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.
	// Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web
	// App's URL, in which case the Web App will be opened as if the user pressed the link.
	WebApp *WebAppInfo `json:"web_app"`
}

MenuButton represents a menu button. Since: Bot API 6.0 See https://core.telegram.org/bots/api#menubutton

type MenuButtonType string

MenuButtonType indicates the type of a menu button.

const (
	// MenuButtonCommandsType identifies a commands menu button.
	MenuButtonCommandsType MenuButtonType = "commands"
	// MenuButtonWebAppType identifies a web app menu button.
	MenuButtonWebAppType MenuButtonType = "web_app"
	// MenuButtonDefaultType identifies Telegram's default menu button.
	MenuButtonDefaultType MenuButtonType = "default"
)

type Message

type Message struct {
	// MessageID Unique message identifier inside this chat; 0 for ephemeral messages. In specific instances
	// (e.g., a message containing a video sent to a big chat), the server might automatically schedule a
	// message instead of sending it immediately. In such cases, this field will be 0 and the relevant message
	// will be unusable until it is actually sent.
	MessageID int `json:"message_id"`
	// MessageThreadID Optional. Unique identifier of a message thread or forum topic to which the message
	// belongs; for supergroups and private chats only
	MessageThreadID int `json:"message_thread_id,omitempty"` // Since: Bot API 6.3
	// DirectMessageTopic contains the direct-message topic associated with the message.
	DirectMessageTopic *DirectMessageTopic `json:"direct_message_topic,omitempty"` // Since: Bot API 9.2
	// From Optional. Sender of the message; may be empty for messages sent to channels. For backward
	// compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in
	// non-channel chats.
	From *User `json:"from,omitempty"`

	// SenderChat Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup
	// itself for messages sent by its anonymous administrators or a linked channel for messages automatically
	// forwarded to the channel's discussion group. For backward compatibility, if the message was sent on
	// behalf of a chat, the field from contains a fake sender user in non-channel chats.
	SenderChat *Chat `json:"sender_chat,omitempty"` // Since: Bot API 5.0
	// SenderBoostCount Optional. If the sender of the message boosted the chat, the number of boosts added by
	// the user
	SenderBoostCount int `json:"sender_boost_count,omitempty"` // Since: Bot API 7.1
	// SenderBusinessBot Optional. The bot that actually sent the message on behalf of the business account.
	// Available only for outgoing messages sent on behalf of the connected business account.
	SenderBusinessBot *User `json:"sender_business_bot,omitempty"` // Since: Bot API 7.2
	// SenderTag Optional. Tag or custom title of the sender of the message; for supergroups only
	SenderTag string `json:"sender_tag,omitempty"` // Since: Bot API 9.5
	// ReceiverUser identifies the user who can see the ephemeral message.
	ReceiverUser *User `json:"receiver_user,omitempty"` // Since: Bot API 10.2
	// EphemeralMessageID identifies the ephemeral message.
	EphemeralMessageID int64 `json:"ephemeral_message_id,omitempty"` // Since: Bot API 10.2
	// Date Date the message was sent in Unix time. It is always a positive number, representing a valid date.
	Date int `json:"date"`
	// GuestQueryID Optional. The unique identifier for the guest query. Use this identifier with the method
	// answerGuestQuery to send a response message. If non-empty, the message belongs to the chat where the
	// guest bot was summoned, which may not coincide with other existing bot chats sharing the same identifier.
	GuestQueryID string `json:"guest_query_id,omitempty"` // Since: Bot API 10.0
	// BusinessConnectionID Optional. Unique identifier of the business connection from which the message was
	// received. If non-empty, the message belongs to a chat of the corresponding business account that is
	// independent from any potential bot chat which might share the same identifier.
	BusinessConnectionID string `json:"business_connection_id,omitempty"` // Since: Bot API 7.2
	// Chat Chat the message belongs to
	Chat *Chat `json:"chat,omitempty"`
	// ForwardOrigin Optional. Information about the original message for forwarded messages
	ForwardOrigin *MessageOrigin `json:"forward_origin,omitempty"` // Since: Bot API 7.0

	// IsTopicMessage Optional. True, if the message is sent to a topic in a forum supergroup or a private chat
	// with the bot
	IsTopicMessage bool `json:"is_topic_message,omitempty"` // Since: Bot API 6.3
	// IsAutomaticForward Optional. True, if the message is a channel post that was automatically forwarded to
	// the connected discussion group
	IsAutomaticForward bool `json:"is_automatic_forward,omitempty"` // Since: Bot API 5.5
	// ReplyToMessage Optional. For replies in the same chat and message thread, the original message. Note that
	// the Message object in this field will not contain further reply_to_message fields even if it itself is a
	// reply. If the message is a reply to an ephemeral message, then this field may be omitted.
	ReplyToMessage *Message `json:"reply_to_message,omitempty"`
	// ExternalReply Optional. Information about the message that is being replied to, which may come from
	// another chat or forum topic
	ExternalReply *ExternalReplyInfo `json:"external_reply,omitempty"` // Since: Bot API 7.0
	// Quote Optional. For replies that quote part of the original message, the quoted part of the message
	Quote *TextQuote `json:"quote,omitempty"` // Since: Bot API 7.0

	// ReplyToStory Optional. For replies to a story, the original story
	ReplyToStory *Story `json:"reply_to_story,omitempty"` // Since: Bot API 7.1
	// ReplyToChecklistTaskID Optional. Identifier of the specific checklist task that is being replied to
	ReplyToChecklistTaskID int `json:"reply_to_checklist_task_id,omitempty"` // Since: Bot API 9.1
	// ReplyToPollOptionID Optional. Persistent identifier of the specific poll option that is being replied to
	ReplyToPollOptionID string `json:"reply_to_poll_option_id,omitempty"` // Since: Bot API 9.6
	// ViaBot Optional. Bot through which the message was sent
	ViaBot *User `json:"via_bot,omitempty"`
	// GuestBotCallerUser Optional. For a message sent by a guest bot, this is the user whose original message
	// triggered the bot's response
	GuestBotCallerUser *User `json:"guest_bot_caller_user,omitempty"` // Since: Bot API 10.0
	// GuestBotCallerChat Optional. For a message sent by a guest bot, this is the chat whose original message
	// triggered the bot's response
	GuestBotCallerChat *Chat `json:"guest_bot_caller_chat,omitempty"` // Since: Bot API 10.0
	// EditDate Optional. Date the message was last edited in Unix time
	EditDate int `json:"edit_date,omitempty"` // Since: Bot API 2.1
	// HasProtectedContent Optional. True, if the message can't be forwarded
	HasProtectedContent bool `json:"has_protected_content,omitempty"` // Since: Bot API 5.5
	// IsFromOffline Optional. True, if the message was sent by an implicit action, for example, as an away or a
	// greeting business message, or as a scheduled message
	IsFromOffline bool `json:"is_from_offline,omitempty"` // Since: Bot API 7.2
	// IsPaidPost Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24
	// hours to receive the payment and can't be edited.
	IsPaidPost bool `json:"is_paid_post,omitempty"` // Since: Bot API 9.1
	// MediaGroupID Optional. The unique identifier inside this chat of a media message group this message
	// belongs to
	MediaGroupID string `json:"media_group_id,omitempty"` // Since: Bot API 3.5
	// AuthorSignature Optional. Signature of the post author for messages in channels, or the custom title of
	// an anonymous group administrator
	AuthorSignature string `json:"author_signature,omitempty"`
	// PaidStarCount Optional. The number of Telegram Stars that were paid by the sender of the message to send
	// it
	PaidStarCount int `json:"paid_star_count,omitempty"` // Since: Bot API 8.3

	// Text Optional. For text messages, the actual UTF-8 text of the message
	Text string `json:"text"`
	// Entities Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that
	// appear in the text
	Entities []MessageEntity `json:"entities,omitempty"`
	// LinkPreviewOptions Optional. Options used for link preview generation for the message, if it is a text
	// message and link preview options were changed
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
	// SuggestedPostInfo Optional. Information about suggested post parameters if the message is a suggested
	// post in a channel direct messages chat. If the message is an approved or declined suggested post, then it
	// can't be edited.
	SuggestedPostInfo *SuggestedPostInfo `json:"suggested_post_info,omitempty"` // Since: Bot API 9.1
	// EffectID Optional. Unique identifier of the message effect added to the message
	EffectID string `json:"effect_id,omitempty"` // Since: Bot API 7.4

	// RichMessage contains structured rich-message content.
	RichMessage *RichMessage `json:"rich_message,omitempty"` // Since: Bot API 10.1
	// Animation Optional. Message is an animation, information about the animation. For backward compatibility,
	// when this field is set, the document field will also be set.
	Animation *Animation `json:"animation,omitempty"` // Since: Bot API 4.0
	// Audio Optional. Message is an audio file, information about the file
	Audio *Audio `json:"audio,omitempty"`
	// Document Optional. Message is a general file, information about the file
	Document *Document `json:"document,omitempty"`
	// PaidMedia Optional. Message contains paid media; information about the paid media
	PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"` // Since: Bot API 7.6
	// Photo Optional. Message is a photo, available sizes of the photo
	Photo extypes.Slice[PhotoSize] `json:"photo,omitempty"`
	// LivePhoto Optional. Message is a live photo, information about the live photo. For backward
	// compatibility, when this field is set, the photo field will also be set.
	LivePhoto *LivePhoto `json:"live_photo,omitempty"` // Since: Bot API 10.0
	// Sticker Optional. Message is a sticker, information about the sticker
	Sticker *Sticker `json:"sticker,omitempty"`
	// Story Optional. Message is a forwarded story
	Story *Story `json:"story,omitempty"`
	// Video Optional. Message is a video, information about the video
	Video *Video `json:"video,omitempty"`
	// VideoNote Optional. Message is a video note, information about the video message
	VideoNote *VideoNote `json:"video_note,omitempty"` // Since: Bot API 3.0
	// Voice Optional. Message is a voice message, information about the file
	Voice *Voice `json:"voice,omitempty"` // Since: Bot API 1.2
	// Caption Optional. Caption for the animation, audio, document, paid media, photo, video or voice
	Caption string `json:"caption,omitempty"` // Since: Bot API 3.4
	// CaptionEntities Optional. For messages with a caption, special entities like usernames, URLs, bot
	// commands, etc. that appear in the caption
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` // Since: Bot API 3.4
	// ShowCaptionAboveMedia Optional. True, if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"` // Since: Bot API 7.4
	// HasMediaSpoiler Optional. True, if the message media is covered by a spoiler animation
	HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"` // Since: Bot API 6.4
	// Checklist Optional. Message is a checklist
	Checklist *Checklist `json:"checklist,omitempty"` // Since: Bot API 9.1
	// Contact Optional. Message is a shared contact, information about the contact
	Contact *Contact `json:"contact,omitempty"`
	// Dice Optional. Message is a dice with random value
	Dice *Dice `json:"dice,omitempty"`
	// Game Optional. Message is a game, information about the game. More about games »
	Game *Game `json:"game,omitempty"`
	// Poll Optional. Message is a native poll, information about the poll
	Poll *Poll `json:"poll,omitempty"`
	// Venue Optional. Message is a venue, information about the venue. For backward compatibility, when this
	// field is set, the location field will also be set.
	Venue *Venue `json:"venue,omitempty"`
	// Location Optional. Message is a shared location, information about the location
	Location *Location `json:"location,omitempty"`

	// NewChatMembers Optional. New members that were added to the group or supergroup and information about
	// them (the bot itself may be one of these members)
	NewChatMembers []User `json:"new_chat_members,omitempty"`
	// LeftChatMember Optional. A member was removed from the group, information about them (this member may be
	// the bot itself)
	LeftChatMember *User `json:"left_chat_member,omitempty"`
	// ChatOwnerLeft Optional. Service message: chat owner has left
	ChatOwnerLeft *ChatOwnerLeft `json:"chat_owner_left,omitempty"`
	// ChatOwnerChanged Optional. Service message: chat owner has changed
	ChatOwnerChanged *ChatOwnerChanged `json:"chat_owner_changed,omitempty"`
	// NewChatTitle Optional. A chat title was changed to this value
	NewChatTitle string `json:"new_chat_title,omitempty"`
	// NewChatPhoto Optional. A chat photo was change to this value
	NewChatPhoto []PhotoSize `json:"new_chat_photo,omitempty"`
	// DeleteChatPhoto Optional. Service message: the chat photo was deleted
	DeleteChatPhoto bool `json:"delete_chat_photo,omitempty"`
	// GroupChatCreated Optional. Service message: the group has been created
	GroupChatCreated bool `json:"group_chat_created,omitempty"`
	// SupergroupChatCreated Optional. Service message: the supergroup has been created. This field can't be
	// received in a message coming through updates, because bot can't be a member of a supergroup when it is
	// created. It can only be found in reply_to_message if someone replies to a very first message in a
	// directly created supergroup.
	SupergroupChatCreated bool `json:"supergroup_chat_created,omitempty"`
	// ChannelChatCreated Optional. Service message: the channel has been created. This field can't be received
	// in a message coming through updates, because bot can't be a member of a channel when it is created. It
	// can only be found in reply_to_message if someone replies to a very first message in a channel.
	ChannelChatCreated bool `json:"channel_chat_created,omitempty"`
	// MessageAutoDeleteTimerChanged Optional. Service message: auto-delete timer settings changed in the chat
	MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"` // Since: Bot API 5.1
	// MigrateToChatID Optional. The group has been migrated to a supergroup with the specified identifier. This
	// number may have more than 32 significant bits and some programming languages may have difficulty/silent
	// defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
	// double-precision float type are safe for storing this identifier.
	MigrateToChatID int64 `json:"migrate_to_chat_id,omitempty"`
	// MigrateFromChatID Optional. The supergroup has been migrated from a group with the specified identifier.
	// This number may have more than 32 significant bits and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this identifier.
	MigrateFromChatID int64 `json:"migrate_from_chat_id,omitempty"`
	// PinnedMessage Optional. Specified message was pinned. Note that the Message object in this field will not
	// contain further reply_to_message fields even if it itself is a reply.
	PinnedMessage *MaybeInaccessibleMessage `json:"pinned_message,omitempty"`

	// Invoice Optional. Message is an invoice for a payment, information about the invoice. More about payments
	// »
	Invoice *Invoice `json:"invoice,omitempty"` // Since: Bot API 3.0
	// SuccessfulPayment Optional. Message is a service message about a successful payment, information about
	// the payment. More about payments »
	SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"` // Since: Bot API 3.0
	// RefundedPayment Optional. Message is a service message about a refunded payment, information about the
	// payment. More about payments »
	RefundedPayment *RefundedPayment `json:"refunded_payment,omitempty"` // Since: Bot API 7.7
	// UsersShared Optional. Service message: users were shared with the bot
	UsersShared *UsersShared `json:"users_shared,omitempty"` // Since: Bot API 6.5
	// ChatShared Optional. Service message: a chat was shared with the bot
	ChatShared *ChatShared `json:"chat_shared,omitempty"` // Since: Bot API 6.5
	// Gift Optional. Service message: a regular gift was sent or received
	Gift *GiftInfo `json:"gift,omitempty"` // Since: Bot API 9.0
	// UniqueGift Optional. Service message: a unique gift was sent or received
	UniqueGift *UniqueGiftInfo `json:"unique_gift,omitempty"` // Since: Bot API 9.0
	// GiftUpgradeSent Optional. Service message: upgrade of a gift was purchased after the gift was sent
	GiftUpgradeSent *GiftInfo `json:"gift_upgrade_sent,omitempty"` // Since: Bot API 9.3

	// ConnectedWebsite Optional. The domain name of the website on which the user has logged in. More about
	// Telegram Login »
	ConnectedWebsite string `json:"connected_website,omitempty"`
	// WriteAccessAllowed Optional. Service message: the user allowed the bot to write messages after adding it
	// to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a
	// Web App sent by the method requestWriteAccess
	WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed,omitempty"` // Since: Bot API 6.4
	// PassportData Optional. Telegram Passport data
	PassportData *PassportData `json:"passport_data,omitempty"`
	// ProximityAlertTriggered Optional. Service message: a user in the chat triggered another user's proximity
	// alert while sharing Live Location
	ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"` // Since: Bot API 5.0
	// BoostAdded Optional. Service message: user boosted the chat
	BoostAdded *ChatBoostAdded `json:"boost_added,omitempty"` // Since: Bot API 7.1
	// ChatBackgroundSet Optional. Service message: chat background set
	ChatBackgroundSet *ChatBackground `json:"chat_background_set,omitempty"` // Since: Bot API 7.5

	// ChecklistTaskDone contains checklist task completion data for the service message.
	ChecklistTaskDone *ChecklistTaskDone `json:"checklist_task_done,omitempty"` // Since: Bot API 9.1
	// ChecklistTasksAdded Optional. Service message: tasks were added to a checklist
	ChecklistTasksAdded *ChecklistTasksAdded `json:"checklist_tasks_added,omitempty"` // Since: Bot API 9.1
	// CommunityChatAdded describes a community chat addition service message.
	CommunityChatAdded *CommunityChatAdded `json:"community_chat_added,omitempty"` // Since: Bot API 10.2
	// CommunityChatRemoved describes a community chat removal service message.
	CommunityChatRemoved *CommunityChatRemoved `json:"community_chat_removed,omitempty"` // Since: Bot API 10.2
	// DirectMessagePriceChanged Optional. Service message: the price for paid messages in the corresponding
	// direct messages chat of a channel has changed
	DirectMessagePriceChanged *DirectMessagePriceChanged `json:"direct_message_price_changed,omitempty"` // Since: Bot API 9.1
	// PaidMessagePriceChanged Optional. Service message: the price for paid messages has changed in the chat
	PaidMessagePriceChanged *PaidMessagePriceChanged `json:"paid_message_price_changed,omitempty"` // Since: Bot API 9.x
	// ForumTopicCreated Optional. Service message: forum topic created
	ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created,omitempty"` // Since: Bot API 6.3
	// ForumTopicEdited Optional. Service message: forum topic edited
	ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited,omitempty"` // Since: Bot API 6.4
	// ForumTopicClosed Optional. Service message: forum topic closed
	ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed,omitempty"` // Since: Bot API 6.3
	// ForumTopicReopened Optional. Service message: forum topic reopened
	ForumTopicReopened *ForumTopicReopened `json:"forum_topic_reopened,omitempty"` // Since: Bot API 6.3
	// GeneralForumTopicHidden Optional. Service message: the 'General' forum topic hidden
	GeneralForumTopicHidden *GeneralForumTopicHidden `json:"general_forum_topic_hidden,omitempty"` // Since: Bot API 6.4
	// GeneralForumTopicUnhidden Optional. Service message: the 'General' forum topic unhidden
	GeneralForumTopicUnhidden *GeneralForumTopicUnhidden `json:"general_forum_topic_unhidden,omitempty"` // Since: Bot API 6.4

	// GiveawayCreated Optional. Service message: a scheduled giveaway was created
	GiveawayCreated *GiveawayCreated `json:"giveaway_created,omitempty"` // Since: Bot API 7.0
	// Giveaway Optional. The message is a scheduled giveaway message
	Giveaway *Giveaway `json:"giveaway,omitempty"` // Since: Bot API 7.0
	// GiveawayWinners Optional. A giveaway with public winners was completed
	GiveawayWinners *GiveawayWinners `json:"giveaway_winners,omitempty"` // Since: Bot API 7.0
	// GiveawayCompleted Optional. Service message: a giveaway without public winners was completed
	GiveawayCompleted *GiveawayCompleted `json:"giveaway_completed,omitempty"` // Since: Bot API 7.0

	// ManagedBotCreated Optional. Service message: user created a bot that will be managed by the current bot
	ManagedBotCreated *ManagedBotCreated `json:"managed_bot_created,omitempty"` // Since: Bot API 9.6
	// PollOptionAdded Optional. Service message: answer option was added to a poll
	PollOptionAdded *PollOptionAdded `json:"poll_option_added,omitempty"` // Since: Bot API 9.6
	// PollOptionDeleted Optional. Service message: answer option was deleted from a poll
	PollOptionDeleted *PollOptionDeleted `json:"poll_option_deleted,omitempty"` // Since: Bot API 9.6

	// SuggestedPostApproved Optional. Service message: a suggested post was approved
	SuggestedPostApproved *SuggestedPostApproved `json:"suggested_post_approved,omitempty"` // Since: Bot API 9.1
	// SuggestedPostApprovalFailed Optional. Service message: approval of a suggested post has failed
	SuggestedPostApprovalFailed *SuggestedPostApprovalFailed `json:"suggested_post_approval_failed,omitempty"` // Since: Bot API 9.1
	// SuggestedPostDeclined Optional. Service message: a suggested post was declined
	SuggestedPostDeclined *SuggestedPostDeclined `json:"suggested_post_declined,omitempty"` // Since: Bot API 9.1
	// SuggestedPostPaid Optional. Service message: payment for a suggested post was received
	SuggestedPostPaid *SuggestedPostPaid `json:"suggested_post_paid,omitempty"` // Since: Bot API 9.1
	// SuggestedPostRefunded Optional. Service message: payment for a suggested post was refunded
	SuggestedPostRefunded *SuggestedPostRefunded `json:"suggested_post_refunded,omitempty"` // Since: Bot API 9.1

	// VideoChatScheduled Optional. Service message: video chat scheduled
	VideoChatScheduled *VideoChatScheduled `json:"video_chat_scheduled,omitempty"` // Since: Bot API 6.0
	// VideoChatStarted Optional. Service message: video chat started
	VideoChatStarted *VideoChatStarted `json:"video_chat_started,omitempty"` // Since: Bot API 5.1
	// VideoChatEnded Optional. Service message: video chat ended
	VideoChatEnded *VideoChatEnded `json:"video_chat_ended,omitempty"` // Since: Bot API 5.1
	// VideoChatParticipantsInvited Optional. Service message: new participants invited to a video chat
	VideoChatParticipantsInvited *VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"` // Since: Bot API 5.1

	// WebAppData Optional. Service message: data sent by a Web App
	WebAppData *WebAppData `json:"web_app_data,omitempty"` // Since: Bot API 6.0
	// ReplyMarkup Optional. Inline keyboard attached to the message. login_url buttons are represented as
	// ordinary url buttons.
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` // Since: Bot API 4.3
}

Message represents a Telegram message. Since: Bot API 1.0 See https://core.telegram.org/bots/api#message

type MessageAutoDeleteTimerChanged

type MessageAutoDeleteTimerChanged struct {
	// MessageAutoDeleteTime New auto-delete time for messages in the chat; in seconds
	MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}

MessageAutoDeleteTimerChanged represents a service message about a change in auto-delete timer settings. Since: Bot API 5.1

type MessageEntity

type MessageEntity struct {
	// Type Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag or
	// #hashtag@chatusername), “cashtag” ($USD or $USD@chatusername), “bot_command” (/start@jobs_bot),
	// “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number”
	// (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text),
	// “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block
	// quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth
	// string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for
	// users without usernames), “custom_emoji” (for inline custom emoji stickers), or “date_time” (for
	// formatted date and time).
	Type MessageEntityType `json:"type"`

	// Offset Offset in UTF-16 code units to the start of the entity
	Offset int `json:"offset"`
	// Length Length of the entity in UTF-16 code units
	Length int `json:"length"`
	// URL Optional. For “text_link” only, URL that will be opened after user taps on the text
	URL string `json:"url,omitempty"`
	// User Optional. For “text_mention” only, the mentioned user
	User *User `json:"user,omitempty"`
	// Language Optional. For “pre” only, the programming language of the entity text
	Language string `json:"language,omitempty"`
	// CustomEmojiID Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use
	// getCustomEmojiStickers to get full information about the sticker.
	CustomEmojiID string `json:"custom_emoji_id,omitempty"` // Since: Bot API 6.2

	// UnixTime Optional. For “date_time” only, the Unix time associated with the entity
	UnixTime int64 `json:"unix_time,omitempty"`
	// DateTimeFormat Optional. For “date_time” only, the string that defines the formatting of the date and
	// time. See date-time entity formatting for more details.
	DateTimeFormat string `json:"date_time_format,omitempty"` // Since: Bot API 9.5
}

MessageEntity represents one special entity in a text message. Since: Bot API 2.0 See https://core.telegram.org/bots/api#messageentity

type MessageEntityType

type MessageEntityType string

MessageEntityType represents the type of a message entity.

const (
	// MessageEntityMention identifies an @mention entity.
	MessageEntityMention MessageEntityType = "mention"
	// MessageEntityHashtag identifies a hashtag entity.
	MessageEntityHashtag MessageEntityType = "hashtag"
	// MessageEntityCashtag identifies a cashtag entity.
	MessageEntityCashtag MessageEntityType = "cashtag"
	// MessageEntityBotCommand identifies a bot command entity.
	MessageEntityBotCommand MessageEntityType = "bot_command"
	// MessageEntityURL identifies a URL entity.
	MessageEntityURL MessageEntityType = "url"
	// MessageEntityEmail identifies an email entity.
	MessageEntityEmail MessageEntityType = "email"
	// MessageEntityPhoneNumber identifies a phone number entity.
	MessageEntityPhoneNumber MessageEntityType = "phone_number"
	// MessageEntityBold identifies bold text.
	MessageEntityBold MessageEntityType = "bold"
	// MessageEntityItalic identifies italic text.
	MessageEntityItalic MessageEntityType = "italic"
	// MessageEntityUnderline identifies underlined text.
	MessageEntityUnderline MessageEntityType = "underline"
	// MessageEntityStrike identifies strikethrough text.
	MessageEntityStrike MessageEntityType = "strikethrough"
	// MessageEntitySpoiler identifies spoiler text.
	MessageEntitySpoiler MessageEntityType = "spoiler" // Since: Bot API 5.6
	// MessageEntityBlockquote identifies a blockquote entity.
	MessageEntityBlockquote MessageEntityType = "blockquote"
	// MessageEntityExpandableBlockquote identifies an expandable blockquote entity.
	MessageEntityExpandableBlockquote MessageEntityType = "expandable_blockquote" // Since: Bot API 7.5
	// MessageEntityCode identifies inline code.
	MessageEntityCode MessageEntityType = "code"
	// MessageEntityPre identifies a preformatted block.
	MessageEntityPre MessageEntityType = "pre"
	// MessageEntityTextLink identifies linked text.
	MessageEntityTextLink MessageEntityType = "text_link"
	// MessageEntityTextMention identifies a text mention.
	MessageEntityTextMention MessageEntityType = "text_mention"
	// MessageEntityCustomEmoji identifies a custom emoji entity.
	MessageEntityCustomEmoji MessageEntityType = "custom_emoji" // Since: Bot API 6.2
	// MessageEntityDateTime identifies a date-time entity.
	MessageEntityDateTime MessageEntityType = "date_time" // Since: Bot API 9.5
)

type MessageID

type MessageID struct {
	// MessageID Unique message identifier. In specific instances (e.g., message containing a video sent to a
	// big chat), the server might automatically schedule a message instead of sending it immediately. In such
	// cases, this field will be 0 and the relevant message will be unusable until it is actually sent.
	MessageID int `json:"message_id"`
}

MessageID represents a message identifier wrapper returned by some API methods. Since: Bot API 7.0

type MessageOrigin

type MessageOrigin struct {
	// Type identifies the concrete message-origin variant.
	Type MessageOriginType `json:"type"`
	// Date Date the message was sent originally in Unix time
	Date int64 `json:"date"`

	// SenderUser User that sent the message originally
	SenderUser *User `json:"sender_user,omitempty"`

	// SenderUserName Name of the user that sent the message originally
	SenderUserName string `json:"sender_user_name,omitempty"`

	// SenderChat Chat that sent the message originally
	SenderChat *Chat `json:"sender_chat,omitempty"`

	// Chat Channel chat to which the message was originally sent
	Chat *Chat `json:"chat,omitempty"`
	// MessageID Unique message identifier inside the chat
	MessageID int `json:"message_id"`

	// AuthorSignature is the original author's signature for channel messages.
	AuthorSignature string `json:"author_signature,omitempty"`
}

MessageOrigin describes the origin of a message. Since: Bot API 7.0

type MessageOriginType

type MessageOriginType string

MessageOriginType represents the type of a message origin.

type MessageReactionCountUpdated

type MessageReactionCountUpdated struct {
	// Chat The chat containing the message
	Chat *Chat `json:"chat"`
	// MessageID Unique message identifier inside the chat
	MessageID int `json:"message_id"`
	// Date Date of the change in Unix time
	Date int `json:"date"`
	// Reactions List of reactions that are present on the message
	Reactions []*ReactionCount `json:"reactions"`
}

MessageReactionCountUpdated represents a change in the count of reactions on a message. Since: Bot API 7.0 See https://core.telegram.org/bots/api#messagereactioncountupdated

type MessageReactionUpdated

type MessageReactionUpdated struct {
	// Chat The chat containing the message the user reacted to
	Chat *Chat `json:"chat"`
	// MessageID Unique identifier of the message inside the chat
	MessageID int `json:"message_id"`
	// User Optional. The user that changed the reaction, if the user isn't anonymous
	User *User `json:"user,omitempty"`
	// ActorChat Optional. The chat on behalf of which the reaction was changed, if the user is anonymous
	ActorChat *Chat `json:"actor_chat"`
	// Date Date of the change in Unix time
	Date int `json:"date"`
	// OldReaction Previous list of reaction types that were set by the user
	OldReaction []ReactionType `json:"old_reaction"`
	// NewReaction New list of reaction types that have been set by the user
	NewReaction []ReactionType `json:"new_reaction"`
}

MessageReactionUpdated represents a change of a reaction on a message. Since: Bot API 7.0 See https://core.telegram.org/bots/api#messagereactionupdated

type OrderInfo

type OrderInfo struct {
	// Name Optional. User name
	Name string `json:"name"`
	// PhoneNumber Optional. User's phone number
	PhoneNumber string `json:"phone_number"`
	// Email Optional. User email
	Email string `json:"email"`
	// ShippingAddress Optional. User shipping address
	ShippingAddress ShippingAddress `json:"shipping_address"`
}

OrderInfo represents information about an order. Since: Bot API 3.0 See https://core.telegram.org/bots/api#orderinfo

type OwnedGift

type OwnedGift struct {
	// Type identifies the regular or unique owned-gift variant.
	Type OwnedGiftType `json:"type"`
	// OwnedGiftID uniquely identifies a business account's owned gift when available.
	OwnedGiftID string `json:"owned_gift_id,omitempty"`
	// SendDate Date the gift was sent in Unix time
	SendDate int `json:"send_date,omitempty"`
	// IsSaved Optional. True, if the gift is displayed on the account's profile page; for gifts received on
	// behalf of business accounts only
	IsSaved bool `json:"is_saved,omitempty"`

	// Gift contains the regular gift for the regular variant.
	// Fields specific to "regular" type
	Gift Gift `json:"gift"`
	// SenderUser Optional. Sender of the gift if it is a known user
	SenderUser *User `json:"sender_user,omitempty"`
	// Text Optional. Text of the message that was added to the gift
	Text string `json:"text,omitempty"`
	// Entities Optional. Special entities that appear in the text
	Entities []MessageEntity `json:"entities,omitempty"`
	// IsPrivate Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise,
	// everyone will be able to see them
	IsPrivate bool `json:"is_private,omitempty"`
	// CanBeUpgraded Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf
	// of business accounts only
	CanBeUpgraded bool `json:"can_be_upgraded,omitempty"`
	// WasRefunded Optional. True, if the gift was refunded and isn't available anymore
	WasRefunded bool `json:"was_refunded,omitempty"`
	// ConvertStarCount Optional. Number of Telegram Stars that can be claimed by the receiver instead of the
	// gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business
	// accounts only
	ConvertStarCount int `json:"convert_star_count,omitempty"`
	// PrepaidUpgradeStarCount Optional. Number of Telegram Stars that were paid for the ability to upgrade the
	// gift
	PrepaidUpgradeStarCount int `json:"prepaid_upgrade_star_count,omitempty"`
	// IsUpgradeSeparate Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts
	// received on behalf of business accounts only
	IsUpgradeSeparate bool `json:"is_upgrade_separate,omitempty"`
	// UniqueGiftNumber Optional. Unique number reserved for this gift when upgraded. See the number field in
	// UniqueGift.
	UniqueGiftNumber int `json:"unique_gift_number,omitempty"`

	// CanBeTransferred Optional. True, if the gift can be transferred to another owner; for gifts received on
	// behalf of business accounts only
	// Fields specific to "unique" type
	CanBeTransferred bool `json:"can_be_transferred,omitempty"`
	// TransferStarCount Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if
	// the bot cannot transfer the gift
	TransferStarCount int `json:"transfer_star_count,omitempty"`
	// NextTransferDate Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in
	// the past, then the gift can be transferred now.
	NextTransferDate int `json:"next_transfer_date,omitempty"`
}

OwnedGift represents a gift owned by a user or chat. Since: Bot API 9.0

type OwnedGiftType

type OwnedGiftType string

OwnedGiftType represents the type of an owned gift. Since: Bot API 9.0

const (
	// OwnedGiftRegularType identifies a regular owned gift.
	OwnedGiftRegularType OwnedGiftType = "regular"
	// OwnedGiftUniqueType identifies a unique owned gift.
	OwnedGiftUniqueType OwnedGiftType = "unique"
)

type OwnedGifts

type OwnedGifts struct {
	// TotalCount The total number of gifts owned by the user or the chat
	TotalCount int `json:"total_count"`
	// Gifts The list of gifts
	Gifts []OwnedGift `json:"gifts"`
	// NextOffset Optional. Offset for the next request. If empty, then there are no more results.
	NextOffset string `json:"next_offset"`
}

OwnedGifts represents a list of owned gifts with pagination. Since: Bot API 9.0

type PaidMedia

type PaidMedia struct {
	// Type identifies the preview, photo, video, or live-photo variant.
	Type PaidMediaType `json:"type,omitempty"`

	// Width Optional. Media width as defined by the sender
	Width int `json:"width,omitempty"`
	// Height Optional. Media height as defined by the sender
	Height int `json:"height,omitempty"`
	// Duration Optional. Duration of the media in seconds as defined by the sender
	Duration int `json:"duration,omitempty"`

	// Photo The photo
	Photo []PhotoSize `json:"photo,omitempty"`

	// Video The video
	Video *Video `json:"video,omitempty"`
	// LivePhoto The photo
	LivePhoto *LivePhoto `json:"live_photo,omitempty"` // Since: Bot API 10.0
}

PaidMedia describes paid media content. Since: Bot API 7.6

type PaidMediaInfo

type PaidMediaInfo struct {
	// StarCount The number of Telegram Stars that must be paid to buy access to the media
	StarCount int `json:"star_count"`
	// PaidMedia Information about the paid media
	PaidMedia []PaidMedia `json:"paid_media"`
}

PaidMediaInfo describes paid media. Since: Bot API 7.6

type PaidMediaPurchased

type PaidMediaPurchased struct {
	// From User who purchased the media
	From User `json:"from"`
	// PaidMediaPayload Bot-specified paid media payload
	PaidMediaPayload string `json:"paid_media_payload"`
}

PaidMediaPurchased represents a purchased paid media. Since: Bot API 7.10 See https://core.telegram.org/bots/api#paidmediapurchased

type PaidMediaType

type PaidMediaType string

PaidMediaType represents the type of paid media. Since: Bot API 7.6

const (
	// PaidMediaPreviewType identifies a paid-media preview.
	PaidMediaPreviewType PaidMediaType = "preview"
	// PaidMediaPhotoType identifies a paid photo.
	PaidMediaPhotoType PaidMediaType = "photo"
	// PaidMediaVideoType identifies a paid video.
	PaidMediaVideoType PaidMediaType = "video"
	// PaidMediaLivePhotoType identifies a paid live photo.
	PaidMediaLivePhotoType PaidMediaType = "live_photo" // Since: Bot API 10.0
)

type PaidMessagePriceChanged

type PaidMessagePriceChanged struct {
	// PaidMessageStarCount The new number of Telegram Stars that must be paid by non-administrator users of the
	// supergroup chat for each sent message
	PaidMessageStarCount int `json:"paid_message_star_count"`
}

PaidMessagePriceChanged represents a service message about a change in the price of paid messages. Since: Bot API 9.x

type ParseMode

type ParseMode string

ParseMode represents the text formatting mode for message parsing.

const (
	// ParseMarkdownV2 enables MarkdownV2 style parsing.
	ParseMarkdownV2 ParseMode = "MarkdownV2"
	// ParseHTML enables HTML style parsing.
	ParseHTML ParseMode = "HTML"
	// ParseMarkdown enables legacy Markdown style parsing.
	ParseMarkdown ParseMode = "Markdown"
	// ParseNone disables parse_mode and leaves plain-text requests unannotated.
	ParseNone ParseMode = ""
)

type PassportData

type PassportData struct {
	// Data Array with information about documents and other Telegram Passport elements that was shared with the
	// bot
	Data []EncryptedPassportElement `json:"data"`
	// Credentials Encrypted credentials required to decrypt the data
	Credentials EncryptedCredentials `json:"credentials"`
}

PassportData contains information about Telegram Passport data shared with the bot. Since: Bot API 4.0

type PassportElementError

type PassportElementError struct {
	// Source identifies the source of the passport validation error.
	Source string `json:"source"`
	// Type identifies the Telegram Passport element type with the error.
	Type PassportElementType `json:"type"`

	// FieldName Name of the data field which has the error
	FieldName string `json:"field_name,omitempty"`
	// DataHash Base64-encoded data hash
	DataHash string `json:"data_hash,omitempty"`

	// FileHash is the base64-encoded hash of the file that contains the error.
	FileHash string `json:"file_hash,omitempty"`
	// FileHashes List of base64-encoded file hashes
	FileHashes []string `json:"file_hashes,omitempty"`

	// ElementHash Base64-encoded element hash
	ElementHash string `json:"element_hash,omitempty"`

	// Message Error message
	Message string `json:"message"`
}

PassportElementError is a JSON-serializable passport element error object. Since: Bot API 4.0 See https://core.telegram.org/bots/api#passportelementerror

type PassportElementType

type PassportElementType string

PassportElementType represents the type of a Telegram Passport element.

const (
	// PassportPersonalDetailsType identifies personal details.
	PassportPersonalDetailsType PassportElementType = "personal_details"
	// PassportPassportType identifies an international passport.
	PassportPassportType PassportElementType = "passport"
	// PassportDriverLicenseType identifies a driver license.
	PassportDriverLicenseType PassportElementType = "driver_license"
	// PassportIdentityCardType identifies an identity card.
	PassportIdentityCardType PassportElementType = "identity_card"
	// PassportInternalPassportType identifies an internal passport.
	PassportInternalPassportType PassportElementType = "internal_passport"
	// PassportAddressType identifies a residential address.
	PassportAddressType PassportElementType = "address"
	// PassportUtilityBillType identifies a utility bill.
	PassportUtilityBillType PassportElementType = "utility_bill"
	// PassportBankStatementType identifies a bank statement.
	PassportBankStatementType PassportElementType = "bank_statement"
	// PassportRentalAgreementType identifies a rental agreement.
	PassportRentalAgreementType PassportElementType = "rental_agreement"
	// PassportPassportRegistrationType identifies a passport registration.
	PassportPassportRegistrationType PassportElementType = "passport_registration"
	// PassportTemporaryRegistrationType identifies a temporary registration.
	PassportTemporaryRegistrationType PassportElementType = "temporary_registration"
	// PassportPhoneNumberType identifies a phone number.
	PassportPhoneNumberType PassportElementType = "phone_number"
	// PassportEmailType identifies an email address.
	PassportEmailType PassportElementType = "email"
)

type PassportFile

type PassportFile struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// FileSize File size in bytes
	FileSize int64 `json:"file_size"`
	// FileDate Unix time when the file was uploaded
	FileDate int64 `json:"file_date"`
}

PassportFile represents a file uploaded to Telegram Passport. Since: Bot API 4.0

type PhotoSize

type PhotoSize struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Width Photo width
	Width int `json:"width"`
	// Height Photo height
	Height int `json:"height"`
	// FileSize Optional. File size in bytes
	FileSize int64 `json:"file_size,omitempty"`
}

PhotoSize represents one size of a photo or a file/sticker thumbnail. Since: Bot API 1.0 See https://core.telegram.org/bots/api#photosize

type PinChatMessage

type PinChatMessage struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be pinned
	BusinessConnectionID *string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Identifier of a message to pin
	MessageID int `json:"message_id"`
	// DisableNotification Optional. Pass True if it is not necessary to send a notification to all chat members
	// about the new pinned message. Notifications are always disabled in channels and private chats.
	DisableNotification bool `json:"disable_notification,omitempty"`
}

PinChatMessage holds parameters for the pinChatMessage method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#pinchatmessage

type Poll

type Poll struct {
	// ID Unique poll identifier
	ID string `json:"id"`
	// Question Poll question, 1-300 characters
	Question string `json:"question"`
	// QuestionEntities Optional. Special entities that appear in the question. Currently, only custom emoji
	// entities are allowed in poll questions
	QuestionEntities []MessageEntity `json:"question_entities"` // Since: Bot API 7.3
	// Options List of poll options
	Options []PollOption `json:"options"`
	// TotalVoterCount Total number of users that voted in the poll
	TotalVoterCount int `json:"total_voter_count"`
	// IsClosed True, if the poll is closed
	IsClosed bool `json:"is_closed,omitempty"`
	// IsAnonymous True, if the poll is anonymous
	IsAnonymous bool `json:"is_anonymous,omitempty"`
	// Type Poll type, currently can be “regular” or “quiz”
	Type PollType `json:"type"`

	// AllowsMultipleAnswers True, if the poll allows multiple answers
	AllowsMultipleAnswers bool `json:"allows_multiple_answers,omitempty"` // Since: Bot API 4.6
	// AllowsRevoting True, if the poll allows to change the chosen answer options
	AllowsRevoting bool `json:"allows_revoting,omitempty"` // Since: Bot API 9.6
	// MembersOnly True if voting is limited to users who have been members of the chat where the poll was
	// originally sent for more than 24 hours
	MembersOnly bool `json:"members_only,omitempty"` // Since: Bot API 10.0
	// CountryCodes Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries
	// from which users can vote in the poll. The country code “FT” is used for users with anonymous
	// numbers. If omitted, then users from any country can participate in the poll.
	CountryCodes []string `json:"country_codes,omitempty"` // Since: Bot API 10.0
	// CorrectOptionIDs Optional. Array of 0-based identifiers of the correct answer options. Available only for
	// polls in quiz mode which are closed or were sent (not forwarded) by the bot or to the private chat with
	// the bot.
	CorrectOptionIDs []int `json:"correct_option_ids,omitempty"` // Since: Bot API 9.6
	// Explanation Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon
	// in a quiz-style poll, 0-200 characters
	Explanation string `json:"explanation,omitempty"` // Since: Bot API 4.8
	// ExplanationEntities Optional. Special entities like usernames, URLs, bot commands, etc. that appear in
	// the explanation
	ExplanationEntities []MessageEntity `json:"explanation_entities,omitempty"` // Since: Bot API 4.8
	// ExplanationMedia Optional. Media added to the quiz explanation
	ExplanationMedia *PollMedia `json:"explanation_media,omitempty"` // Since: Bot API 10.0
	// OpenPeriod Optional. Amount of time in seconds the poll will be active after creation
	OpenPeriod int `json:"open_period,omitempty"` // Since: Bot API 4.8
	// CloseDate Optional. Point in time (Unix timestamp) when the poll will be automatically closed
	CloseDate int `json:"close_date,omitempty"` // Since: Bot API 4.8
	// Description Optional. Description of the poll; for polls inside the Message object only
	Description string `json:"description,omitempty"` // Since: Bot API 9.6
	// DescriptionEntities Optional. Special entities like usernames, URLs, bot commands, etc. that appear in
	// the description
	DescriptionEntities []MessageEntity `json:"description_entities,omitempty"` // Since: Bot API 9.6
	// Media Optional. Media added to the poll description; for polls inside the Message object only
	Media *PollMedia `json:"media,omitempty"` // Since: Bot API 10.0
}

Poll contains information about a poll. Since: Bot API 4.2 See https://core.telegram.org/bots/api#poll

type PollAnswer

type PollAnswer struct {
	// PollID identifies the poll.
	PollID string `json:"poll_id"`
	// VoterChat is the chat that changed the answer, when the voter is anonymous.
	VoterChat Chat `json:"voter_chat,omitempty"` // Since: Bot API 6.8
	// User is the user that changed the answer, when the voter is not anonymous.
	User User `json:"user,omitempty"`
	// OptionIDs contains the chosen option indices and is empty for a retracted vote.
	OptionIDs []int `json:"option_ids"`
	// OptionPersistentIDs contains the persistent identifiers of the chosen options.
	OptionPersistentIDs []string `json:"option_persistent_ids"` // Since: Bot API 9.6
}

PollAnswer represents an answer submitted by a poll voter.

User and VoterChat remain value fields for v1 compatibility. Their pointer representation is subject to change in v2; use VoterUser and VoterChatInfo when presence matters. Since: Bot API 4.6 See https://core.telegram.org/bots/api#pollanswer

func (PollAnswer) VoterChatInfo added in v1.2.0

func (a PollAnswer) VoterChatInfo() (*Chat, bool)

VoterChatInfo returns the anonymous voter chat when it is present.

Since: Bot API 6.8

func (PollAnswer) VoterUser added in v1.2.0

func (a PollAnswer) VoterUser() (*User, bool)

VoterUser returns the non-anonymous voter when it is present.

Since: Bot API 4.6

type PollMedia

type PollMedia struct {
	// Animation Optional. Media is an animation, information about the animation
	Animation *Animation `json:"animation,omitempty"`
	// Audio Optional. Media is an audio file, information about the file; currently, can't be received in a
	// poll option
	Audio *Audio `json:"audio,omitempty"`
	// Document Optional. Media is a general file, information about the file; currently, can't be received in a
	// poll option
	Document *Document `json:"document,omitempty"`
	// Link contains link media attached to the poll.
	Link *Link `json:"link,omitempty"` // Since: Bot API 10.1
	// LivePhoto Optional. Media is a live photo, information about the live photo
	LivePhoto *LivePhoto `json:"live_photo,omitempty"`
	// Location Optional. Media is a shared location, information about the location
	Location *Location `json:"location,omitempty"`
	// Photo Optional. Media is a photo, available sizes of the photo
	Photo []PhotoSize `json:"photo,omitempty"`
	// Sticker Optional. Media is a sticker, information about the sticker; currently, for poll options only
	Sticker *Sticker `json:"sticker,omitempty"`
	// Venue Optional. Media is a venue, information about the venue
	Venue *Venue `json:"venue,omitempty"`
	// Video Optional. Media is a video, information about the video
	Video *Video `json:"video,omitempty"`
}

PollMedia represents media attached to a poll. Since: Bot API 10.0

type PollOption

type PollOption struct {
	// PersistentID Unique identifier of the option, persistent on option addition and deletion
	PersistentID string `json:"persistent_id"` // Since: Bot API 9.6
	// Text Option text, 1-100 characters
	Text string `json:"text"`
	// TextEntities Optional. Special entities that appear in the option text. Currently, only custom emoji
	// entities are allowed in poll option texts
	TextEntities []MessageEntity `json:"text_entities"`
	// Media Optional. Media added to the poll option
	Media *PollMedia `json:"media,omitempty"` // Since: Bot API 10.0
	// VoterCount Number of users who voted for this option; may be 0 if unknown
	VoterCount int `json:"voter_count"`

	// AddedByUser Optional. User who added the option; omitted if the option wasn't added by a user after poll
	// creation
	AddedByUser *User `json:"added_by_user,omitempty"` // Since: Bot API 9.6
	// AddedByChat Optional. Chat that added the option; omitted if the option wasn't added by a chat after poll
	// creation
	AddedByChat *Chat `json:"added_by_chat,omitempty"` // Since: Bot API 9.6
	// AdditionDate Optional. Point in time (Unix timestamp) when the option was added; omitted if the option
	// existed in the original poll
	AdditionDate int `json:"addition_date,omitempty"` // Since: Bot API 9.6
}

PollOption contains information about one answer option in a poll. Since: Bot API 4.2 See https://core.telegram.org/bots/api#polloption

type PollOptionAdded

type PollOptionAdded struct {
	// PollMessage Optional. Message containing the poll to which the option was added, if known. Note that the
	// Message object in this field will not contain the reply_to_message field even if it itself is a reply.
	PollMessage *InaccessibleMessage `json:"poll_message,omitempty"`
	// OptionPersistentID Unique identifier of the added option
	OptionPersistentID string `json:"option_persistent_id"`
	// OptionText Option text
	OptionText string `json:"option_text"`
	// OptionTextEntities Optional. Special entities that appear in the option_text
	OptionTextEntities []MessageEntity `json:"option_text_entities,omitempty"`
}

PollOptionAdded describes a service message about a poll option being added. Since: Bot API 9.6

type PollOptionDeleted

type PollOptionDeleted struct {
	// PollMessage Optional. Message containing the poll from which the option was deleted, if known. Note that
	// the Message object in this field will not contain the reply_to_message field even if it itself is a
	// reply.
	PollMessage *InaccessibleMessage `json:"poll_message,omitempty"`
	// OptionPersistentID Unique identifier of the deleted option
	OptionPersistentID string `json:"option_persistent_id"`
	// OptionText Option text
	OptionText string `json:"option_text"`
	// OptionTextEntities Optional. Special entities that appear in the option_text
	OptionTextEntities []MessageEntity `json:"option_text_entities,omitempty"`
}

PollOptionDeleted describes a service message about a poll option being deleted. Since: Bot API 9.6

type PollType

type PollType string

PollType represents the type of a poll.

const (
	// PollTypeRegular identifies a regular poll.
	PollTypeRegular PollType = "regular"
	// PollTypeQuiz identifies a quiz poll.
	PollTypeQuiz PollType = "quiz"
)

type PostStory

type PostStory struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// Content Required. Content of the story
	Content InputStoryContent `json:"content"`
	// ActivePeriod Required. Period after which the story is moved to the archive, in seconds; must be one of 6
	// * 3600, 12 * 3600, 86400, or 2 * 86400
	ActivePeriod int `json:"active_period"`

	// Caption Optional. Caption of the story, 0-2048 characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the story caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// Areas Optional. A JSON-serialized list of clickable areas to be shown on the story
	Areas []StoryArea `json:"areas"`

	// PostToChatPage Optional. Pass True to keep the story accessible after it expires
	PostToChatPage bool `json:"post_to_chat_page,omitempty"`
	// ProtectContent Optional. Pass True if the content of the story must be protected from forwarding and
	// screenshotting
	ProtectContent bool `json:"protect_content,omitempty"`
}

PostStory holds parameters for the postStory method. Since: Bot API 7.2 See https://core.telegram.org/bots/api#poststory

type PreCheckoutQuery

type PreCheckoutQuery struct {
	// ID Unique query identifier
	ID string `json:"id"`
	// From User who sent the query
	From User `json:"from"`
	// Currency Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars
	Currency string `json:"currency"`
	// TotalAmount Total price in the smallest units of the currency (integer, not float/double). For example,
	// for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number
	// of digits past the decimal point for each currency (2 for the majority of currencies).
	TotalAmount int `json:"total_amount"`
	// InvoicePayload Bot-specified invoice payload
	InvoicePayload string `json:"invoice_payload"`
	// ShippingOptionID Optional. Identifier of the shipping option chosen by the user
	ShippingOptionID string `json:"shipping_option_id"`
	// OrderInfo Optional. Order information provided by the user
	OrderInfo *OrderInfo `json:"order_info,omitempty"`
}

PreCheckoutQuery represents an incoming pre-checkout query. Since: Bot API 3.0 See https://core.telegram.org/bots/api#precheckoutquery

type PreparedInlineMessage

type PreparedInlineMessage struct {
	// ID Unique identifier of the prepared message
	ID string `json:"id"`
	// ExpirationDate Expiration date of the prepared message, in Unix time. Expired prepared messages can no
	// longer be used.
	ExpirationDate int `json:"expiration_date"`
}

PreparedInlineMessage describes a prepared inline message. Since: Bot API 8.0 See https://core.telegram.org/bots/api#preparedinlinemessage

type PreparedKeyboardButton

type PreparedKeyboardButton struct {
	// ID Unique identifier of the keyboard button
	ID string `json:"id"`
}

PreparedKeyboardButton describes a prepared keyboard button. Since: Bot API 8.0 See https://core.telegram.org/bots/api#preparedkeyboardbutton

type PromoteChatMember

type PromoteChatMember struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// IsAnonymous Optional. Pass True if the administrator's presence in the chat is hidden
	IsAnonymous bool `json:"is_anonymous,omitempty"` // Since: Bot API 5.1

	// CanManageChat Optional. Pass True if the administrator can access the chat event log, get boost list, see
	// hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the
	// chat without paying Telegram Stars. Implied by any other administrator privilege.
	CanManageChat bool `json:"can_manage_chat,omitempty"` // Since: Bot API 5.3
	// CanDeleteMessages Optional. Pass True if the administrator can delete messages of other users
	CanDeleteMessages bool `json:"can_delete_messages,omitempty"`
	// CanManageVideoChats Optional. Pass True if the administrator can manage video chats
	CanManageVideoChats bool `json:"can_manage_video_chats,omitempty"` // Since: Bot API 6.0
	// CanRestrictMembers Optional. Pass True if the administrator can restrict, ban or unban chat members, or
	// access supergroup statistics. For backward compatibility, defaults to True for promotions of channel
	// administrators.
	CanRestrictMembers bool `json:"can_restrict_members,omitempty"`
	// CanPromoteMembers Optional. Pass True if the administrator can add new administrators with a subset of
	// their own privileges or demote administrators that they have promoted, directly or indirectly (promoted
	// by administrators that were appointed by him)
	CanPromoteMembers bool `json:"can_promote_members,omitempty"`
	// CanChangeInfo Optional. Pass True if the administrator can change chat title, photo and other settings
	CanChangeInfo bool `json:"can_change_info,omitempty"`
	// CanInviteUsers Optional. Pass True if the administrator can invite new users to the chat
	CanInviteUsers bool `json:"can_invite_users,omitempty"`
	// CanPostStories Optional. Pass True if the administrator can post stories to the chat
	CanPostStories bool `json:"can_post_stories,omitempty"` // Since: Bot API 6.9
	// CanEditStories Optional. Pass True if the administrator can edit stories posted by other users, post
	// stories to the chat page, pin chat stories, and access the chat's story archive
	CanEditStories bool `json:"can_edit_stories,omitempty"` // Since: Bot API 6.9
	// CanDeleteStories Optional. Pass True if the administrator can delete stories posted by other users
	CanDeleteStories bool `json:"can_delete_stories,omitempty"` // Since: Bot API 6.9
	// CanPostMessages Optional. Pass True if the administrator can post messages in the channel, approve
	// suggested posts, or access channel statistics; for channels only
	CanPostMessages bool `json:"can_post_messages,omitempty"`
	// CanEditMessages Optional. Pass True if the administrator can edit messages of other users and can pin
	// messages; for channels only
	CanEditMessages bool `json:"can_edit_messages,omitempty"`
	// CanPinMessages Optional. Pass True if the administrator can pin messages; for supergroups only
	CanPinMessages bool `json:"can_pin_messages,omitempty"`
	// CanManageTopics Optional. Pass True if the user is allowed to create, rename, close, and reopen forum
	// topics; for supergroups only
	CanManageTopics bool `json:"can_manage_topics,omitempty"` // Since: Bot API 6.3
	// CanManageDirectMessages Optional. Pass True if the administrator can manage direct messages within the
	// channel and decline suggested posts; for channels only
	CanManageDirectMessages bool `json:"can_manage_direct_messages,omitempty"` // Since: Bot API 9.1
	// CanManageTags Optional. Pass True if the administrator can edit the tags of regular members; for groups
	// and supergroups only
	CanManageTags bool `json:"can_manage_tags,omitempty"` // Since: Bot API 9.5
}

PromoteChatMember holds parameters for the promoteChatMember method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#promotechatmember

type ProximityAlertTriggered

type ProximityAlertTriggered struct {
	// Traveler User that triggered the alert
	Traveler User `json:"traveler"`
	// Watcher User that set the alert
	Watcher User `json:"watcher"`
	// Distance The distance between the users
	Distance int `json:"distance"`
}

ProximityAlertTriggered represents the content of a service message sent when a user triggers a proximity alert. Since: Bot API 5.0

type ReactionCount

type ReactionCount struct {
	// Type Type of the reaction
	Type ReactionType `json:"type"`
	// TotalCount Number of times the reaction was added
	TotalCount int `json:"total_count"`
}

ReactionCount represents a reaction added to a message along with the number of times it was added. Since: Bot API 7.0 See https://core.telegram.org/bots/api#reactioncount

type ReactionType

type ReactionType struct {
	// Type identifies the emoji, custom_emoji, or paid reaction variant.
	Type string `json:"type"`
	// Emoji Reaction emoji. Currently, it can be one of "", "", "", "", "", "", "", "", "", "", "", "", "", "",
	// "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
	// "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
	// "", "", "", "", "", "", "".
	// ReactionTypeEmoji
	Emoji *string `json:"emoji,omitempty"`
	// CustomEmojiID Custom emoji identifier
	// ReactionTypeCustomEmoji
	CustomEmojiID *string `json:"custom_emoji_id,omitempty"`
}

ReactionType describes the type of a reaction. Since: Bot API 7.0 See https://core.telegram.org/bots/api#reactiontype

type ReadBusinessMessage

type ReadBusinessMessage struct {
	// BusinessConnectionID Required. Unique identifier of the business connection on behalf of which to read
	// the message
	BusinessConnectionID string `json:"business_connection_id"`
	// ChatID Required. Unique identifier of the chat in which the message was received. The chat must have been
	// active in the last 24 hours.
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Unique identifier of the message to mark as read
	MessageID int `json:"message_id"`
}

ReadBusinessMessage holds parameters for the readBusinessMessage method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#readbusinessmessage

type RefundStarPayment

type RefundStarPayment struct {
	// UserID Required. Identifier of the user whose payment will be refunded
	UserID int64 `json:"user_id"`
	// TelegramPaymentChargeID Required. Telegram payment identifier
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
}

RefundStarPayment holds parameters for the refundStarPayment method. Since: Bot API 7.4 See https://core.telegram.org/bots/api#refundstarpayment

type RefundedPayment

type RefundedPayment struct {
	// Currency Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. Currently,
	// always “XTR”.
	Currency string `json:"currency"`
	// TotalAmount Total refunded price in the smallest units of the currency (integer, not float/double). For
	// example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows
	// the number of digits past the decimal point for each currency (2 for the majority of currencies).
	TotalAmount int `json:"total_amount"`
	// InvoicePayload Bot-specified invoice payload
	InvoicePayload string `json:"invoice_payload"`

	// TelegramPaymentChargeID Telegram payment identifier
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
	// ProviderPaymentChargeID Optional. Provider payment identifier
	ProviderPaymentChargeID string `json:"provider_payment_charge_id,omitempty"`
}

RefundedPayment contains basic information about a refunded payment. Since: Bot API 7.7

type RemoveBusinessAccountProfilePhoto

type RemoveBusinessAccountProfilePhoto struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// IsPublic Optional. Pass True to remove the public photo, which is visible even if the main photo is
	// hidden by the business account's privacy settings. After the main photo is removed, the previous profile
	// photo (if present) becomes the main photo.
	IsPublic bool `json:"is_public,omitempty"`
}

RemoveBusinessAccountProfilePhoto holds parameters for the removeBusinessAccountProfilePhoto method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#removebusinessaccountprofilephoto

type RemoveChatVerification

type RemoveChatVerification struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot or channel in the
	// format @username
	ChatID int64 `json:"chat_id"`
}

RemoveChatVerification holds parameters for the removeChatVerification method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#removechatverification

type RemoveUserVerification

type RemoveUserVerification struct {
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
}

RemoveUserVerification holds parameters for the removeUserVerification method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#removeuserverification

type ReplaceManagedBotToken

type ReplaceManagedBotToken struct {
	// UserID Required. User identifier of the managed bot whose token will be replaced
	UserID int64 `json:"user_id"`
}

ReplaceManagedBotToken holds parameters for the replaceManagedBotToken method. See https://core.telegram.org/bots/api#replacemanagedbottoken

type ReplaceStickerInSet

type ReplaceStickerInSet struct {
	// UserID Required. User identifier of the sticker set owner
	UserID int64 `json:"user_id"`
	// Name Required. Sticker set name
	Name string `json:"name"`
	// OldSticker Required. File identifier of the replaced sticker
	OldSticker string `json:"old_sticker"`
	// Sticker Required. A JSON-serialized object with information about the added sticker. If exactly the same
	// sticker had already been added to the set, then the set remains unchanged.
	Sticker InputSticker `json:"sticker"`
}

ReplaceStickerInSet holds parameters for the replaceStickerInSet method. Since: Bot API 7.2 See https://core.telegram.org/bots/api#replacestickerinset

type ReplyKeyboardMarkup

type ReplyKeyboardMarkup struct {
	// Keyboard Array of button rows, each represented by an Array of KeyboardButton objects
	Keyboard [][]KeyboardButton `json:"keyboard"`
	// IsPersistent Optional. Requests clients to always show the keyboard when the regular keyboard is hidden.
	// Defaults to False, in which case the custom keyboard can be hidden and opened with a keyboard icon.
	IsPersistent bool `json:"is_persistent,omitempty"`
	// ResizeKeyboard Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make
	// the keyboard smaller if there are just two rows of buttons). Defaults to False, in which case the custom
	// keyboard is always of the same height as the app's standard keyboard.
	ResizeKeyboard bool `json:"resize_keyboard,omitempty"`
	// OneTimeKeyboard Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard
	// will still be available, but clients will automatically display the usual letter-keyboard in the chat -
	// the user can press a special button in the input field to see the custom keyboard again. Defaults to
	// False.
	OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"`
	// InputFieldPlaceholder Optional. The placeholder to be shown in the input field when the keyboard is
	// active; 1-64 characters
	InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"`
	// Selective Optional. Use this parameter if you want to show the keyboard to specific users only. Targets:
	// 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a
	// message in the same chat and forum topic, sender of the original message. Example: A user requests to
	// change the bot's language, bot replies to the request with a keyboard to select the new language. Other
	// users in the group don't see the keyboard.
	Selective bool `json:"selective,omitempty"`
}

ReplyKeyboardMarkup represents a custom keyboard with reply options. Since: Bot API 1.0 See https://core.telegram.org/bots/api#replykeyboardmarkup

type ReplyMarkup

type ReplyMarkup struct {
	// InlineKeyboard Array of button rows, each represented by an Array of InlineKeyboardButton objects
	InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard,omitempty"`

	// Keyboard Array of button rows, each represented by an Array of KeyboardButton objects
	Keyboard [][]KeyboardButton `json:"keyboard,omitempty"`
	// IsPersistent Optional. Requests clients to always show the keyboard when the regular keyboard is hidden.
	// Defaults to False, in which case the custom keyboard can be hidden and opened with a keyboard icon.
	IsPersistent bool `json:"is_persistent,omitempty"`
	// ResizeKeyboard Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make
	// the keyboard smaller if there are just two rows of buttons). Defaults to False, in which case the custom
	// keyboard is always of the same height as the app's standard keyboard.
	ResizeKeyboard bool `json:"resize_keyboard,omitempty"`
	// OneTimeKeyboard Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard
	// will still be available, but clients will automatically display the usual letter-keyboard in the chat -
	// the user can press a special button in the input field to see the custom keyboard again. Defaults to
	// False.
	OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"`
	// InputFieldPlaceholder is the placeholder shown in the input field while the keyboard is active.
	InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"`
	// Selective limits the keyboard or reply interface to the targeted users.
	Selective bool `json:"selective,omitempty"`

	// RemoveKeyboard Requests clients to remove the custom keyboard (user will not be able to summon this
	// keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in
	// ReplyKeyboardMarkup)
	RemoveKeyboard bool `json:"remove_keyboard,omitempty"`

	// ForceReply Shows reply interface to the user, as if they manually selected the bot's message and tapped
	// 'Reply'
	ForceReply bool `json:"force_reply,omitempty"`
}

ReplyMarkup represents a custom keyboard or inline keyboard. Since: Bot API 1.0 See https://core.telegram.org/bots/api#replymarkup

type ReplyParameters

type ReplyParameters struct {
	// MessageID Optional. Identifier of the message that will be replied to in the current chat, or in the chat
	// chat_id if it is specified. Required if ephemeral_message_id isn't specified.
	MessageID int `json:"message_id,omitempty"`
	// ChatID Optional. If the message to be replied to is from a different chat, unique identifier for the chat
	// or username of the bot, supergroup or channel in the format @username. Not supported for messages sent on
	// behalf of a business account, messages from channel direct messages chats and ephemeral messages.
	ChatID int64 `json:"chat_id,omitempty"`
	// EphemeralMessageID identifies the ephemeral message.
	EphemeralMessageID int64 `json:"ephemeral_message_id,omitempty"` // Since: Bot API 10.2

	// AllowSendingWithoutReply Optional. Pass True if the message should be sent even if the specified message
	// to be replied to is not found. Always False for replies in another chat or forum topic, and sent
	// ephemeral messages. Always True for messages sent on behalf of a business account.
	AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"`
	// Quote Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing.
	// The quote must be an exact substring of the message to be replied to, including bold, italic, underline,
	// strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote
	// isn't found in the original message. Ignored for ephemeral messages.
	Quote string `json:"quote,omitempty"`
	// QuoteParsingMode Optional. Mode for parsing entities in the quote. See formatting options for more
	// details.
	// Subject to change in v2: the Go field name may be corrected to QuoteParseMode.
	QuoteParsingMode string `json:"quote_parse_mode,omitempty"`
	// QuoteEntities Optional. A JSON-serialized list of special entities that appear in the quote. It can be
	// specified instead of quote_parse_mode.
	QuoteEntities []MessageEntity `json:"quote_entities,omitempty"`
	// QuotePosition Optional. Position of the quote in the original message in UTF-16 code units
	QuotePosition int `json:"quote_position,omitempty"`
	// ChecklistTaskID Optional. Identifier of the specific checklist task to be replied to
	ChecklistTaskID int `json:"checklist_task_id,omitempty"`
	// PollOptionID Optional. Persistent identifier of the specific poll option to be replied to
	PollOptionID string `json:"poll_option_id,omitempty"`
}

ReplyParameters describes the parameters to use when replying to a message. Since: Bot API 7.0 See https://core.telegram.org/bots/api#replyparameters

type RepostStory

type RepostStory struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// FromChatID Required. Unique identifier of the chat which posted the story that should be reposted
	FromChatID int64 `json:"from_chat_id"`
	// FromStoryID Required. Unique identifier of the story that should be reposted
	FromStoryID int `json:"from_story_id"`
	// ActivePeriod Required. Period after which the story is moved to the archive, in seconds; must be one of 6
	// * 3600, 12 * 3600, 86400, or 2 * 86400
	ActivePeriod int `json:"active_period"`
	// PostToChatPage Optional. Pass True to keep the story accessible after it expires
	PostToChatPage bool `json:"post_to_chat_page,omitempty"`
	// ProtectContent Optional. Pass True if the content of the story must be protected from forwarding and
	// screenshotting
	ProtectContent bool `json:"protect_content,omitempty"`
}

RepostStory holds parameters for the repostStory method. Since: Bot API 7.2 See https://core.telegram.org/bots/api#repoststory

type ResponseError

type ResponseError struct {
	// Code is the Telegram API error code.
	Code int
	// Description is the human-readable Telegram API error description.
	Description string
	// Parameters contains additional recovery metadata such as retry_after.
	Parameters *ResponseParameters
}

ResponseError reports an unsuccessful Telegram API response.

func (*ResponseError) Error

func (e *ResponseError) Error() string

Error returns the Telegram API error code and description.

type ResponseParameters

type ResponseParameters struct {
	// MigrateToChatID Optional. The group has been migrated to a supergroup with the specified identifier. This
	// number may have more than 32 significant bits and some programming languages may have difficulty/silent
	// defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
	// double-precision float type are safe for storing this identifier.
	MigrateToChatID *int64 `json:"migrate_to_chat_id,omitempty"`
	// RetryAfter Optional. In case of exceeding flood control, the number of seconds left to wait before the
	// request can be repeated
	RetryAfter *int `json:"retry_after,omitempty"`
}

ResponseParameters contains Telegram API response metadata (e.g., retry_after, migrate_to_chat_id).

type RestrictChatMember

type RestrictChatMember struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// Permissions Required. A JSON-serialized object for new user permissions
	Permissions ChatPermissions `json:"permissions"`
	// UseIndependentChatPermissions Optional. Pass True if chat permissions are set independently. Otherwise,
	// the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
	// can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and
	// can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages
	// permission.
	UseIndependentChatPermissions bool `json:"use_independent_chat_permissions,omitempty"`
	// UntilDate Optional. Date when restrictions will be lifted for the user; Unix time. If user is restricted
	// for more than 366 days or less than 30 seconds from the current time, they are considered to be
	// restricted forever.
	UntilDate int `json:"until_date,omitempty"`
}

RestrictChatMember holds parameters for the restrictChatMember method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#restrictchatmember

type RevokeChatInviteLink struct {
	// ChatID Required. Unique identifier of the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// InviteLink Required. The invite link to revoke
	InviteLink string `json:"invite_link"`
}

RevokeChatInviteLink holds parameters for the revokeChatInviteLink method. Since: Bot API 5.1 See https://core.telegram.org/bots/api#revokechatinvitelink

type RichBlock added in v1.1.0

type RichBlock interface {
	// contains filtered or unexported methods
}

RichBlock is a block in a structured rich message.

Since: Bot API 10.1

func UnmarshalRichBlock added in v1.1.0

func UnmarshalRichBlock(data []byte) (RichBlock, error)

UnmarshalRichBlock parses a single RichBlock from JSON, dispatching on the type tag. Unknown types that carry a text field are decoded as RichBlockWrap so their nested text remains usable; unmodeled fields are discarded. The fallback representation is subject to change in v2 for lossless round trips.

Since: Bot API 10.1

type RichBlockAnchor added in v1.1.0

type RichBlockAnchor struct {
	// Name is the user-facing or reference name of the value.
	Name string
}

RichBlockAnchor is a named anchor block that anchor links can point to.

Since: Bot API 10.1

func (RichBlockAnchor) MarshalJSON added in v1.1.0

func (b RichBlockAnchor) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockAnimation added in v1.1.0

type RichBlockAnimation struct {
	// Animation contains the animation rendered by the block.
	Animation Animation
	// HasSpoiler reports whether the media is covered by a spoiler.
	HasSpoiler bool
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockAnimation is an animation block.

Since: Bot API 10.1

func (RichBlockAnimation) MarshalJSON added in v1.1.0

func (b RichBlockAnimation) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockAudio added in v1.1.0

type RichBlockAudio struct {
	// Audio contains the audio rendered by the block.
	Audio Audio
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockAudio is an audio block.

Since: Bot API 10.1

func (RichBlockAudio) MarshalJSON added in v1.1.0

func (b RichBlockAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockCaption added in v1.1.0

type RichBlockCaption struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Credit contains attribution displayed with the block.
	Credit RichText
}

RichBlockCaption is the caption of a media block or container.

Since: Bot API 10.1

func (RichBlockCaption) MarshalJSON added in v1.1.0

func (c RichBlockCaption) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

func (*RichBlockCaption) UnmarshalJSON added in v1.1.0

func (c *RichBlockCaption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

Since: Bot API 10.1

type RichBlockCollage added in v1.1.0

type RichBlockCollage struct {
	// Blocks contains the nested rich-message blocks.
	Blocks []RichBlock
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockCollage is a collage of media blocks.

Since: Bot API 10.1

func (RichBlockCollage) MarshalJSON added in v1.1.0

func (b RichBlockCollage) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockDetails added in v1.1.0

type RichBlockDetails struct {
	// Summary contains the visible summary of a details block.
	Summary RichText
	// Blocks contains the nested rich-message blocks.
	Blocks []RichBlock
	// IsOpen requests the details block to be expanded initially.
	IsOpen bool
}

RichBlockDetails is an expandable block with an inline summary.

Since: Bot API 10.1

func (RichBlockDetails) MarshalJSON added in v1.1.0

func (b RichBlockDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockDivider added in v1.1.0

type RichBlockDivider struct{}

RichBlockDivider is a horizontal divider block.

Since: Bot API 10.1

func (RichBlockDivider) MarshalJSON added in v1.1.0

func (b RichBlockDivider) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockList added in v1.1.0

type RichBlockList struct {
	// Items contains the list items.
	Items []RichBlockListItem
}

RichBlockList is a list block.

Since: Bot API 10.1

func (RichBlockList) MarshalJSON added in v1.1.0

func (b RichBlockList) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockListItem added in v1.1.0

type RichBlockListItem struct {
	// Label contains the list-item label.
	Label string
	// Blocks contains the nested rich-message blocks.
	Blocks []RichBlock
	// HasCheckbox reports whether the list item includes a checkbox.
	HasCheckbox bool
	// IsChecked reports whether the list-item checkbox is checked.
	IsChecked bool
	// Value is the numeric marker value for an ordered list item.
	Value int // for ordered lists: numeric value of the marker
	// Type selects the ordered-list marker style: a, A, i, I, or 1.
	Type RichBlockListItemType // for ordered lists: "a", "A", "i", "I" or "1"
}

RichBlockListItem is a single list item. Label is the ready-to-display visible marker ("1.", "c.", "vii.", "•"): the server renders it itself when parsing html/markdown.

Since: Bot API 10.1

func (RichBlockListItem) MarshalJSON added in v1.1.0

func (i RichBlockListItem) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

func (*RichBlockListItem) UnmarshalJSON added in v1.1.0

func (i *RichBlockListItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

Since: Bot API 10.1

type RichBlockListItemType added in v1.1.0

type RichBlockListItemType string

RichBlockListItemType identifies an ordered-list label style.

Since: Bot API 10.2

const (
	// InputRichBlockListItemTypeLower uses lowercase letters.
	InputRichBlockListItemTypeLower RichBlockListItemType = "a"
	// InputRichBlockListItemTypeUpper uses uppercase letters.
	InputRichBlockListItemTypeUpper RichBlockListItemType = "A"
	// InputRichBlockListItemTypeRomanLow uses lowercase Roman numerals.
	InputRichBlockListItemTypeRomanLow RichBlockListItemType = "i"
	// InputRichBlockListItemTypeRomanUpper uses uppercase Roman numerals.
	InputRichBlockListItemTypeRomanUpper RichBlockListItemType = "I"
	// InputRichBlockListItemTypeDecimal uses decimal numbers.
	InputRichBlockListItemTypeDecimal RichBlockListItemType = "1"
)

type RichBlockMap added in v1.1.0

type RichBlockMap struct {
	// Location contains the map location.
	Location Location
	// Zoom is the map zoom level in the range 13 through 20.
	Zoom int // 13-20
	// Width is the requested media or map width in pixels.
	Width int
	// Height is the requested media or map height in pixels.
	Height int
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockMap is a location map block.

Since: Bot API 10.1

func (RichBlockMap) MarshalJSON added in v1.1.0

func (b RichBlockMap) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockMathematicalExpression added in v1.1.0

type RichBlockMathematicalExpression struct {
	// Expression contains the mathematical expression source.
	Expression string
}

RichBlockMathematicalExpression is a block-level mathematical expression.

Since: Bot API 10.1

func (RichBlockMathematicalExpression) MarshalJSON added in v1.1.0

func (b RichBlockMathematicalExpression) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockPhoto added in v1.1.0

type RichBlockPhoto struct {
	// Photo contains or identifies the associated photo.
	Photo []PhotoSize
	// HasSpoiler reports whether the media is covered by a spoiler.
	HasSpoiler bool
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockPhoto is a photo block.

Since: Bot API 10.1

func (RichBlockPhoto) MarshalJSON added in v1.1.0

func (b RichBlockPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockPreformatted added in v1.1.0

type RichBlockPreformatted struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Language identifies the programming language used for syntax highlighting.
	Language string
}

RichBlockPreformatted is a preformatted code block.

Since: Bot API 10.1

func (RichBlockPreformatted) MarshalJSON added in v1.1.0

func (b RichBlockPreformatted) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockPullQuotation added in v1.1.0

type RichBlockPullQuotation struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Credit contains attribution displayed with the block.
	Credit RichText
}

RichBlockPullQuotation is a pull quotation with inline content.

Since: Bot API 10.1

func (RichBlockPullQuotation) MarshalJSON added in v1.1.0

func (b RichBlockPullQuotation) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockQuotation added in v1.1.0

type RichBlockQuotation struct {
	// Blocks contains the nested rich-message blocks.
	Blocks []RichBlock
	// Credit contains attribution displayed with the block.
	Credit RichText
}

RichBlockQuotation is a block quotation with block-level content (officially RichBlockBlockQuotation).

Since: Bot API 10.1

func (RichBlockQuotation) MarshalJSON added in v1.1.0

func (b RichBlockQuotation) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockSectionHeading added in v1.1.0

type RichBlockSectionHeading struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Size is the heading level from 1 through 6, where 1 is largest.
	Size int // 1-6, 1 is the largest
}

RichBlockSectionHeading is a section heading block.

Since: Bot API 10.1

func (RichBlockSectionHeading) MarshalJSON added in v1.1.0

func (b RichBlockSectionHeading) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockSlideshow added in v1.1.0

type RichBlockSlideshow struct {
	// Blocks contains the nested rich-message blocks.
	Blocks []RichBlock
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockSlideshow is a slideshow of media blocks.

Since: Bot API 10.1

func (RichBlockSlideshow) MarshalJSON added in v1.1.0

func (b RichBlockSlideshow) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockTable added in v1.1.0

type RichBlockTable struct {
	// Cells contains the table rows and cells.
	Cells [][]RichBlockTableCell
	// IsBordered requests visible table borders.
	IsBordered bool
	// IsStriped requests alternating table row styling.
	IsStriped bool
	// Caption contains the media or block caption.
	Caption RichText
}

RichBlockTable is a table block.

Since: Bot API 10.1

func (RichBlockTable) MarshalJSON added in v1.1.0

func (b RichBlockTable) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockTableCell added in v1.1.0

type RichBlockTableCell struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// IsHeader marks the table cell as a header cell.
	IsHeader bool
	// ColSpan is the number of table columns spanned by the cell.
	ColSpan int
	// RowSpan is the number of table rows spanned by the cell.
	RowSpan int
	// Align is the horizontal alignment: left, center, or right.
	Align string // "left", "center" or "right"
	// VAlign is the vertical alignment: top, middle, or bottom.
	VAlign string // "top", "middle" or "bottom"
}

RichBlockTableCell is a table cell. An empty Text means an invisible cell.

Since: Bot API 10.1

func (RichBlockTableCell) MarshalJSON added in v1.1.0

func (c RichBlockTableCell) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

func (*RichBlockTableCell) UnmarshalJSON added in v1.1.0

func (c *RichBlockTableCell) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

Since: Bot API 10.1

type RichBlockVideo added in v1.1.0

type RichBlockVideo struct {
	// Video contains the video rendered by the block.
	Video Video
	// HasSpoiler reports whether the media is covered by a spoiler.
	HasSpoiler bool
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockVideo is a video block.

Since: Bot API 10.1

func (RichBlockVideo) MarshalJSON added in v1.1.0

func (b RichBlockVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockVoiceNote added in v1.1.0

type RichBlockVoiceNote struct {
	// VoiceNote contains the voice note rendered by the block.
	VoiceNote Voice
	// Caption contains the media or block caption.
	Caption *RichBlockCaption
}

RichBlockVoiceNote is a voice note block.

Since: Bot API 10.1

func (RichBlockVoiceNote) MarshalJSON added in v1.1.0

func (b RichBlockVoiceNote) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichBlockWrap added in v1.1.0

type RichBlockWrap struct {
	// Tag identifies the rich-text formatting wrapper.
	Tag string
	// Text contains the formatted or plain text content.
	Text RichText
}

RichBlockWrap covers all blocks that have only a text field.

Since: Bot API 10.1

func (RichBlockWrap) MarshalJSON added in v1.1.0

func (b RichBlockWrap) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichMessage added in v1.1.0

type RichMessage struct {
	// Blocks contains the nested rich-message blocks.
	Blocks []RichBlock `json:"blocks"`
	// IsRTL requests right-to-left rich-message layout.
	IsRTL bool `json:"is_rtl,omitempty"`
}

RichMessage represents a received rich-formatted message. Since: Bot API 10.1

func UnmarshalRichMessage added in v1.1.0

func UnmarshalRichMessage(data []byte) (RichMessage, error)

UnmarshalRichMessage parses a root RichMessage from JSON.

For v1 compatibility, missing and null blocks are accepted as an empty message. This permissive behavior is subject to change in v2; use UnmarshalRichMessageStrict when validating untrusted input.

Since: Bot API 10.1

func UnmarshalRichMessageStrict added in v1.2.0

func UnmarshalRichMessageStrict(data []byte) (RichMessage, error)

UnmarshalRichMessageStrict parses a RichMessage and requires a non-null blocks array.

Since: Bot API 10.1

func (*RichMessage) UnmarshalJSON added in v1.1.0

func (m *RichMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

Since: Bot API 10.1

type RichText added in v1.1.0

type RichText interface {
	// contains filtered or unexported methods
}

RichText is a node of the rich formatted text tree: a plain string, an array, or one of the typed objects below.

Since: Bot API 10.1

func UnmarshalRichText added in v1.1.0

func UnmarshalRichText(data []byte) (RichText, error)

UnmarshalRichText parses a RichText tree from JSON: a string, an array, or a typed object. Unknown object types that carry a text field are preserved as RichTextWrap so their nested text remains usable; unmodeled fields are discarded. The fallback representation is subject to change in v2 so unknown fields can be preserved losslessly.

Since: Bot API 10.1

type RichTextAnchor added in v1.1.0

type RichTextAnchor struct {
	// Name is the user-facing or reference name of the value.
	Name string
}

RichTextAnchor is a named anchor leaf that anchor links can point to.

Since: Bot API 10.1

func (RichTextAnchor) MarshalJSON added in v1.1.0

func (v RichTextAnchor) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextAnchorLink struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// AnchorName names the anchor targeted by the link.
	AnchorName string
}

RichTextAnchorLink is rich text linking to a named anchor in the same message.

Since: Bot API 10.1

func (RichTextAnchorLink) MarshalJSON added in v1.1.0

func (v RichTextAnchorLink) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextArray added in v1.1.0

type RichTextArray []RichText

RichTextArray is a concatenation of rich text nodes.

Since: Bot API 10.1

type RichTextBankCardNumber added in v1.1.0

type RichTextBankCardNumber struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// BankCardNumber is the bank card number associated with the text.
	BankCardNumber string
}

RichTextBankCardNumber is rich text marked as a bank card number.

Since: Bot API 10.1

func (RichTextBankCardNumber) MarshalJSON added in v1.1.0

func (v RichTextBankCardNumber) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextBotCommand added in v1.1.0

type RichTextBotCommand struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// BotCommand is the bot command associated with the text.
	BotCommand string
}

RichTextBotCommand is rich text marked as a bot command.

Since: Bot API 10.1

func (RichTextBotCommand) MarshalJSON added in v1.1.0

func (v RichTextBotCommand) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextCashtag added in v1.1.0

type RichTextCashtag struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Cashtag is the cashtag associated with the text.
	Cashtag string
}

RichTextCashtag is rich text marked as a cashtag.

Since: Bot API 10.1

func (RichTextCashtag) MarshalJSON added in v1.1.0

func (v RichTextCashtag) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextCustomEmoji added in v1.1.0

type RichTextCustomEmoji struct {
	// CustomEmojiID identifies the custom emoji.
	CustomEmojiID string
	// AlternativeText is shown when the custom emoji can't be rendered.
	AlternativeText string
}

RichTextCustomEmoji is a custom emoji leaf with alternative text.

Since: Bot API 10.1

func (RichTextCustomEmoji) MarshalJSON added in v1.1.0

func (v RichTextCustomEmoji) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextDateTime added in v1.1.0

type RichTextDateTime struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// UnixTime is the Unix timestamp associated with the text.
	UnixTime int64
	// DateTimeFormat controls how the associated Unix time is displayed.
	DateTimeFormat string
}

RichTextDateTime is rich text bound to a point in time with a display format.

Since: Bot API 10.1

func (RichTextDateTime) MarshalJSON added in v1.1.0

func (v RichTextDateTime) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextEmailAddress added in v1.1.0

type RichTextEmailAddress struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// EmailAddress is the email address associated with the text.
	EmailAddress string
}

RichTextEmailAddress is rich text linking to an email address.

Since: Bot API 10.1

func (RichTextEmailAddress) MarshalJSON added in v1.1.0

func (v RichTextEmailAddress) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextHashtag added in v1.1.0

type RichTextHashtag struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Hashtag is the hashtag associated with the text.
	Hashtag string
}

RichTextHashtag is rich text marked as a hashtag.

Since: Bot API 10.1

func (RichTextHashtag) MarshalJSON added in v1.1.0

func (v RichTextHashtag) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextMathematicalExpression added in v1.1.0

type RichTextMathematicalExpression struct {
	// Expression contains the mathematical expression source.
	Expression string
}

RichTextMathematicalExpression is an inline mathematical expression leaf.

Since: Bot API 10.1

func (RichTextMathematicalExpression) MarshalJSON added in v1.1.0

func (v RichTextMathematicalExpression) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextMention added in v1.1.0

type RichTextMention struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Username is the username associated with the mention.
	Username string
}

RichTextMention is rich text mentioning a user by username.

Since: Bot API 10.1

func (RichTextMention) MarshalJSON added in v1.1.0

func (v RichTextMention) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextPhoneNumber added in v1.1.0

type RichTextPhoneNumber struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// PhoneNumber is the phone number associated with the text.
	PhoneNumber string
}

RichTextPhoneNumber is rich text linking to a phone number.

Since: Bot API 10.1

func (RichTextPhoneNumber) MarshalJSON added in v1.1.0

func (v RichTextPhoneNumber) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextPlain added in v1.1.0

type RichTextPlain string

RichTextPlain is a plain text leaf.

Since: Bot API 10.1

type RichTextReference added in v1.1.0

type RichTextReference struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// Name is the user-facing or reference name of the value.
	Name string
}

RichTextReference is rich text marked as a named reference target.

Since: Bot API 10.1

func (RichTextReference) MarshalJSON added in v1.1.0

func (v RichTextReference) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextReferenceLink struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// ReferenceName names the reference targeted by the link.
	ReferenceName string
}

RichTextReferenceLink is rich text linking to a named reference.

Since: Bot API 10.1

func (RichTextReferenceLink) MarshalJSON added in v1.1.0

func (v RichTextReferenceLink) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextTextMention added in v1.1.0

type RichTextTextMention struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// User contains the user associated with the value.
	User User
}

RichTextTextMention is rich text mentioning a user without a username.

Since: Bot API 10.1

func (RichTextTextMention) MarshalJSON added in v1.1.0

func (v RichTextTextMention) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextURL added in v1.1.0

type RichTextURL struct {
	// Text contains the formatted or plain text content.
	Text RichText
	// URL contains the HTTP URL.
	URL string
}

RichTextURL is rich text linking to a URL.

Since: Bot API 10.1

func (RichTextURL) MarshalJSON added in v1.1.0

func (v RichTextURL) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type RichTextWrap added in v1.1.0

type RichTextWrap struct {
	// Tag identifies the rich-text formatting wrapper.
	Tag string
	// Text contains the formatted or plain text content.
	Text RichText
}

RichTextWrap covers all "pure" wrapper nodes with a single type.

Since: Bot API 10.1

func (RichTextWrap) MarshalJSON added in v1.1.0

func (w RichTextWrap) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

Since: Bot API 10.1

type SavePreparedInlineMessage

type SavePreparedInlineMessage struct {
	// UserID Required. Unique identifier of the target user that can use the prepared message
	UserID int64 `json:"user_id"`
	// Result Required. A JSON-serialized object describing the message to be sent
	Result InlineQueryResult `json:"result"`
	// AllowUserChats Optional. Pass True if the message can be sent to private chats with users
	AllowUserChats bool `json:"allow_user_chats,omitempty"`
	// AllowBotChats Optional. Pass True if the message can be sent to private chats with bots
	AllowBotChats bool `json:"allow_bot_chats,omitempty"`
	// AllowGroupChats Optional. Pass True if the message can be sent to group and supergroup chats
	AllowGroupChats bool `json:"allow_group_chats,omitempty"`
	// AllowChannelChats Optional. Pass True if the message can be sent to channel chats
	AllowChannelChats bool `json:"allow_channel_chats,omitempty"`
}

SavePreparedInlineMessage holds parameters for the savePreparedInlineMessage method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#savepreparedinlinemessage

type SavePreparedKeyboardButton

type SavePreparedKeyboardButton struct {
	// UserID Required. Unique identifier of the target user that can use the button
	UserID int64 `json:"user_id"`
	// Button Required. A JSON-serialized object describing the button to be saved. The button must be of the
	// type request_users, request_chat, or request_managed_bot.
	Button KeyboardButton `json:"button"`
}

SavePreparedKeyboardButton holds parameters for the savePreparedKeyboardButton method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#savepreparedkeyboardbutton

type SendAnimation

type SendAnimation struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Animation Required. Animation to send. Pass a file_id as String to send an animation that exists on the
	// Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the
	// Internet, or upload a new animation using multipart/form-data. More information on Sending Files »
	Animation string `json:"animation"`
	// Thumbnail Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data.
	// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass
	// “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. More information on Sending Files »
	Thumbnail string `json:"thumbnail,omitempty"`
	// Duration Optional. Duration of sent animation in seconds
	Duration int `json:"duration,omitempty"`
	// Width Optional. Animation width
	Width int `json:"width,omitempty"`
	// Height Optional. Animation height
	Height int `json:"height,omitempty"`

	// Caption Optional. Animation caption (may also be used when resending animation by file_id), 0-1024
	// characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the animation caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the animation needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendAnimation holds parameters for the sendAnimation method. Since: Bot API 4.0 See https://core.telegram.org/bots/api#sendanimation

type SendAudio

type SendAudio struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Audio Required. Audio file to send. Pass a file_id as String to send an audio file that exists on the
	// Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the
	// Internet, or upload a new one using multipart/form-data. More information on Sending Files »
	Audio string `json:"audio"`
	// Caption Optional. Audio caption, 0-1024 characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the audio caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// Duration Optional. Duration of the audio in seconds
	Duration int `json:"duration,omitempty"`
	// Performer Optional. Performer
	Performer string `json:"performer,omitempty"`
	// Title Optional. Track name
	Title string `json:"title,omitempty"`
	// Thumbnail Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data.
	// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass
	// “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. More information on Sending Files »
	Thumbnail string `json:"thumbnail,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendAudio holds parameters for the sendAudio method. Since: Bot API 1.2 See https://core.telegram.org/bots/api#sendaudio

type SendChatAction

type SendChatAction struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the action
	// will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot or supergroup in the
	// format @username. Channel chats and channel direct messages chats aren't supported.
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread or topic of a forum; for
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// Action Required. Type of action to broadcast. Choose one, depending on what the user is about to receive:
	// typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice
	// or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers,
	// find_location for location data, record_video_note or upload_video_note for video notes.
	Action ChatActionType `json:"action"`
}

SendChatAction holds parameters for the sendChatAction method. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendchataction

type SendChatJoinRequestWebApp added in v1.1.0

type SendChatJoinRequestWebApp struct {
	// ChatJoinRequestQueryID identifies the chat join request query.
	ChatJoinRequestQueryID string `json:"chat_join_request_query_id"`
	// WebAppURL is the HTTPS URL of the Mini App to open.
	WebAppURL string `json:"web_app_url"`
}

SendChatJoinRequestWebApp holds parameters for the sendChatJoinRequestWebApp method. Since: Bot API 10.1 See https://core.telegram.org/bots/api#sendchatjoinrequestwebapp

type SendChecklist

type SendChecklist struct {
	// BusinessConnectionID Required. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// Checklist Required. A JSON-serialized object for the checklist to send
	Checklist InputChecklist `json:"checklist"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// ReplyParameters Optional. A JSON-serialized object for description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. A JSON-serialized object for an inline keyboard
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendChecklist holds parameters for the sendChecklist method. Since: Bot API 9.1 See https://core.telegram.org/bots/api#sendchecklist

type SendContact

type SendContact struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// PhoneNumber Required. Contact's phone number
	PhoneNumber string `json:"phone_number"`
	// FirstName Required. Contact's first name
	FirstName string `json:"first_name"`
	// LastName Optional. Contact's last name
	LastName string `json:"last_name,omitempty"`
	// Vcard Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
	Vcard string `json:"vcard"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendContact holds parameters for the sendContact method. Since: Bot API 2.0 See https://core.telegram.org/bots/api#sendcontact

type SendDice

type SendDice struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// Emoji Optional. Emoji on which the dice throw animation is based. Currently, must be one of “”,
	// “”, “”, “”, “”, or “”. Dice can have values 1-6 for “”, “” and “”, values
	// 1-5 for “” and “”, and values 1-64 for “”. Defaults to “”.
	Emoji string `json:"emoji,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendDice holds parameters for the sendDice method. Since: Bot API 4.7 See https://core.telegram.org/bots/api#senddice

type SendDocument

type SendDocument struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Document Required. File to send. Pass a file_id as String to send a file that exists on the Telegram
	// servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or
	// upload a new one using multipart/form-data. More information on Sending Files »
	Document string `json:"document"`
	// Thumbnail Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data.
	// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass
	// “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. More information on Sending Files »
	Thumbnail string `json:"thumbnail,omitempty"`
	// Caption Optional. Document caption (may also be used when resending documents by file_id), 0-1024
	// characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the document caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// DisableContentTypeDetection Optional. Disables automatic server-side content type detection for files
	// uploaded using multipart/form-data
	DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendDocument holds parameters for the sendDocument method. Since: Bot API 1.0 See https://core.telegram.org/bots/api#senddocument

type SendGame

type SendGame struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot in the format
	// @username. Games can't be sent to channel direct messages chats and channel chats.
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`

	// GameShortName Required. Short name of the game, serves as the unique identifier for the game. Set up your
	// games via @BotFather.
	GameShortName string `json:"game_short_name"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title'
	// button will be shown. If not empty, the first button must launch the game.
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

SendGame holds parameters for the sendGame method. Since: Bot API 2.2 See https://core.telegram.org/bots/api#sendgame

type SendGift

type SendGift struct {
	// UserID Optional. Required if chat_id is not specified. Unique identifier of the target user who will
	// receive the gift.
	UserID int64 `json:"user_id,omitempty"`
	// ChatID Optional. Required if user_id is not specified. Unique identifier for the chat or username of the
	// channel (in the format @username) that will receive the gift.
	ChatID int64 `json:"chat_id,omitempty"`
	// GiftID Required. Identifier of the gift; limited gifts can't be sent to channel chats
	GiftID string `json:"gift_id"`
	// PayForUpgrade Optional. Pass True to pay for the gift upgrade from the bot's balance, thereby making the
	// upgrade free for the receiver
	PayForUpgrade bool `json:"pay_for_upgrade"`
	// Text Optional. Text that will be shown along with the gift; 0-128 characters
	Text string `json:"text"`
	// TextParseMode Optional. Mode for parsing entities in the text. See formatting options for more details.
	// Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”,
	// “custom_emoji”, and “date_time” are ignored.
	TextParseMode ParseMode `json:"text_parse_mode,omitempty"`
	// TextEntities Optional. A JSON-serialized list of special entities that appear in the gift text. It can be
	// specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”,
	// “strikethrough”, “spoiler”, “custom_emoji”, and “date_time” are ignored.
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
}

SendGift holds parameters for the sendGift method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#sendgift

type SendInvoice

type SendInvoice struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// Title Required. Product name, 1-32 characters
	Title string `json:"title"`
	// Description Required. Product description, 1-255 characters
	Description string `json:"description"`
	// Payload Required. Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use
	// it for your internal processes.
	Payload string `json:"payload"`
	// ProviderToken Optional. Payment provider token, obtained via @BotFather. Pass an empty string for
	// payments in Telegram Stars.
	ProviderToken string `json:"provider_token,omitempty"`
	// Currency Required. Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for
	// payments in Telegram Stars.
	Currency string `json:"currency"`
	// Prices Required. Price breakdown, a JSON-serialized list of components (e.g. product price, tax,
	// discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in
	// Telegram Stars.
	Prices []LabeledPrice `json:"prices"`

	// MaxTipAmount Optional. The maximum accepted amount for tips in the smallest units of the currency
	// (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See
	// the exp parameter in currencies.json, it shows the number of digits past the decimal point for each
	// currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.
	MaxTipAmount int `json:"max_tip_amount,omitempty"`
	// SuggestedTipAmounts Optional. A JSON-serialized Array of suggested amounts of tips in the smallest units
	// of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The
	// suggested tip amounts must be positive, passed in a strictly increased order and must not exceed
	// max_tip_amount.
	SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"`
	// StartParameter Optional. Unique deep-linking parameter. If left empty, forwarded copies of the sent
	// message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using
	// the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep
	// link to the bot (instead of a Pay button), with the value used as the start parameter.
	StartParameter string `json:"start_parameter,omitempty"`
	// ProviderData Optional. JSON-serialized data about the invoice, which will be shared with the payment
	// provider. A detailed description of required fields should be provided by the payment provider.
	ProviderData string `json:"provider_data,omitempty"`
	// PhotoURL Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing
	// image for a service. People like it better when they see what they are paying for.
	PhotoURL string `json:"photo_url,omitempty"`
	// PhotoSize Optional. Photo size in bytes
	PhotoSize int `json:"photo_size,omitempty"`
	// PhotoWidth Optional. Photo width
	PhotoWidth int `json:"photo_width,omitempty"`
	// PhotoHeight Optional. Photo height
	PhotoHeight int `json:"photo_height,omitempty"`
	// NeedName Optional. Pass True if you require the user's full name to complete the order. Ignored for
	// payments in Telegram Stars.
	NeedName bool `json:"need_name,omitempty"`
	// NeedPhoneNumber Optional. Pass True if you require the user's phone number to complete the order. Ignored
	// for payments in Telegram Stars.
	NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
	// NeedEmail Optional. Pass True if you require the user's email address to complete the order. Ignored for
	// payments in Telegram Stars.
	NeedEmail bool `json:"need_email,omitempty"`
	// NeedShippingAddress Optional. Pass True if you require the user's shipping address to complete the order.
	// Ignored for payments in Telegram Stars.
	NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
	// SendPhoneToProvider Optional. Pass True if the user's phone number should be sent to the provider.
	// Ignored for payments in Telegram Stars.
	SendPhoneToProvider bool `json:"send_phone_number_to_provider,omitempty"`
	// SendEmailToProvider Optional. Pass True if the user's email address should be sent to the provider.
	// Ignored for payments in Telegram Stars.
	SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
	// IsFlexible Optional. Pass True if the final price depends on the shipping method. Ignored for payments in
	// Telegram Stars.
	IsFlexible bool `json:"is_flexible,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price'
	// button will be shown. If not empty, the first button must be a Pay button.
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

SendInvoice holds parameters for the sendInvoice method. Since: Bot API 3.0 See https://core.telegram.org/bots/api#sendinvoice

type SendLivePhoto

type SendLivePhoto struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target channel (in the format
	// @channelusername)
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2
	// LivePhoto Required. Live photo video to send. The video must be no longer than 10 seconds and must not
	// exceed 10 MB in size. Pass a file_id as String to send a video that exists on the Telegram servers
	// (recommended) or upload a new video using multipart/form-data. More information on Sending Files ».
	// Sending live photos by a URL is currently unsupported.
	LivePhoto string `json:"live_photo"`
	// Photo contains or identifies the associated photo.
	Photo string `json:"photo"`
	// Caption Optional. Video caption (may also be used when resending videos by file_id), 0-1024 characters
	// after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the video caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the video needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendLivePhoto holds parameters for the sendLivePhoto method. Since: Bot API 10.0 See https://core.telegram.org/bots/api#sendlivephoto

type SendLocation

type SendLocation struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Latitude Required. Latitude of the location
	Latitude float64 `json:"latitude"`
	// Longitude Required. Longitude of the location
	Longitude float64 `json:"longitude"`
	// HorizontalAccuracy Optional. The radius of uncertainty for the location, measured in meters; 0-1500
	HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
	// LivePeriod Optional. Period in seconds during which the location will be updated (see Live Locations),
	// must be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. Must be 0
	// for ephemeral messages.
	LivePeriod int `json:"live_period,omitempty"`
	// Heading Optional. For live locations, a direction in which the user is moving, in degrees. Must be
	// between 1 and 360 if specified.
	Heading int `json:"heading,omitempty"`
	// ProximityAlertRadius Optional. For live locations, a maximum distance for proximity alerts about
	// approaching another chat member, in meters. Must be between 1 and 100000 if specified.
	ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendLocation holds parameters for the sendLocation method. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendlocation

type SendMediaGroup

type SendMediaGroup struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the messages will be
	// sent; required if the messages are sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// Media Required. A JSON-serialized Array describing messages to be sent, must include 2-10 items
	Media []InputMedia `json:"media"`
	// DisableNotification Optional. Sends messages silently. Users will receive a notification with no sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent messages from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
}

SendMediaGroup holds parameters for the sendMediaGroup method. Since: Bot API 3.5 See https://core.telegram.org/bots/api#sendmediagroup

type SendMessage

type SendMessage struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int64 `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Text Required. Text of the message to be sent, 1-4096 characters after entities parsing
	Text string `json:"text"`
	// ParseMode Optional. Mode for parsing entities in the message text. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// Entities Optional. A JSON-serialized list of special entities that appear in message text, which can be
	// specified instead of parse_mode
	Entities []MessageEntity `json:"entities,omitempty"`
	// LinkPreviewOptions Optional. Link preview generation options for the message
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
	// DisableNotifications Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotifications bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendMessage holds parameters for the sendMessage method. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendmessage

type SendMessageDraft

type SendMessageDraft struct {
	// ChatID Required. Unique identifier for the target private chat
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DraftID Required. Unique identifier of the message draft; must be non-zero. Changes to drafts with the
	// same identifier are animated.
	DraftID uint64 `json:"draft_id"`
	// Text Optional. Text of the message to be sent, 0-4096 characters after entities parsing. Pass an empty
	// text to show a “Thinking…” placeholder.
	Text string `json:"text"`
	// ParseMode Optional. Mode for parsing entities in the message text. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// Entities Optional. A JSON-serialized list of special entities that appear in message text, which can be
	// specified instead of parse_mode
	Entities []MessageEntity `json:"entities,omitempty"`
}

SendMessageDraft holds parameters for the sendMessageDraft method. Since: Bot API 9.1 See https://core.telegram.org/bots/api#sendmessagedraft

type SendPaidMedia

type SendPaidMedia struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username. If the chat is a channel, all Telegram Star proceeds from this media
	// will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// StarCount Required. The number of Telegram Stars that must be paid to buy access to the media; 1-25000
	StarCount int `json:"star_count,omitempty"`

	// Media Required. A JSON-serialized Array describing the media to be sent; up to 10 items
	Media []InputPaidMedia `json:"media"`
	// Payload Optional. Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user,
	// use it for your internal processes.
	Payload string `json:"payload,omitempty"`
	// Caption Optional. Media caption, 0-1024 characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the media caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendPaidMedia holds parameters for the sendPaidMedia method. Since: Bot API 7.6 See https://core.telegram.org/bots/api#sendpaidmedia

type SendPhoto

type SendPhoto struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Photo Required. Photo to send. Pass a file_id as String to send a photo that exists on the Telegram
	// servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or
	// upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width
	// and height must not exceed 10000 in total. Width and height ratio must be at most 20. More information on
	// Sending Files »
	Photo string `json:"photo"`
	// Caption Optional. Photo caption (may also be used when resending photos by file_id), 0-1024 characters
	// after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the photo caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the photo needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// DisableNotifications Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotifications bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendPhoto holds parameters for the sendPhoto method. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendphoto

type SendPoll

type SendPoll struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username. Polls can't be sent to channel direct messages chats.
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`

	// Question Required. Poll question, 1-300 characters
	Question string `json:"question"`
	// QuestionParseMode Optional. Mode for parsing entities in the question. See formatting options for more
	// details. Currently, only custom emoji entities are allowed.
	QuestionParseMode ParseMode `json:"question_parse_mode,omitempty"`
	// QuestionEntities Optional. A JSON-serialized list of special entities that appear in the poll question.
	// It can be specified instead of question_parse_mode.
	QuestionEntities []MessageEntity `json:"question_entities,omitempty"`
	// Options Required. A JSON-serialized list of 1-12 answer options
	Options []InputPollOption `json:"options"`
	// IsAnonymous Optional. True, if the poll needs to be anonymous, defaults to True
	IsAnonymous bool `json:"is_anonymous,omitempty"`
	// Type Optional. Poll type, “quiz” or “regular”, defaults to “regular”
	Type PollType `json:"type"`
	// AllowsMultipleAnswers Optional. Pass True if the poll allows multiple answers, defaults to False
	AllowsMultipleAnswers bool `json:"allows_multiple_answers,omitempty"`
	// AllowsRevoting Optional. Pass True if the poll allows to change chosen answer options, defaults to False
	// for quizzes and to True for regular polls
	AllowsRevoting bool `json:"allows_revoting,omitempty"`
	// ShuffleOptions Optional. Pass True if the poll options must be shown in random order
	ShuffleOptions bool `json:"shuffle_options,omitempty"`
	// AllowAddingOptions Optional. Pass True if answer options can be added to the poll after creation; not
	// supported for anonymous polls and quizzes
	AllowAddingOptions bool `json:"allow_adding_options,omitempty"`
	// HideResultsUntilCloses Optional. Pass True if poll results must be shown only after the poll closes
	HideResultsUntilCloses bool `json:"hide_results_until_closes,omitempty"`
	// MembersOnly Optional. Pass True if voting is limited to users who have been members of the chat where the
	// poll is being sent for more than 24 hours; for channel chats only
	MembersOnly bool `json:"members_only,omitempty"` // Since: Bot API 10.0
	// CountryCodes Optional. A JSON-serialized list of 0-12 two-letter ISO 3166-1 alpha-2 country codes
	// indicating the countries from which users can vote in the poll; for channel chats only. Use “FT” as a
	// country code to allow users with anonymous numbers to vote. If omitted or empty, then users from any
	// country can participate in the poll.
	CountryCodes []string `json:"country_codes,omitempty"` // Since: Bot API 10.0
	// CorrectOptionIDs Optional. A JSON-serialized list of monotonically increasing 0-based identifiers of the
	// correct answer options, required for polls in quiz mode
	CorrectOptionIDs []int `json:"correct_option_ids,omitempty"`
	// Explanation Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon
	// in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
	Explanation string `json:"explanation,omitempty"`
	// ExplanationParseMode Optional. Mode for parsing entities in the explanation. See formatting options for
	// more details.
	ExplanationParseMode ParseMode `json:"explanation_parse_mode,omitempty"`
	// ExplanationEntities Optional. A JSON-serialized list of special entities that appear in the poll
	// explanation. It can be specified instead of explanation_parse_mode.
	ExplanationEntities []MessageEntity `json:"explanation_entities,omitempty"`
	// ExplanationMedia Optional. Media added to the quiz explanation
	ExplanationMedia *InputPollMedia `json:"explanation_media,omitempty"`
	// Media Optional. Media added to the poll description
	Media *InputPollMedia `json:"media,omitempty"`
	// OpenPeriod Optional. Amount of time in seconds the poll will be active after creation, 5-2628000. Can't
	// be used together with close_date.
	OpenPeriod int `json:"open_period,omitempty"`
	// CloseDate Optional. Point in time (Unix timestamp) when the poll will be automatically closed. Must be at
	// least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.
	CloseDate int `json:"close_date"`
	// IsClosed Optional. Pass True if the poll needs to be immediately closed. This can be useful for poll
	// preview.
	IsClosed bool `json:"is_closed,omitempty"`

	// Description Optional. Description of the poll to be sent, 0-1024 characters after entities parsing
	Description string `json:"description"`
	// DescriptionParseMode Optional. Mode for parsing entities in the poll description. See formatting options
	// for more details.
	DescriptionParseMode ParseMode `json:"description_parse_mode,omitempty"`
	// DescriptionEntities Optional. A JSON-serialized list of special entities that appear in the poll
	// description, which can be specified instead of description_parse_mode
	DescriptionEntities []MessageEntity `json:"description_entities,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendPoll holds parameters for the sendPoll method. Since: Bot API 4.2 See https://core.telegram.org/bots/api#sendpoll

type SendRichMessage added in v1.1.0

type SendRichMessage struct {
	// BusinessConnectionID identifies the business connection used to send the message.
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID identifies the target chat.
	ChatID int64 `json:"chat_id"`
	// MessageThreadID identifies the target message thread.
	MessageThreadID int64 `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID identifies the target direct-messages topic.
	DirectMessagesTopicID int64 `json:"direct_messages_topic_id,omitempty"`

	// RichMessage contains structured rich-message content.
	RichMessage InputRichMessage `json:"rich_message"`
	// DisableNotification requests delivery without a notification sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent prevents forwarding and saving the sent content.
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast permits high-throughput delivery using paid broadcast capacity.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID identifies the message effect to apply.
	MessageEffectID string `json:"message_effect_id,omitempty"`
	// SuggestedPostParameters contains parameters for a suggested channel post.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters describes the message being replied to.
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup defines the message's inline keyboard.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendRichMessage holds parameters for the sendRichMessage method. Since: Bot API 10.1 See https://core.telegram.org/bots/api#sendrichmessage

type SendRichMessageDraft added in v1.1.0

type SendRichMessageDraft struct {
	// ChatID identifies the target chat.
	ChatID int64 `json:"chat_id"`
	// MessageThreadID identifies the target message thread.
	MessageThreadID int64 `json:"message_thread_id,omitempty"`

	// DraftID must be non-zero; changes to drafts with the same identifier are animated.
	DraftID int64 `json:"draft_id"`
	// RichMessage contains structured rich-message content.
	RichMessage InputRichMessage `json:"rich_message"`
}

SendRichMessageDraft holds parameters for the sendRichMessageDraft method. Since: Bot API 10.1 See https://core.telegram.org/bots/api#sendrichmessagedraft

type SendSticker

type SendSticker struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Sticker Required. Sticker to send. Pass a file_id as String to send a file that exists on the Telegram
	// servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the
	// Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. More information on
	// Sending Files ». Video and animated stickers can't be sent via an HTTP URL.
	Sticker string `json:"sticker"`
	// Emoji Optional. Emoji associated with the sticker; only for just uploaded stickers
	Emoji string `json:"emoji,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendSticker holds parameters for the sendSticker method. Since: Bot API 1.3 See https://core.telegram.org/bots/api#sendsticker

type SendVenue

type SendVenue struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Latitude Required. Latitude of the venue
	Latitude float64 `json:"latitude"`
	// Longitude Required. Longitude of the venue
	Longitude float64 `json:"longitude"`
	// Title Required. Name of the venue
	Title string `json:"title"`
	// Address Required. Address of the venue
	Address string `json:"address"`
	// FoursquareID Optional. Foursquare identifier of the venue
	FoursquareID string `json:"foursquare_id,omitempty"`
	// FoursquareType Optional. Foursquare type of the venue, if known. (For example,
	// “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
	FoursquareType string `json:"foursquare_type,omitempty"`
	// GooglePlaceID Optional. Google Places identifier of the venue
	GooglePlaceID string `json:"google_place_id,omitempty"`
	// GooglePlaceType Optional. Google Places type of the venue. (See supported types.)
	GooglePlaceType string `json:"google_place_type,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendVenue holds parameters for the sendVenue method. Since: Bot API 2.0 See https://core.telegram.org/bots/api#sendvenue

type SendVideo

type SendVideo struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Video Required. Video to send. Pass a file_id as String to send a video that exists on the Telegram
	// servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or
	// upload a new video using multipart/form-data. More information on Sending Files »
	Video string `json:"video"`
	// Thumbnail Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data.
	// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass
	// “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. More information on Sending Files »
	Thumbnail string `json:"thumbnail,omitempty"`
	// Duration Optional. Duration of sent video in seconds
	Duration int `json:"duration,omitempty"`
	// Width Optional. Video width
	Width int `json:"width,omitempty"`
	// Height Optional. Video height
	Height int `json:"height,omitempty"`
	// Cover Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the
	// Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name>
	// name. More information on Sending Files »
	Cover string `json:"cover,omitempty"`

	// StartTimestamp Optional. Start timestamp for the video in the message
	StartTimestamp int `json:"start_timestamp,omitempty"`
	// Caption Optional. Video caption (may also be used when resending videos by file_id), 0-1024 characters
	// after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the video caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the video needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// SupportsStreaming Optional. Pass True if the uploaded video is suitable for streaming
	SupportsStreaming bool `json:"supports_streaming,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendVideo holds parameters for the sendVideo method. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendvideo

type SendVideoNote

type SendVideoNote struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// VideoNote Required. Video note to send. Pass a file_id as String to send a video note that exists on the
	// Telegram servers (recommended) or upload a new video using multipart/form-data. More information on
	// Sending Files ». Sending video notes by a URL is currently unsupported.
	VideoNote string `json:"video_note"`
	// Thumbnail Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data.
	// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass
	// “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. More information on Sending Files »
	Thumbnail string `json:"thumbnail,omitempty"`
	// Duration Optional. Duration of sent video in seconds
	Duration int `json:"duration,omitempty"`
	// Length Optional. Video width and height, i.e. diameter of the video message
	Length int `json:"length,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendVideoNote holds parameters for the sendVideoNote method. Since: Bot API 3.0 See https://core.telegram.org/bots/api#sendvideonote

type SendVoice

type SendVoice struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Voice Required. Audio file to send. Pass a file_id as String to send a file that exists on the Telegram
	// servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or
	// upload a new one using multipart/form-data. More information on Sending Files »
	Voice string `json:"voice"`
	// Caption Optional. Voice message caption, 0-1024 characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the voice message caption. See formatting options for
	// more details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// Duration Optional. Duration of the voice message in seconds
	Duration int `json:"duration,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

SendVoice holds parameters for the sendVoice method. Since: Bot API 1.2 See https://core.telegram.org/bots/api#sendvoice

type SentGuestMessage

type SentGuestMessage struct {
	// InlineMessageID Identifier of the sent inline message
	InlineMessageID string `json:"inline_message_id"`
}

SentGuestMessage describes an inline message sent by a guest bot. Since: Bot API 10.0

type SentWebAppMessage

type SentWebAppMessage struct {
	// InlineMessageID Optional. Identifier of the sent inline message. Available only if there is an inline
	// keyboard attached to the message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
}

SentWebAppMessage describes an inline message sent by a Web App on behalf of a user. Since: Bot API 8.0 See https://core.telegram.org/bots/api#sentwebappmessage

type SetBusinessAccountBio

type SetBusinessAccountBio struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// Bio Optional. The new value of the bio for the business account; 0-140 characters
	Bio string `json:"bio,omitempty"`
}

SetBusinessAccountBio holds parameters for the setBusinessAccountBio method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#setbusinessaccountbio

type SetBusinessAccountGiftSettings

type SetBusinessAccountGiftSettings struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// ShowGiftButton Required. Pass True if a button for sending a gift to the user or by the business account
	// must always be shown in the input field
	ShowGiftButton bool `json:"show_gift_button"`
	// AcceptedGiftTypes Required. Types of gifts accepted by the business account
	AcceptedGiftTypes AcceptedGiftTypes `json:"accepted_gift_types"`
}

SetBusinessAccountGiftSettings holds parameters for the setBusinessAccountGiftSettings method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#setbusinessaccountgiftsettings

type SetBusinessAccountName

type SetBusinessAccountName struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// FirstName Required. The new value of the first name for the business account; 1-64 characters
	FirstName string `json:"first_name"`
	// LastName Optional. The new value of the last name for the business account; 0-64 characters
	LastName string `json:"last_name,omitempty"`
}

SetBusinessAccountName holds parameters for the setBusinessAccountName method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#setbusinessaccountname

type SetBusinessAccountProfilePhoto

type SetBusinessAccountProfilePhoto struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// Photo Required. The new profile photo to set
	Photo InputProfilePhoto `json:"photo,omitempty"`
	// IsPublic Optional. Pass True to set the public photo, which will be visible even if the main photo is
	// hidden by the business account's privacy settings. An account can have only one public photo.
	IsPublic bool `json:"is_public,omitempty"`
}

SetBusinessAccountProfilePhoto holds parameters for the setBusinessAccountProfilePhoto method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#setbusinessaccountprofilephoto

type SetBusinessAccountUsername

type SetBusinessAccountUsername struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// Username Optional. The new value of the username for the business account; 0-32 characters
	Username string `json:"username,omitempty"`
}

SetBusinessAccountUsername holds parameters for the setBusinessAccountUsername method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#setbusinessaccountusername

type SetChatAdministratorCustomTitle

type SetChatAdministratorCustomTitle struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// CustomTitle Required. New custom title for the administrator; 0-16 characters, emoji are not allowed
	CustomTitle string `json:"custom_title"`
}

SetChatAdministratorCustomTitle holds parameters for the setChatAdministratorCustomTitle method. Since: Bot API 5.0 See https://core.telegram.org/bots/api#setchatadministratorcustomtitle

type SetChatDescription

type SetChatDescription struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// Description Optional. New chat description, 0-255 characters
	Description string `json:"description"`
}

SetChatDescription holds parameters for the setChatDescription method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#setchatdescription

type SetChatMemberTag

type SetChatMemberTag struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// Tag Optional. New tag for the member; 0-16 characters, emoji are not allowed
	Tag string `json:"tag,omitempty"`
}

SetChatMemberTag holds parameters for the setChatMemberTag method. Since: Bot API 9.5 See https://core.telegram.org/bots/api#setchatmembertag

type SetChatMenuButton

type SetChatMenuButton struct {
	// ChatID Optional. Unique identifier for the target private chat. If not specified, the bot's default menu
	// button will be changed.
	ChatID int64 `json:"chat_id,omitempty"`
	// MenuButton Optional. A JSON-serialized object for the bot's new menu button. Defaults to
	// MenuButtonDefault.
	MenuButton *MenuButton `json:"menu_button,omitempty"`
}

SetChatMenuButton holds parameters for the setChatMenuButton method. Since: Bot API 6.0 See https://core.telegram.org/bots/api#setchatmenubutton

type SetChatPermissions

type SetChatPermissions struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// Permissions Required. A JSON-serialized object for new default chat permissions
	Permissions ChatPermissions `json:"permissions"`
	// UseIndependentChatPermissions Optional. Pass True if chat permissions are set independently. Otherwise,
	// the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
	// can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and
	// can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages
	// permission.
	UseIndependentChatPermissions bool `json:"use_independent_chat_permissions,omitempty"`
}

SetChatPermissions holds parameters for the setChatPermissions method. Since: Bot API 4.4 See https://core.telegram.org/bots/api#setchatpermissions

type SetChatPhoto

type SetChatPhoto struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
}

SetChatPhoto holds parameters for the setChatPhoto method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#setchatphoto

type SetChatStickerSet

type SetChatStickerSet struct {
	// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// StickerSetName Required. Name of the sticker set to be set as the group sticker set
	StickerSetName string `json:"sticker_set_name"`
}

SetChatStickerSet holds parameters for the setChatStickerSet method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#setchatstickerset

type SetChatTitle

type SetChatTitle struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// Title Required. New chat title, 1-128 characters
	Title string `json:"title"`
}

SetChatTitle holds parameters for the setChatTitle method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#setchattitle

type SetCustomEmojiStickerSetThumbnail

type SetCustomEmojiStickerSetThumbnail struct {
	// Name Required. Sticker set name
	Name string `json:"name"`
	// CustomEmojiID Optional. Custom emoji identifier of a sticker from the sticker set; pass an empty string
	// to drop the thumbnail and use the first sticker as the thumbnail
	CustomEmojiID string `json:"custom_emoji_id,omitempty"`
}

SetCustomEmojiStickerSetThumbnail holds parameters for the setCustomEmojiStickerSetThumbnail method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail

type SetGameScore

type SetGameScore struct {
	// UserID Required. User identifier
	UserID int64 `json:"user_id"`
	// Score Required. New score, must be non-negative
	Score int `json:"score"`
	// Force Optional. Pass True if the high score is allowed to decrease. This can be useful when fixing
	// mistakes or banning cheaters.
	Force bool `json:"force,omitempty"`
	// DisableEditMessage Optional. Pass True if the game message should not be automatically edited to include
	// the current scoreboard
	DisableEditMessage bool `json:"disable_edit_message,omitempty"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the sent message.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
}

SetGameScore holds parameters for the setGameScore method. Since: Bot API 2.2 See https://core.telegram.org/bots/api#setgamescore

type SetManagedBotAccessSettings

type SetManagedBotAccessSettings struct {
	// BotUserID identifies the managed bot.
	BotUserID int64 `json:"bot_user_id"`
	// AccessSettings contains the access settings to apply to the managed bot.
	AccessSettings BotAccessSettings `json:"access_settings"`
}

SetManagedBotAccessSettings holds parameters for the setManagedBotAccessSettings method. Since: Bot API 10.0 See https://core.telegram.org/bots/api#setmanagedbotaccesssettings

type SetMessageReaction

type SetMessageReaction struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Identifier of the target message. If the message belongs to a media group, the
	// reaction is set to the first non-deleted message in the group instead.
	MessageID int `json:"message_id"`
	// Reaction Optional. A JSON-serialized list of reaction types to set on the message. Currently, as
	// non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it
	// is either already present on the message or explicitly allowed by chat administrators. Paid reactions
	// can't be used by bots.
	Reaction []ReactionType `json:"reaction"`
	// IsBig Optional. Pass True to set the reaction with a big animation
	IsBig bool `json:"is_big,omitempty"`
}

SetMessageReaction holds parameters for the setMessageReaction method. Since: Bot API 7.0 See https://core.telegram.org/bots/api#setmessagereaction

type SetMyCommands

type SetMyCommands struct {
	// Commands Required. A JSON-serialized list of bot commands to be set as the list of the bot's commands. At
	// most 100 commands can be specified.
	Commands []BotCommand `json:"commands"`
	// Scope Optional. A JSON-serialized object, describing scope of users for which the commands are relevant.
	// Defaults to BotCommandScopeDefault.
	Scope *BotCommandScope `json:"scope,omitempty"`
	// Language Optional. A two-letter ISO 639-1 language code. If empty, commands will be applied to all users
	// from the given scope, for whose language there are no dedicated commands.
	Language string `json:"language_code,omitempty"`
}

SetMyCommands holds parameters for the setMyCommands method. Since: Bot API 4.7 See https://core.telegram.org/bots/api#setmycommands

type SetMyDefaultAdministratorRights

type SetMyDefaultAdministratorRights struct {
	// Rights Optional. A JSON-serialized object describing new default administrator rights. If not specified,
	// the default administrator rights will be cleared.
	Rights *ChatAdministratorRights `json:"rights"`
	// ForChannels Optional. Pass True to change the default administrator rights of the bot in channels.
	// Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.
	ForChannels bool `json:"for_channels"`
}

SetMyDefaultAdministratorRights holds parameters for the setMyDefaultAdministratorRights method. Since: Bot API 6.0 See https://core.telegram.org/bots/api#setmydefaultadministratorrights

type SetMyDescription

type SetMyDescription struct {
	// Description Optional. New bot description; 0-512 characters. Pass an empty string to remove the dedicated
	// description for the given language.
	Description string `json:"description"`
	// Language Optional. A two-letter ISO 639-1 language code. If empty, the description will be applied to all
	// users for whose language there is no dedicated description.
	Language string `json:"language_code,omitempty"`
}

SetMyDescription holds parameters for the setMyDescription method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setmydescription

type SetMyName

type SetMyName struct {
	// Name Optional. New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the
	// given language.
	Name string `json:"name"`
	// Language Optional. A two-letter ISO 639-1 language code. If empty, the name will be shown to all users
	// for whose language there is no dedicated name.
	Language string `json:"language_code,omitempty"`
}

SetMyName holds parameters for the setMyName method. Since: Bot API 6.7 See https://core.telegram.org/bots/api#setmyname

type SetMyProfilePhoto

type SetMyProfilePhoto struct {
	// Photo Required. The new profile photo to set
	Photo InputProfilePhoto `json:"photo"`
}

SetMyProfilePhoto holds parameters for the setMyProfilePhoto method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#setmyprofilephoto

type SetMyShortDescription

type SetMyShortDescription struct {
	// ShortDescription Optional. New short description for the bot; 0-120 characters. Pass an empty string to
	// remove the dedicated short description for the given language.
	ShortDescription string `json:"short_description,omitempty"`
	// Language Optional. A two-letter ISO 639-1 language code. If empty, the short description will be applied
	// to all users for whose language there is no dedicated short description.
	Language string `json:"language_code,omitempty"`
}

SetMyShortDescription holds parameters for the setMyShortDescription method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setmyshortdescription

type SetPassportDataErrors

type SetPassportDataErrors struct {
	// UserID Required. User identifier
	UserID int64 `json:"user_id"`
	// Errors Required. A JSON-serialized Array describing the errors
	Errors []PassportElementError `json:"errors"`
}

SetPassportDataErrors holds parameters for the setPassportDataErrors method. Since: Bot API 4.0 See https://core.telegram.org/bots/api#setpassportdataerrors

type SetStickerEmojiList

type SetStickerEmojiList struct {
	// Sticker Required. File identifier of the sticker
	Sticker string `json:"sticker"`
	// EmojiList Required. A JSON-serialized list of 1-20 emoji associated with the sticker
	EmojiList []string `json:"emoji_list"`
}

SetStickerEmojiList holds parameters for the setStickerEmojiList method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setstickeremojilist

type SetStickerKeywords

type SetStickerKeywords struct {
	// Sticker Required. File identifier of the sticker
	Sticker string `json:"sticker"`
	// Keywords Optional. A JSON-serialized list of 0-20 search keywords for the sticker with total length of up
	// to 64 characters
	Keywords []string `json:"keywords"`
}

SetStickerKeywords holds parameters for the setStickerKeywords method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setstickerkeywords

type SetStickerMaskPosition

type SetStickerMaskPosition struct {
	// Sticker Required. File identifier of the sticker
	Sticker string `json:"sticker"`
	// MaskPosition Optional. A JSON-serialized object with the position where the mask should be placed on
	// faces. Omit the parameter to remove the mask position.
	MaskPosition *MaskPosition `json:"mask_position,omitempty"`
}

SetStickerMaskPosition holds parameters for the setStickerMaskPosition method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setstickermaskposition

type SetStickerPositionInSet

type SetStickerPositionInSet struct {
	// Sticker Required. File identifier of the sticker
	Sticker string `json:"sticker"`
	// Position Required. New sticker position in the set, zero-based
	Position int `json:"position"`
}

SetStickerPositionInSet holds parameters for the setStickerPositionInSet method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#setstickerpositioninset

type SetStickerSetThumbnail

type SetStickerSetThumbnail struct {
	// Name Required. Sticker set name
	Name string `json:"name"`
	// UserID Required. User identifier of the sticker set owner
	UserID int64 `json:"user_id"`
	// Thumbnail Optional. A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and
	// have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size
	// (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical
	// requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see
	// https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a
	// file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a
	// String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More
	// information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP
	// URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
	Thumbnail string `json:"thumbnail"`
	// Format Required. Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image,
	// “animated” for a .TGS animation, or “video” for a .WEBM video
	Format InputStickerFormat `json:"format"`
}

SetStickerSetThumbnail holds parameters for the setStickerSetThumbnail method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setstickersetthumbnail

type SetStickerSetTitle

type SetStickerSetTitle struct {
	// Name Required. Sticker set name
	Name string `json:"name"`
	// Title Required. Sticker set title, 1-64 characters
	Title string `json:"title"`
}

SetStickerSetTitle holds parameters for the setStickerSetTitle method. Since: Bot API 6.6 See https://core.telegram.org/bots/api#setstickersettitle

type SetUserEmojiStatus

type SetUserEmojiStatus struct {
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// EmojiID Optional. Custom emoji identifier of the emoji status to set. Pass an empty string to remove the
	// status.
	EmojiID string `json:"emoji_status_custom_emoji_id,omitempty"`
	// ExpirationDate Optional. Expiration date of the emoji status, if any
	ExpirationDate int `json:"emoji_status_expiration_date,omitempty"`
}

SetUserEmojiStatus holds parameters for the SetUserEmojiStatus method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#setuseremojistatus

type SetWebhook

type SetWebhook struct {
	// URL Required. HTTPS URL to send updates to. Use an empty string to remove webhook integration.
	URL string `json:"url"`
	// IPAddress Optional. The fixed IP address which will be used to send webhook requests instead of the IP
	// address resolved through DNS
	IPAddress string `json:"ip_address,omitempty"`
	// MaxConnections Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for
	// update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and
	// higher values to increase your bot's throughput.
	MaxConnections int8 `json:"max_connections,omitempty"`
	// AllowedUpdates Optional. A JSON-serialized list of the update types you want your bot to receive. For
	// example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these
	// types. See Update for a complete list of available update types. Specify an empty list to receive all
	// update types except chat_member, message_reaction, and message_reaction_count (default). If not
	// specified, the previous setting will be used. Please note that this parameter doesn't affect updates
	// created before the call to the setWebhook, so unwanted updates may be received for a short period of
	// time.
	AllowedUpdates []UpdateType `json:"allowed_updates,omitempty"`
	// DropPendingUpdates Optional. Pass True to drop all pending updates
	DropPendingUpdates bool `json:"drop_pending_updates,omitempty"`
	// SecretToken Optional. A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in
	// every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header
	// is useful to ensure that the request comes from a webhook set by you.
	SecretToken string `json:"secret_token,omitempty"`
}

SetWebhook holds parameters for the setWebhook method. To upload a self-signed certificate, use Uploader.SetWebhook. See https://core.telegram.org/bots/api#setwebhook

type SharedUser

type SharedUser struct {
	// UserID Identifier of the shared user. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so 64-bit integers or double-precision float types are safe for storing these
	// identifiers. The bot may not have access to the user and could be unable to use this identifier, unless
	// the user is already known to the bot by some other means.
	UserID int64 `json:"user_id"`
	// FirstName Optional. First name of the user, if the name was requested by the bot
	FirstName string `json:"first_name,omitempty"`
	// LastName Optional. Last name of the user, if the name was requested by the bot
	LastName string `json:"last_name,omitempty"`
	// Username Optional. Username of the user, if the username was requested by the bot
	Username string `json:"username,omitempty"`
	// Photo Optional. Available sizes of the chat photo, if the photo was requested by the bot
	Photo []PhotoSize `json:"photo,omitempty"`
}

SharedUser represents a user shared via a KeyboardButtonRequestUsers button. Since: Bot API 7.2

type ShippingAddress

type ShippingAddress struct {
	// CountryCode Two-letter ISO 3166-1 alpha-2 country code
	CountryCode string `json:"country_code"`
	// State State, if applicable
	State string `json:"state"`
	// City City
	City string `json:"city"`
	// StreetLine1 First line for the address
	StreetLine1 string `json:"street_line1"`
	// StreetLine2 Second line for the address
	StreetLine2 string `json:"street_line2"`
	// PostCode Address post code
	PostCode string `json:"post_code"`
}

ShippingAddress represents a shipping address. Since: Bot API 3.0 See https://core.telegram.org/bots/api#shippingaddress

type ShippingOption

type ShippingOption struct {
	// ID Shipping option identifier
	ID string `json:"id"`
	// Title Option title
	Title string `json:"title"`
	// Prices List of price portions
	Prices []LabeledPrice `json:"prices"`
}

ShippingOption represents one shipping option. Since: Bot API 3.0 See https://core.telegram.org/bots/api#shippingoption

type ShippingQuery

type ShippingQuery struct {
	// ID Unique query identifier
	ID string `json:"id"`
	// From User who sent the query
	From User `json:"from"`
	// InvoicePayload Bot-specified invoice payload
	InvoicePayload string `json:"invoice_payload"`
	// ShippingAddress User specified shipping address
	ShippingAddress ShippingAddress `json:"shipping_address"`
}

ShippingQuery represents an incoming shipping query. Since: Bot API 3.0 See https://core.telegram.org/bots/api#shippingquery

type StarAmount

type StarAmount struct {
	// Amount Integer amount of Telegram Stars, rounded to 0; can be negative
	Amount int `json:"amount"`
	// NanostarAmount Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to
	// 999999999; can be negative if and only if amount is non-positive
	NanostarAmount int `json:"nanostar_amount"`
}

StarAmount represents an amount of Telegram Stars. Since: Bot API 7.5

type StarTransaction

type StarTransaction struct {
	// ID Unique identifier of the transaction. Coincides with the identifier of the original transaction for
	// refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming
	// payments from users.
	ID string `json:"id"`
	// Amount Integer amount of Telegram Stars transferred by the transaction
	Amount int `json:"amount"`
	// NanostarAmount Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the
	// transaction; from 0 to 999999999
	NanostarAmount int `json:"nanostar_amount,omitempty"`
	// Date Date the transaction was created in Unix time
	Date int `json:"date"`
	// Source Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment
	// refunding a failed withdrawal). Only for incoming transactions.
	Source map[string]any `json:"source,omitempty"`
	// Receiver Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for
	// a withdrawal). Only for outgoing transactions.
	Receiver map[string]any `json:"receiver,omitempty"`
}

StarTransaction describes a Telegram Star transaction. Since: Bot API 7.5 See https://core.telegram.org/bots/api#startransaction

type StarTransactions

type StarTransactions struct {
	// Transactions The list of transactions
	Transactions []StarTransaction `json:"transactions"`
}

StarTransactions contains a list of Telegram Star transactions. Since: Bot API 7.5 See https://core.telegram.org/bots/api#startransactions

type Sticker

type Sticker struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Width Sticker width
	Width int `json:"width"`
	// Height Sticker height
	Height int `json:"height"`

	// Type Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the
	// sticker is independent from its format, which is determined by the fields is_animated and is_video.
	Type StickerType `json:"type"` // Since: Bot API 6.2
	// IsAnimated True, if the sticker is animated
	IsAnimated bool `json:"is_animated"` // Since: Bot API 4.4
	// IsVideo True, if the sticker is a video sticker
	IsVideo bool `json:"is_video"` // Since: Bot API 5.7
	// Thumbnail Optional. Sticker thumbnail in the .WEBP or .JPG format
	Thumbnail *PhotoSize `json:"thumbnail,omitempty"` // Since: Bot API 6.6
	// Emoji Optional. Emoji associated with the sticker
	Emoji *string `json:"emoji,omitempty"`
	// SetName Optional. Name of the sticker set to which the sticker belongs
	SetName *string `json:"set_name,omitempty"` // Since: Bot API 3.2
	// MaskPosition Optional. For mask stickers, the position where the mask should be placed
	MaskPosition *MaskPosition `json:"mask_position,omitempty"` // Since: Bot API 3.2
	// CustomEmojiID Optional. For custom emoji stickers, unique identifier of the custom emoji
	CustomEmojiID *string `json:"custom_emoji_id,omitempty"` // Since: Bot API 6.2
	// NeedRepainting reports whether Telegram must recolor the custom emoji sticker.
	NeedRepainting *bool `json:"need_repainting,omitempty"` // Since: Bot API 6.6
	// FileSize Optional. File size in bytes
	FileSize *int64 `json:"file_size,omitempty"`
}

Sticker represents a sticker. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sticker

type StickerSet

type StickerSet struct {
	// Name Sticker set name
	Name string `json:"name"`
	// Title Sticker set title
	Title string `json:"title"`
	// StickerType Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”
	StickerType StickerType `json:"sticker_type"`
	// Stickers List of all set stickers
	Stickers []Sticker `json:"stickers"`
	// Thumbnail Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format
	Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}

StickerSet represents a sticker set. Since: Bot API 3.2 See https://core.telegram.org/bots/api#stickerset

type StickerType

type StickerType string

StickerType represents the type of a sticker.

const (
	// StickerTypeRegular is a regular sticker.
	StickerTypeRegular StickerType = "regular"
	// StickerTypeMask is a mask sticker that can be placed on faces.
	StickerTypeMask StickerType = "mask"
	// StickerTypeCustomEmoji is a custom emoji sticker.
	StickerTypeCustomEmoji StickerType = "custom_emoji"
)

type StopMessageLiveLocation

type StopMessageLiveLocation struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message to be edited was sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or
	// username of the target bot, supergroup or channel in the format @username.
	ChatID int64 `json:"chat_id,omitempty"`
	// MessageID Optional. Required if inline_message_id is not specified. Identifier of the message with live
	// location to stop.
	MessageID int `json:"message_id,omitempty"`
	// InlineMessageID Optional. Required if chat_id and message_id are not specified. Identifier of the inline
	// message.
	InlineMessageID string `json:"inline_message_id,omitempty"`
	// ReplyMarkup Optional. A JSON-serialized object for a new inline keyboard
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

StopMessageLiveLocation holds parameters for the stopMessageLiveLocation method. Since: Bot API 3.4 See https://core.telegram.org/bots/api#stopmessagelivelocation

type StopPoll

type StopPoll struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message to be edited was sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageID Required. Identifier of the original message with the poll
	MessageID int `json:"message_id"`
	// ReplyMarkup Optional. A JSON-serialized object for a new message inline keyboard
	ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

StopPoll holds parameters for the stopPoll method. Since: Bot API 4.2 See https://core.telegram.org/bots/api#stoppoll

type Story

type Story struct {
	// Chat Chat that posted the story
	Chat Chat `json:"chat"`
	// ID Unique identifier for the story in the chat
	ID int `json:"id"`
}

Story represents a story. Since: Bot API 6.8

type StoryArea

type StoryArea struct {
	// Position Position of the area
	Position StoryAreaPosition `json:"position"`
	// Type Type of the area
	Type StoryAreaType `json:"type"`
}

StoryArea represents a clickable area on a story. Since: Bot API 9.0 See https://core.telegram.org/bots/api#storyarea

type StoryAreaPosition

type StoryAreaPosition struct {
	// XPercentage The abscissa of the area's center, as a percentage of the media width
	XPercentage float64 `json:"x_percentage"`
	// YPercentage The ordinate of the area's center, as a percentage of the media height
	YPercentage float64 `json:"y_percentage"`
	// WidthPercentage The width of the area's rectangle, as a percentage of the media width
	WidthPercentage float64 `json:"width_percentage"`
	// HeightPercentage The height of the area's rectangle, as a percentage of the media height
	HeightPercentage float64 `json:"height_percentage"`
	// RotationAngle The clockwise rotation angle of the rectangle, in degrees; 0-360
	RotationAngle float64 `json:"rotation_angle"`
	// CornerRadiusPercentage The radius of the rectangle corner rounding, as a percentage of the media width
	CornerRadiusPercentage float64 `json:"corner_radius_percentage"`
}

StoryAreaPosition describes the position of a clickable area on a story. Since: Bot API 9.0 See https://core.telegram.org/bots/api#storyareaposition

type StoryAreaType

type StoryAreaType struct {
	// Type identifies the concrete story-area variant.
	Type StoryAreaTypeType `json:"type"`

	// Latitude Location latitude in degrees
	// Location
	Latitude *float64 `json:"latitude,omitempty"`
	// Longitude Location longitude in degrees
	Longitude *float64 `json:"longitude,omitempty"`
	// Address Optional. Address of the location
	Address *LocationAddress `json:"address,omitempty"`

	// ReactionType Type of the reaction
	// Suggested reaction
	ReactionType *ReactionType `json:"reaction_type,omitempty"`
	// IsDark Optional. Pass True if the reaction area has a dark background
	IsDark *bool `json:"is_dark,omitempty"`
	// IsFlipped Optional. Pass True if reaction area corner is flipped
	IsFlipped *bool `json:"is_flipped,omitempty"`

	// URL HTTP or tg:// URL to be opened when the area is clicked
	// Link
	URL *string `json:"url,omitempty"`

	// Temperature Temperature, in degree Celsius
	// Weather
	Temperature *float64 `json:"temperature,omitempty"`
	// Emoji Emoji representing the weather
	Emoji *string `json:"emoji,omitempty"`
	// BackgroundColor A color of the area background in the ARGB format
	BackgroundColor *int `json:"background_color,omitempty"`

	// Name Unique name of the gift
	// Unique gift
	Name *string `json:"name,omitempty"`
}

StoryAreaType describes the type of a clickable area on a story. Since: Bot API 9.0 See https://core.telegram.org/bots/api#storyareatype

type StoryAreaTypeType

type StoryAreaTypeType string

StoryAreaTypeType indicates the type of story area.

const (
	// StoryAreaTypeLocationType identifies a location story area.
	StoryAreaTypeLocationType StoryAreaTypeType = "location"
	// StoryAreaTypeReactionType identifies a suggested reaction story area.
	StoryAreaTypeReactionType StoryAreaTypeType = "suggested_reaction"
	// StoryAreaTypeLinkType identifies a link story area.
	StoryAreaTypeLinkType StoryAreaTypeType = "link"
	// StoryAreaTypeWeatherType identifies a weather story area.
	StoryAreaTypeWeatherType StoryAreaTypeType = "weather"
	// StoryAreaTypeUniqueGiftType identifies a unique gift story area.
	StoryAreaTypeUniqueGiftType StoryAreaTypeType = "unique_gift"
)

type SuccessfulPayment

type SuccessfulPayment struct {
	// Currency Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars
	Currency string `json:"currency"`
	// TotalAmount Total price in the smallest units of the currency (integer, not float/double). For example,
	// for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number
	// of digits past the decimal point for each currency (2 for the majority of currencies).
	TotalAmount int `json:"total_amount"`
	// InvoicePayload Bot-specified invoice payload
	InvoicePayload string `json:"invoice_payload"`

	// SubscriptionExpirationDate Optional. Expiration date of the subscription, in Unix time; for recurring
	// payments only
	SubscriptionExpirationDate int `json:"subscription_expiration_date,omitempty"` // Since: Bot API 8.0
	// IsRecurring Optional. True, if the payment is a recurring payment for a subscription
	IsRecurring bool `json:"is_recurring,omitempty"` // Since: Bot API 8.0
	// IsFirstRecurring Optional. True, if the payment is the first payment for a subscription
	IsFirstRecurring bool `json:"is_first_recurring,omitempty"` // Since: Bot API 8.0
	// ShippingOptionID Optional. Identifier of the shipping option chosen by the user
	ShippingOptionID string `json:"shipping_option_id,omitempty"`
	// OrderInfo Optional. Order information provided by the user
	OrderInfo *OrderInfo `json:"order_info,omitempty"`

	// TelegramPaymentChargeID Telegram payment identifier
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
	// ProviderPaymentChargeID Provider payment identifier
	ProviderPaymentChargeID string `json:"provider_payment_charge_id"`
}

SuccessfulPayment contains basic information about a successful payment. Since: Bot API 3.0

type SuggestedPostApprovalFailed

type SuggestedPostApprovalFailed struct {
	// SuggestedPostMessage Optional. Message containing the suggested post whose approval has failed. Note that
	// the Message object in this field will not contain the reply_to_message field even if it itself is a
	// reply.
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	// Price Expected price of the post
	Price SuggestedPostPrice `json:"price"`
}

SuggestedPostApprovalFailed is a service message about a failed suggested post approval. Since: Bot API 9.1

type SuggestedPostApproved

type SuggestedPostApproved struct {
	// SuggestedPostMessage Optional. Message containing the suggested post. Note that the Message object in
	// this field will not contain the reply_to_message field even if it itself is a reply.
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	// Price Optional. Amount paid for the post
	Price SuggestedPostPrice `json:"price"`
	// SendDate Date when the post will be published
	SendDate int `json:"send_date"`
}

SuggestedPostApproved is a service message about an approved suggested post. Since: Bot API 9.1

type SuggestedPostDeclined

type SuggestedPostDeclined struct {
	// SuggestedPostMessage Optional. Message containing the suggested post. Note that the Message object in
	// this field will not contain the reply_to_message field even if it itself is a reply.
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	// Comment Optional. Comment with which the post was declined
	Comment string `json:"comment,omitempty"`
}

SuggestedPostDeclined is a service message about a declined suggested post. Since: Bot API 9.1

type SuggestedPostInfo

type SuggestedPostInfo struct {
	// State State of the suggested post. Currently, it can be one of “pending”, “approved”,
	// “declined”.
	State string `json:"state"` // "pending", "approved", or "declined"
	// Price Optional. Proposed price of the post. If the field is omitted, then the post is unpaid.
	Price SuggestedPostPrice `json:"price"`
	// SendDate Optional. Proposed send date of the post. If the field is omitted, then the post can be
	// published at any time within 30 days at the sole discretion of the user or administrator who approves it.
	SendDate int `json:"send_date"`
}

SuggestedPostInfo contains information about a suggested post. Since: Bot API 9.1 See https://core.telegram.org/bots/api#suggestedpostinfo

type SuggestedPostPaid

type SuggestedPostPaid struct {
	// SuggestedPostMessage Optional. Message containing the suggested post. Note that the Message object in
	// this field will not contain the reply_to_message field even if it itself is a reply.
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	// Currency Currency in which the payment was made. Currently, one of “XTR” for Telegram Stars or
	// “TON” for TON grams.
	Currency string `json:"currency"`
	// Amount Optional. The amount of the currency that was received by the channel in nanograms; for payments
	// in TON grams only
	Amount int `json:"amount"`
	// StarAmount Optional. The amount of Telegram Stars that was received by the channel; for payments in
	// Telegram Stars only
	StarAmount *StarAmount `json:"star_amount,omitempty"`
}

SuggestedPostPaid is a service message about a paid suggested post. Since: Bot API 9.1

type SuggestedPostParameters

type SuggestedPostParameters struct {
	// Price Optional. Proposed price for the post. If the field is omitted, then the post is unpaid.
	Price SuggestedPostPrice `json:"price"`
	// SendDate Optional. Proposed send date of the post. If specified, then the date must be between 300 second
	// and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at
	// any time within 30 days at the sole discretion of the user who approves it.
	SendDate int `json:"send_date"`
}

SuggestedPostParameters holds parameters for suggesting a post. Since: Bot API 9.2

type SuggestedPostPrice

type SuggestedPostPrice struct {
	// Currency Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars
	// or “TON” for TON grams.
	Currency string `json:"currency"`
	// Amount The amount of the currency that will be paid for the post in the smallest units of the currency,
	// i.e. Telegram Stars or nanograms. Currently, price in Telegram Stars must be between 5 and 100000, and
	// price in nanograms must be between 10000000 and 10000000000000.
	Amount int `json:"amount"`
}

SuggestedPostPrice represents the price of a suggested post. Since: Bot API 9.1

type SuggestedPostRefunded

type SuggestedPostRefunded struct {
	// SuggestedPostMessage Optional. Message containing the suggested post. Note that the Message object in
	// this field will not contain the reply_to_message field even if it itself is a reply.
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	// Reason Reason for the refund. Currently, one of “post_deleted” if the post was deleted within 24
	// hours of being posted or removed from scheduled messages without being posted, or “payment_refunded”
	// if the payer refunded their payment.
	Reason string `json:"reason,omitempty"`
}

SuggestedPostRefunded is a service message about a refunded suggested post. Since: Bot API 9.1

type TelegramRequest

type TelegramRequest[R, P any] struct {
	// contains filtered or unexported fields
}

TelegramRequest is a low-level Telegram API request wrapper.

Prefer method-specific helpers such as SendMessage or GetUpdates. TelegramRequest bypasses method-specific parameter types and convenience helpers, so callers are responsible for using the correct method name and compatible request and response types. In that sense it is an unsafe escape hatch compared with the typed API surface.

func NewRequest

func NewRequest[R, P any](method string, params P) TelegramRequest[R, P]

NewRequest creates a low-level TelegramRequest with no associated chat ID.

func NewRequestWithChatID

func NewRequestWithChatID[R, P any](method string, params P, chatID int64) TelegramRequest[R, P]

NewRequestWithChatID creates a low-level TelegramRequest with an associated chat ID. The chat ID is used for per-chat rate limiting.

func (TelegramRequest[R, P]) Do

func (r TelegramRequest[R, P]) Do(api *API) (R, error)

Do executes the request synchronously with a background context. Use only for simple, non-critical calls.

func (TelegramRequest[R, P]) DoWithContext

func (r TelegramRequest[R, P]) DoWithContext(ctx context.Context, api *API) (R, error)

DoWithContext executes the request asynchronously via the worker pool. Returns result or error via channel. Respects context cancellation.

type TelegramResponse

type TelegramResponse[R any] struct {
	// Ok reports whether the request succeeded.
	Ok bool `json:"ok"`
	// Description contains a human-readable result description when supplied by Telegram.
	Description string `json:"description,omitempty"`
	// Result contains the method-specific result for a successful response.
	Result R `json:"result,omitempty"`
	// ErrorCode is the Telegram API error code for an unsuccessful response.
	ErrorCode int `json:"error_code,omitempty"`
	// Parameters contains additional recovery metadata for an unsuccessful response.
	Parameters *ResponseParameters `json:"parameters,omitempty"`
}

TelegramResponse is the standard Telegram Bot API response structure. Generic over Result type R.

type TextQuote

type TextQuote struct {
	// Text Text of the quoted part of a message that is replied to by the given message
	Text string `json:"text"`
	// Entities Optional. Special entities that appear in the quote. Currently, only bold, italic, underline,
	// strikethrough, spoiler, custom_emoji, and date_time entities are kept in quotes.
	Entities []MessageEntity `json:"entities"`
	// Position Approximate quote position in the original message in UTF-16 code units as specified by the
	// sender
	Position int `json:"position"`
	// IsManual Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was
	// added automatically by the server.
	IsManual bool `json:"is_manual,omitempty"`
}

TextQuote contains information about the quoted part of a message. Since: Bot API 7.0

type TransferBusinessAccountStars

type TransferBusinessAccountStars struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// StarCount Required. Number of Telegram Stars to transfer; 1-10000
	StarCount int `json:"star_count"`
}

TransferBusinessAccountStars holds parameters for the transferBusinessAccountStars method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#transferbusinessaccountstars

type TransferGift

type TransferGift struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// OwnedGiftID Required. Unique identifier of the regular gift that should be transferred
	OwnedGiftID string `json:"owned_gift_id"`
	// NewOwnerChatID Required. Unique identifier of the chat which will own the gift. The chat must be active
	// in the last 24 hours.
	NewOwnerChatID int64 `json:"new_owner_chat_id"`
	// StarCount Optional. The amount of Telegram Stars that will be paid for the transfer from the business
	// account balance. If positive, then the can_transfer_stars business bot right is required.
	StarCount int `json:"star_count,omitempty"`
}

TransferGift holds parameters for the transferGift method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#transfergift

type UnbanChatMember

type UnbanChatMember struct {
	// ChatID Required. Unique identifier for the target group or username of the target supergroup or channel
	// in the format @username
	ChatID int64 `json:"chat_id"`
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// OnlyIfBanned Optional. Do nothing if the user is not banned
	OnlyIfBanned bool `json:"only_if_banned"`
}

UnbanChatMember holds parameters for the unbanChatMember method. Since: Bot API 2.0 See https://core.telegram.org/bots/api#unbanchatmember

type UnbanChatSenderChat

type UnbanChatSenderChat struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// SenderChatID Required. Unique identifier of the target sender chat
	SenderChatID int64 `json:"sender_chat_id"`
}

UnbanChatSenderChat holds parameters for the unbanChatSenderChat method. Since: Bot API 5.6 See https://core.telegram.org/bots/api#unbanchatsenderchat

type UniqueGift

type UniqueGift struct {
	// GiftID Identifier of the regular gift from which the gift was upgraded
	GiftID string `json:"gift_id"`
	// BaseName Human-readable name of the regular gift from which this unique gift was upgraded
	BaseName string `json:"base_name"`
	// Name Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas.
	Name string `json:"name"`
	// Number Unique number of the upgraded gift among gifts upgraded from the same regular gift
	Number int `json:"number"`
	// Model Model of the gift
	Model UniqueGiftModel `json:"model"`
	// Symbol Symbol of the gift
	Symbol UniqueGiftSymbol `json:"symbol"`
	// Backdrop Backdrop of the gift
	Backdrop UniqueGiftBackdrop `json:"backdrop"`

	// IsPremium Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium
	// subscribers
	IsPremium bool `json:"is_premium,omitempty"`
	// IsBurned Optional. True, if the gift was used to craft another gift and isn't available anymore
	IsBurned bool `json:"is_burned,omitempty"`
	// IsFromBlockchain Optional. True, if the gift is assigned from the TON blockchain and can't be resold or
	// transferred in Telegram
	IsFromBlockchain bool `json:"is_from_blockchain,omitempty"`
	// Colors Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to
	// messages and link previews; for business account gifts and gifts that are currently on sale only
	Colors *UniqueGiftColors `json:"colors,omitempty"`
	// PublisherChat Optional. Information about the chat that published the gift
	PublisherChat *Chat `json:"publisher_chat,omitempty"`
}

UniqueGift represents a unique gift. Since: Bot API 9.0

type UniqueGiftBackdrop

type UniqueGiftBackdrop struct {
	// Name Name of the backdrop
	Name string `json:"name"`
	// Colors Colors of the backdrop
	Colors UniqueGiftBackdropColors `json:"colors"`
	// RarityPerMille The number of unique gifts that receive this backdrop for every 1000 gifts upgraded
	RarityPerMille int `json:"rarity_per_mille"`
}

UniqueGiftBackdrop describes the backdrop of a unique gift. Since: Bot API 9.0

type UniqueGiftBackdropColors

type UniqueGiftBackdropColors struct {
	// CenterColor The color in the center of the backdrop in RGB format
	CenterColor int `json:"center_color"`
	// EdgeColor The color on the edges of the backdrop in RGB format
	EdgeColor int `json:"edge_color"`
	// SymbolColor The color to be applied to the symbol in RGB format
	SymbolColor int `json:"symbol_color"`
	// TextColor The color for the text on the backdrop in RGB format
	TextColor int `json:"text_color"`
}

UniqueGiftBackdropColors describes the colors of a unique gift backdrop. Since: Bot API 9.0

type UniqueGiftColors

type UniqueGiftColors struct {
	// ModelCustomEmojiID Custom emoji identifier of the unique gift's model
	ModelCustomEmojiID string `json:"model_custom_emoji_id"`
	// SymbolCustomEmojiID Custom emoji identifier of the unique gift's symbol
	SymbolCustomEmojiID string `json:"symbol_custom_emoji_id"`
	// LightThemeMainColor Main color used in light themes; RGB format
	LightThemeMainColor int `json:"light_theme_main_color"`
	// LightThemeOtherColors List of 1-3 additional colors used in light themes; RGB format
	LightThemeOtherColors []int `json:"light_theme_other_colors"`
	// DarkThemeMainColor Main color used in dark themes; RGB format
	DarkThemeMainColor int `json:"dark_theme_main_color"`
	// DarkThemeOtherColors List of 1-3 additional colors used in dark themes; RGB format
	DarkThemeOtherColors []int `json:"dark_theme_other_colors"`
}

UniqueGiftColors represents color information for a unique gift. Since: Bot API 9.3

type UniqueGiftInfo

type UniqueGiftInfo struct {
	// Gift Information about the gift
	Gift UniqueGift `json:"gift"`
	// Origin Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts,
	// “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from
	// other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for
	// gifts bought or sold through gift purchase offers.
	Origin string `json:"origin"`
	// LastResaleCurrency Optional. For gifts bought from other users, the currency in which the payment for the
	// gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for TON grams.
	LastResaleCurrency string `json:"last_resale_currency,omitempty"`
	// LastResaleAmount Optional. For gifts bought from other users, the price paid for the gift in either
	// Telegram Stars or nanograms
	LastResaleAmount int `json:"last_resale_amount,omitempty"`
	// OwnedGiftID Optional. Unique identifier of the received gift for the bot; only present for gifts received
	// on behalf of business accounts
	OwnedGiftID string `json:"owned_gift_id,omitempty"`
	// TransferStarCount Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if
	// the bot cannot transfer the gift
	TransferStarCount int `json:"transfer_star_count,omitempty"`
	// NextTransferDate Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in
	// the past, then the gift can be transferred now.
	NextTransferDate int `json:"next_transfer_date,omitempty"`
}

UniqueGiftInfo contains information about a received unique gift. Since: Bot API 9.0

type UniqueGiftModel

type UniqueGiftModel struct {
	// Name Name of the model
	Name string `json:"name"`
	// Sticker The sticker that represents the unique gift
	Sticker Sticker `json:"sticker"`
	// RarityPerMille The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0
	// for crafted gifts.
	RarityPerMille int `json:"rarity_per_mille"`
	// Rarity Optional. Rarity of the model if it is a crafted model. Currently, can be “uncommon”,
	// “rare”, “epic”, or “legendary”.
	Rarity string `json:"rarity,omitempty"`
}

UniqueGiftModel describes the model component of a unique gift. Since: Bot API 9.0

type UniqueGiftSymbol

type UniqueGiftSymbol struct {
	// Name Name of the symbol
	Name string `json:"name"`
	// Sticker The sticker that represents the unique gift
	Sticker Sticker `json:"sticker"`
	// RarityPerMille The number of unique gifts that receive this model for every 1000 gifts upgraded
	RarityPerMille int `json:"rarity_per_mille"`
}

UniqueGiftSymbol describes the symbol component of a unique gift. Since: Bot API 9.0

type UnpinAllChatMessages

type UnpinAllChatMessages struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
}

UnpinAllChatMessages holds parameters for the unpinAllChatMessages method. Since: Bot API 5.0 See https://core.telegram.org/bots/api#unpinallchatmessages

type UnpinChatMessage

type UnpinChatMessage struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be unpinned
	BusinessConnectionID *string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
	// MessageID Optional. Identifier of the message to unpin. Required if business_connection_id is specified.
	// If not specified, the most recent pinned message (by sending date) will be unpinned.
	MessageID int `json:"message_id"`
}

UnpinChatMessage holds parameters for the unpinChatMessage method. Since: Bot API 3.1 See https://core.telegram.org/bots/api#unpinchatmessage

type Update

type Update struct {
	// Type is the locally derived update type and is not part of Telegram JSON.
	Type UpdateType `json:"-"`

	// UpdateID The update's unique identifier. Update identifiers start from a certain positive number and
	// increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows
	// you to ignore repeated updates or to restore the correct update sequence, should they get out of order.
	// If there are no new updates for at least a week, then identifier of the next update will be chosen
	// randomly instead of sequentially.
	UpdateID int `json:"update_id"`
	// Message Optional. New incoming message of any kind - text, photo, sticker, etc.
	Message *Message `json:"message,omitempty"`
	// EditedMessage Optional. New version of a message that is known to the bot and was edited. This update may
	// at times be triggered by changes to message fields that are either unavailable or not actively used by
	// your bot.
	EditedMessage *Message `json:"edited_message,omitempty"`
	// ChannelPost Optional. New incoming channel post of any kind - text, photo, sticker, etc.
	ChannelPost *Message `json:"channel_post,omitempty"` // Since: Bot API 2.3
	// EditedChannelPost Optional. New version of a channel post that is known to the bot and was edited. This
	// update may at times be triggered by changes to message fields that are either unavailable or not actively
	// used by your bot.
	EditedChannelPost *Message `json:"edited_channel_post,omitempty"` // Since: Bot API 2.3

	// BusinessConnection Optional. The bot was connected to or disconnected from a business account, or a user
	// edited an existing connection with the bot
	BusinessConnection *BusinessConnection `json:"business_connection,omitempty"` // Since: Bot API 7.2
	// BusinessMessage Optional. New message from a connected business account
	BusinessMessage *Message `json:"business_message,omitempty"` // Since: Bot API 7.2
	// EditedBusinessMessage Optional. New version of a message from a connected business account
	EditedBusinessMessage *Message `json:"edited_business_message,omitempty"` // Since: Bot API 7.2
	// DeletedBusinessMessages Optional. Messages were deleted from a connected business account
	DeletedBusinessMessages *BusinessMessagesDeleted `json:"deleted_business_messages,omitempty"` // Since: Bot API 7.2
	// GuestMessage Optional. New guest message. The bot can use the field Message.guest_query_id and the method
	// answerGuestQuery to send a message in response.
	GuestMessage *Message `json:"guest_message,omitempty"` // Since: Bot API 10.0
	// MessageReaction Optional. A reaction to a message was changed by a user. The bot must be an administrator
	// in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive
	// these updates. The update isn't received for reactions set by bots.
	MessageReaction *MessageReactionUpdated `json:"message_reaction,omitempty"` // Since: Bot API 7.0
	// MessageReactionCount Optional. Reactions to a message with anonymous reactions were changed. The bot must
	// be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of
	// allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few
	// minutes.
	MessageReactionCount *MessageReactionCountUpdated `json:"message_reaction_count,omitempty"` // Since: Bot API 7.0

	// InlineQuery Optional. New incoming inline query
	InlineQuery *InlineQuery `json:"inline_query,omitempty"` // Since: Bot API 1.7
	// ChosenInlineResult Optional. The result of an inline query that was chosen by a user and sent to their
	// chat partner. Please see our documentation on the feedback collecting for details on how to enable these
	// updates for your bot.
	ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"` // Since: Bot API 1.8
	// CallbackQuery Optional. New incoming callback query
	CallbackQuery *CallbackQuery `json:"callback_query,omitempty"` // Since: Bot API 2.0
	// ShippingQuery Optional. New incoming shipping query. Only for invoices with flexible price.
	ShippingQuery *ShippingQuery `json:"shipping_query,omitempty"` // Since: Bot API 3.0
	// PreCheckoutQuery Optional. New incoming pre-checkout query. Contains full information about checkout.
	PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query,omitempty"` // Since: Bot API 3.0
	// PurchasedPaidMedia Optional. A user purchased paid media with a non-empty payload sent by the bot in a
	// non-channel chat
	PurchasedPaidMedia *PaidMediaPurchased `json:"purchased_paid_media,omitempty"` // Since: Bot API 7.10

	// Poll Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which
	// are sent by the bot.
	Poll *Poll `json:"poll,omitempty"` // Since: Bot API 4.2
	// PollAnswer Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in
	// polls that were sent by the bot itself.
	PollAnswer *PollAnswer `json:"poll_answer,omitempty"` // Since: Bot API 4.6
	// MyChatMember Optional. The bot's chat member status was updated in a chat. For private chats, this update
	// is received only when the bot is blocked or unblocked by the user.
	MyChatMember *ChatMemberUpdated `json:"my_chat_member,omitempty"` // Since: Bot API 5.1
	// ChatMember Optional. A chat member's status was updated in a chat. The bot must be an administrator in
	// the chat and must explicitly specify "chat_member" in the list of allowed_updates to receive these
	// updates.
	ChatMember *ChatMemberUpdated `json:"chat_member,omitempty"` // Since: Bot API 5.1
	// ChatJoinRequest Optional. A request to join the chat has been sent. The bot must have the
	// can_invite_users administrator right in the chat to receive these updates.
	ChatJoinRequest *ChatJoinRequest `json:"chat_join_request,omitempty"` // Since: Bot API 5.4
	// ChatBoost Optional. A chat boost was added or changed. The bot must be an administrator in the chat to
	// receive these updates.
	ChatBoost *ChatBoostUpdated `json:"chat_boost,omitempty"` // Since: Bot API 7.0
	// RemovedChatBoost Optional. A boost was removed from a chat. The bot must be an administrator in the chat
	// to receive these updates.
	RemovedChatBoost *ChatBoostRemoved `json:"removed_chat_boost,omitempty"` // Since: Bot API 7.0

	// ManagedBot Optional. A new bot was created to be managed by the bot, or token or owner of a managed bot
	// was changed
	ManagedBot *ManagedBotUpdated `json:"managed_bot,omitempty"` // Since: Bot API 9.6
	// Subscription contains a bot subscription update.
	Subscription *BotSubscriptionUpdated `json:"subscription,omitempty"` // Since: Bot API 10.2
}

Update represents an incoming update from Telegram. Since: Bot API 1.0 See https://core.telegram.org/bots/api#update

func (*Update) UnmarshalJSON

func (u *Update) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes an update and derives its Type from the populated payload field.

type UpdateParams

type UpdateParams struct {
	// Offset Optional. Identifier of the first update to be returned. Must be greater by one than the highest
	// among the identifiers of previously received updates. By default, updates starting with the earliest
	// unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with
	// an offset higher than its update_id. The negative offset can be specified to retrieve updates starting
	// from -offset update from the end of the updates queue. All previous updates will be forgotten.
	Offset *int `json:"offset,omitempty"`
	// Limit Optional. Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults
	// to 100.
	Limit *int `json:"limit,omitempty"`
	// Timeout Optional. Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be
	// positive, short polling should be used for testing purposes only.
	Timeout *int `json:"timeout,omitempty"`
	// AllowedUpdates Optional. A JSON-serialized list of the update types you want your bot to receive. For
	// example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these
	// types. See Update for a complete list of available update types. Specify an empty list to receive all
	// update types except chat_member, message_reaction, and message_reaction_count (default). If not
	// specified, the previous setting will be used. Please note that this parameter doesn't affect updates
	// created before the call to getUpdates, so unwanted updates may be received for a short period of time.
	AllowedUpdates []UpdateType `json:"allowed_updates,omitempty"`
}

UpdateParams holds parameters for the getUpdates method. See https://core.telegram.org/bots/api#getupdates

type UpdateType

type UpdateType string

UpdateType represents the type of incoming update.

const (
	// UpdateTypeUnknown marks an update whose payload does not match a known Telegram update kind.
	UpdateTypeUnknown UpdateType = "unknown"

	// UpdateTypeMessage is a regular message update.
	UpdateTypeMessage UpdateType = "message"
	// UpdateTypeEditedMessage is an edited message update.
	UpdateTypeEditedMessage UpdateType = "edited_message"
	// UpdateTypeChannelPost is a channel post update.
	UpdateTypeChannelPost UpdateType = "channel_post"
	// UpdateTypeEditedChannelPost is an edited channel post update.
	UpdateTypeEditedChannelPost UpdateType = "edited_channel_post"
	// UpdateTypeMessageReaction is a message reaction update.
	UpdateTypeMessageReaction UpdateType = "message_reaction"
	// UpdateTypeMessageReactionCount is a message reaction count update.
	UpdateTypeMessageReactionCount UpdateType = "message_reaction_count"

	// UpdateTypeBusinessConnection is a business connection update.
	UpdateTypeBusinessConnection UpdateType = "business_connection"
	// UpdateTypeBusinessMessage is a business message update.
	UpdateTypeBusinessMessage UpdateType = "business_message"
	// UpdateTypeEditedBusinessMessage is an edited business message update.
	UpdateTypeEditedBusinessMessage UpdateType = "edited_business_message"
	// UpdateTypeDeletedBusinessMessages is a deleted business messages update.
	UpdateTypeDeletedBusinessMessages UpdateType = "deleted_business_messages"

	// UpdateTypeInlineQuery is an inline query update.
	UpdateTypeInlineQuery UpdateType = "inline_query"
	// UpdateTypeChosenInlineResult is a chosen inline result update.
	UpdateTypeChosenInlineResult UpdateType = "chosen_inline_result"
	// UpdateTypeCallbackQuery is a callback query update.
	UpdateTypeCallbackQuery UpdateType = "callback_query"
	// UpdateTypeShippingQuery is a shipping query update.
	UpdateTypeShippingQuery UpdateType = "shipping_query"
	// UpdateTypePreCheckoutQuery is a pre-checkout query update.
	UpdateTypePreCheckoutQuery UpdateType = "pre_checkout_query"
	// UpdateTypePurchasedPaidMedia is a purchased paid media update.
	UpdateTypePurchasedPaidMedia UpdateType = "purchased_paid_media"
	// UpdateTypePoll is a poll update.
	UpdateTypePoll UpdateType = "poll"
	// UpdateTypePollAnswer is a poll answer update.
	UpdateTypePollAnswer UpdateType = "poll_answer"
	// UpdateTypeMyChatMember is a my chat member update.
	UpdateTypeMyChatMember UpdateType = "my_chat_member"
	// UpdateTypeChatMember is a chat member update.
	UpdateTypeChatMember UpdateType = "chat_member"
	// UpdateTypeChatJoinRequest is a chat join request update.
	UpdateTypeChatJoinRequest UpdateType = "chat_join_request"
	// UpdateTypeChatBoost is a chat boost update.
	UpdateTypeChatBoost UpdateType = "chat_boost"
	// UpdateTypeRemovedChatBoost is a removed chat boost update.
	UpdateTypeRemovedChatBoost UpdateType = "removed_chat_boost"

	// UpdateTypeManagedBot is a managed bot update.
	UpdateTypeManagedBot UpdateType = "managed_bot"

	// UpdateTypeGuestMessage is a guest message update.
	UpdateTypeGuestMessage UpdateType = "guest_message"

	// UpdateTypeSubscription is a bot subscription update.
	//
	// Since: Bot API 10.2
	UpdateTypeSubscription UpdateType = "subscription"
)

type UpgradeGift

type UpgradeGift struct {
	// BusinessConnectionID Required. Unique identifier of the business connection
	BusinessConnectionID string `json:"business_connection_id"`
	// OwnedGiftID Required. Unique identifier of the regular gift that should be upgraded to a unique one
	OwnedGiftID string `json:"owned_gift_id"`
	// KeepOriginalDetails Optional. Pass True to keep the original gift text, sender and receiver in the
	// upgraded gift
	KeepOriginalDetails bool `json:"keep_original_details,omitempty"`
	// StarCount Optional. The amount of Telegram Stars that will be paid for the upgrade from the business
	// account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars
	// business bot right is required and gift.upgrade_star_count must be passed.
	StarCount int `json:"star_count,omitempty"`
}

UpgradeGift holds parameters for the upgradeGift method. Since: Bot API 9.0 See https://core.telegram.org/bots/api#upgradegift

type UploadAnimation

type UploadAnimation struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Duration Optional. Duration of sent animation in seconds
	Duration int `json:"duration,omitempty"`
	// Width Optional. Animation width
	Width int `json:"width,omitempty"`
	// Height Optional. Animation height
	Height int `json:"height,omitempty"`

	// Caption Optional. Animation caption (may also be used when resending animation by file_id), 0-1024
	// characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the animation caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the animation needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadAnimation holds parameters for uploading an animation using the Uploader. Since: Bot API 4.0 See https://core.telegram.org/bots/api#sendanimation

type UploadAudio

type UploadAudio struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Caption Optional. Audio caption, 0-1024 characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the audio caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// Duration Optional. Duration of the audio in seconds
	Duration int `json:"duration,omitempty"`
	// Performer Optional. Performer
	Performer string `json:"performer,omitempty"`
	// Title Optional. Track name
	Title string `json:"title,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadAudio holds parameters for uploading an audio file using the Uploader. Since: Bot API 1.2 See https://core.telegram.org/bots/api#sendaudio

type UploadChatPhoto

type UploadChatPhoto struct {
	// ChatID Required. Unique identifier for the target chat or username of the target channel in the format
	// @username
	ChatID int64 `json:"chat_id"`
}

UploadChatPhoto holds parameters for uploading a chat photo using the Uploader. Since: Bot API 3.1 See https://core.telegram.org/bots/api#setchatphoto

type UploadDocument

type UploadDocument struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Caption Optional. Document caption (may also be used when resending documents by file_id), 0-1024
	// characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the document caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// DisableContentTypeDetection Optional. Disables automatic server-side content type detection for files
	// uploaded using multipart/form-data
	DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadDocument holds parameters for uploading a document using the Uploader. Since: Bot API 1.0 See https://core.telegram.org/bots/api#senddocument

type UploadLivePhoto

type UploadLivePhoto struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target channel (in the format
	// @channelusername)
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`

	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2
	// Caption Optional. Video caption (may also be used when resending videos by file_id), 0-1024 characters
	// after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the video caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the video needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadLivePhoto holds parameters for uploading a live photo using the Uploader. Since: Bot API 10.0 See https://core.telegram.org/bots/api#sendlivephoto

type UploadPhoto

type UploadPhoto struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Caption Optional. Photo caption (may also be used when resending photos by file_id), 0-1024 characters
	// after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the photo caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the photo needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadPhoto holds parameters for uploading a photo using the Uploader. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendphoto

type UploadSetWebhook

type UploadSetWebhook struct {
	// URL Required. HTTPS URL to send updates to. Use an empty string to remove webhook integration.
	URL string `json:"url"`
	// IPAddress Optional. The fixed IP address which will be used to send webhook requests instead of the IP
	// address resolved through DNS
	IPAddress string `json:"ip_address,omitempty"`
	// MaxConnections Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for
	// update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and
	// higher values to increase your bot's throughput.
	MaxConnections int8 `json:"max_connections,omitempty"`
	// AllowedUpdates Optional. A JSON-serialized list of the update types you want your bot to receive. For
	// example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these
	// types. See Update for a complete list of available update types. Specify an empty list to receive all
	// update types except chat_member, message_reaction, and message_reaction_count (default). If not
	// specified, the previous setting will be used. Please note that this parameter doesn't affect updates
	// created before the call to the setWebhook, so unwanted updates may be received for a short period of
	// time.
	AllowedUpdates []UpdateType `json:"allowed_updates,omitempty"`
	// DropPendingUpdates Optional. Pass True to drop all pending updates
	DropPendingUpdates bool `json:"drop_pending_updates,omitempty"`
	// SecretToken Optional. A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in
	// every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header
	// is useful to ensure that the request comes from a webhook set by you.
	SecretToken string `json:"secret_token,omitempty"`
}

UploadSetWebhook holds multipart parameters for the setWebhook method. Since: Bot API 1.0 Use this type when uploading a self-signed certificate file. See https://core.telegram.org/bots/api#setwebhook

type UploadStickerFile

type UploadStickerFile struct {
	// UserID Required. User identifier of sticker file owner
	UserID int64 `json:"user_id"`
	// StickerFormat Required. Format of the sticker, must be one of “static”, “animated”, “video”
	StickerFormat InputStickerFormat `json:"sticker_format"`
}

UploadStickerFile holds parameters for the uploadStickerFile method. Since: Bot API 3.2 See https://core.telegram.org/bots/api#uploadstickerfile

type UploadVideo

type UploadVideo struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Duration Optional. Duration of sent video in seconds
	Duration int `json:"duration,omitempty"`
	// Width Optional. Video width
	Width int `json:"width,omitempty"`
	// Height Optional. Video height
	Height int `json:"height,omitempty"`

	// StartTimestamp Optional. Start timestamp for the video in the message
	StartTimestamp int64 `json:"start_timestamp,omitempty"`
	// Caption Optional. Video caption (may also be used when resending videos by file_id), 0-1024 characters
	// after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the video caption. See formatting options for more
	// details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`

	// ShowCaptionAboveMedia Optional. Pass True if the caption must be shown above the message media
	ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
	// HasSpoiler Optional. Pass True if the video needs to be covered with a spoiler animation
	HasSpoiler bool `json:"has_spoiler,omitempty"`
	// SupportsStreaming Optional. Pass True if the uploaded video is suitable for streaming
	SupportsStreaming bool `json:"supports_streaming,omitempty"`
	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadVideo holds parameters for uploading a video using the Uploader. Since: Bot API 1.0 See https://core.telegram.org/bots/api#sendvideo

type UploadVideoNote

type UploadVideoNote struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Duration Optional. Duration of sent video in seconds
	Duration int `json:"duration,omitempty"`
	// Length Optional. Video width and height, i.e. diameter of the video message
	Length int `json:"length,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadVideoNote holds parameters for uploading a video note (rounded video) using the Uploader. Since: Bot API 3.0 See https://core.telegram.org/bots/api#sendvideonote

type UploadVoice

type UploadVoice struct {
	// BusinessConnectionID Optional. Unique identifier of the business connection on behalf of which the
	// message will be sent
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username
	ChatID int64 `json:"chat_id"`
	// MessageThreadID Optional. Unique identifier for the target message thread (topic) of a forum; for forum
	// supergroups and private chats of bots with forum topic mode enabled only
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// DirectMessagesTopicID Optional. Identifier of the direct messages topic to which the message will be
	// sent; required if the message is sent to a direct messages chat
	DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
	// ReceiverUserID identifies the user who can see the ephemeral message.
	ReceiverUserID int64 `json:"receiver_user_id,omitempty"` // Since: Bot API 10.2
	// CallbackQueryID identifies the callback query that triggered an ephemeral response.
	CallbackQueryID string `json:"callback_query_id,omitempty"` // Since: Bot API 10.2

	// Caption Optional. Voice message caption, 0-1024 characters after entities parsing
	Caption string `json:"caption,omitempty"`
	// ParseMode Optional. Mode for parsing entities in the voice message caption. See formatting options for
	// more details.
	ParseMode ParseMode `json:"parse_mode,omitempty"`
	// CaptionEntities Optional. A JSON-serialized list of special entities that appear in the caption, which
	// can be specified instead of parse_mode
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	// Duration Optional. Duration of the voice message in seconds
	Duration int `json:"duration,omitempty"`

	// DisableNotification Optional. Sends the message silently. Users will receive a notification with no
	// sound.
	DisableNotification bool `json:"disable_notification,omitempty"`
	// ProtectContent Optional. Protects the contents of the sent message from forwarding and saving
	ProtectContent bool `json:"protect_content,omitempty"`
	// AllowPaidBroadcast Optional. Pass True to allow up to 1000 messages per second, ignoring broadcasting
	// limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's
	// balance.
	AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
	// MessageEffectID Optional. Unique identifier of the message effect to be added to the message; for private
	// chats only
	MessageEffectID string `json:"message_effect_id,omitempty"`

	// SuggestedPostParameters Optional. A JSON-serialized object containing the parameters of the suggested
	// post to send; for direct messages chats only. If the message is sent as a reply to another suggested
	// post, then that suggested post is automatically declined.
	SuggestedPostParameters *SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	// ReplyParameters Optional. Description of the message to reply to
	ReplyParameters *ReplyParameters `json:"reply_parameters,omitempty"`
	// ReplyMarkup Optional. Additional interface options. A JSON-serialized object for an inline keyboard,
	// custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
	ReplyMarkup *ReplyMarkup `json:"reply_markup,omitempty"`
}

UploadVoice holds parameters for uploading a voice note using the Uploader. Since: Bot API 1.2 See https://core.telegram.org/bots/api#sendvoice

type Uploader

type Uploader struct {
	// contains filtered or unexported fields
}

Uploader is a Telegram Bot API client specialized for multipart file uploads.

Use Uploader methods when you need to upload binary files directly (InputFile/multipart). For JSON-only calls (file_id, URL, plain params), use API.

func NewUploader

func NewUploader(api *API) *Uploader

NewUploader creates a multipart uploader bound to an API client.

func (*Uploader) Close

func (u *Uploader) Close() error

Close flushes and closes uploader logger resources. See https://core.telegram.org/bots/api

func (*Uploader) GetLogger

func (u *Uploader) GetLogger() *sneklog.Logger

GetLogger returns uploader logger instance. See https://core.telegram.org/bots/api

func (*Uploader) SendAnimation

func (u *Uploader) SendAnimation(params UploadAnimation, files ...UploaderFile) (Message, error)

SendAnimation uploads an animation via multipart and sends it as a message. Since: Bot API 4.0 files are the animation file(s) to upload (typically one file). See https://core.telegram.org/bots/api#sendanimation

func (*Uploader) SendAnimationWithContext

func (u *Uploader) SendAnimationWithContext(ctx context.Context, params UploadAnimation, files ...UploaderFile) (Message, error)

SendAnimationWithContext is the context-aware variant of SendAnimation. Since: Bot API 4.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendanimation

func (*Uploader) SendAudio

func (u *Uploader) SendAudio(params UploadAudio, files ...UploaderFile) (Message, error)

SendAudio uploads an audio file via multipart and sends it as a message. Since: Bot API 1.2 files are the audio file(s) to upload (typically one file). See https://core.telegram.org/bots/api#sendaudio

func (*Uploader) SendAudioWithContext

func (u *Uploader) SendAudioWithContext(ctx context.Context, params UploadAudio, files ...UploaderFile) (Message, error)

SendAudioWithContext is the context-aware variant of SendAudio. Since: Bot API 1.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendaudio

func (*Uploader) SendDocument

func (u *Uploader) SendDocument(params UploadDocument, files ...UploaderFile) (Message, error)

SendDocument uploads a document via multipart and sends it as a message. Since: Bot API 1.0 files are the document file(s) to upload (typically one file). See https://core.telegram.org/bots/api#senddocument

func (*Uploader) SendDocumentWithContext

func (u *Uploader) SendDocumentWithContext(ctx context.Context, params UploadDocument, files ...UploaderFile) (Message, error)

SendDocumentWithContext is the context-aware variant of SendDocument. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#senddocument

func (*Uploader) SendLivePhoto

func (u *Uploader) SendLivePhoto(params UploadLivePhoto, livePhoto, photo UploaderFile) (Message, error)

SendLivePhoto uploads a live-photo video and its static image via multipart. livePhoto is sent in the live_photo field and photo in the photo field. Since: Bot API 10.0 See https://core.telegram.org/bots/api#sendlivephoto

func (*Uploader) SendLivePhotoWithContext

func (u *Uploader) SendLivePhotoWithContext(
	ctx context.Context, params UploadLivePhoto, livePhoto, photo UploaderFile,
) (Message, error)

SendLivePhotoWithContext uploads a live-photo video and its static image via multipart using ctx for cancellation and deadlines. Since: Bot API 10.0 See https://core.telegram.org/bots/api#sendlivephoto

func (*Uploader) SendPhoto

func (u *Uploader) SendPhoto(params UploadPhoto, file UploaderFile) (Message, error)

SendPhoto uploads a photo via multipart and sends it as a message. Since: Bot API 1.0 file is the photo file to upload. See https://core.telegram.org/bots/api#sendphoto

func (*Uploader) SendPhotoWithContext

func (u *Uploader) SendPhotoWithContext(ctx context.Context, params UploadPhoto, file UploaderFile) (Message, error)

SendPhotoWithContext is the context-aware variant of SendPhoto. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendphoto

func (*Uploader) SendRichMessage added in v1.1.0

func (u *Uploader) SendRichMessage(params SendRichMessage, files ...UploaderFile) (Message, error)

SendRichMessage uploads files referenced by attach:// names in params.RichMessage and sends the rich message.

Since: Bot API 10.2

func (*Uploader) SendRichMessageDraft added in v1.1.0

func (u *Uploader) SendRichMessageDraft(params SendRichMessageDraft, files ...UploaderFile) (bool, error)

SendRichMessageDraft streams a rich-message draft without direct file uploads. It returns ErrRichMessageDraftUploadUnsupported when files is non-empty.

Since: Bot API 10.2

func (*Uploader) SendRichMessageDraftWithContext added in v1.1.0

func (u *Uploader) SendRichMessageDraftWithContext(ctx context.Context, params SendRichMessageDraft, files ...UploaderFile) (bool, error)

SendRichMessageDraftWithContext is the context-aware variant of SendRichMessageDraft.

Since: Bot API 10.2

func (*Uploader) SendRichMessageWithContext added in v1.1.0

func (u *Uploader) SendRichMessageWithContext(ctx context.Context, params SendRichMessage, files ...UploaderFile) (Message, error)

SendRichMessageWithContext uploads files referenced by attach:// names in params.RichMessage and sends the rich message using ctx for cancellation and deadlines.

Since: Bot API 10.2

func (*Uploader) SendVideo

func (u *Uploader) SendVideo(params UploadVideo, files ...UploaderFile) (Message, error)

SendVideo uploads a video via multipart and sends it as a message. Since: Bot API 1.0 files are the video file(s) to upload (typically one file). See https://core.telegram.org/bots/api#sendvideo

func (*Uploader) SendVideoNote

func (u *Uploader) SendVideoNote(params UploadVideoNote, files ...UploaderFile) (Message, error)

SendVideoNote uploads a video note via multipart and sends it as a message. Since: Bot API 3.0 files are the video note file(s) to upload (typically one file). See https://core.telegram.org/bots/api#sendvideonote

func (*Uploader) SendVideoNoteWithContext

func (u *Uploader) SendVideoNoteWithContext(ctx context.Context, params UploadVideoNote, files ...UploaderFile) (Message, error)

SendVideoNoteWithContext is the context-aware variant of SendVideoNote. Since: Bot API 3.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendvideonote

func (*Uploader) SendVideoWithContext

func (u *Uploader) SendVideoWithContext(ctx context.Context, params UploadVideo, files ...UploaderFile) (Message, error)

SendVideoWithContext is the context-aware variant of SendVideo. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendvideo

func (*Uploader) SendVoice

func (u *Uploader) SendVoice(params UploadVoice, files ...UploaderFile) (Message, error)

SendVoice uploads a voice note via multipart and sends it as a message. Since: Bot API 1.2 files are the voice file(s) to upload (typically one file). See https://core.telegram.org/bots/api#sendvoice

func (*Uploader) SendVoiceWithContext

func (u *Uploader) SendVoiceWithContext(ctx context.Context, params UploadVoice, files ...UploaderFile) (Message, error)

SendVoiceWithContext is the context-aware variant of SendVoice. Since: Bot API 1.2 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#sendvoice

func (*Uploader) SetChatPhoto

func (u *Uploader) SetChatPhoto(params UploadChatPhoto, photo UploaderFile) (bool, error)

SetChatPhoto uploads a new chat photo. Since: Bot API 3.1 photo is the photo file to upload. See https://core.telegram.org/bots/api#setchatphoto

func (*Uploader) SetChatPhotoWithContext

func (u *Uploader) SetChatPhotoWithContext(ctx context.Context, params UploadChatPhoto, photo UploaderFile) (bool, error)

SetChatPhotoWithContext is the context-aware variant of SetChatPhoto. Since: Bot API 3.1 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setchatphoto

func (*Uploader) SetWebhook

func (u *Uploader) SetWebhook(params UploadSetWebhook, certificate UploaderFile) (bool, error)

SetWebhook uploads a certificate and sets a webhook URL. Since: Bot API 1.0 certificate maps to the multipart field "certificate". See https://core.telegram.org/bots/api#setwebhook

func (*Uploader) SetWebhookWithContext

func (u *Uploader) SetWebhookWithContext(ctx context.Context, params UploadSetWebhook, certificate UploaderFile) (bool, error)

SetWebhookWithContext is the context-aware variant of SetWebhook. Since: Bot API 1.0 It executes the same request but uses ctx for cancellation and deadlines. See https://core.telegram.org/bots/api#setwebhook

type UploaderFile

type UploaderFile struct {
	// contains filtered or unexported fields
}

UploaderFile holds the data and metadata for a single file to be uploaded.

func NewUploaderFile

func NewUploaderFile(name string, data []byte) UploaderFile

NewUploaderFile creates a new UploaderFile, auto-detecting the field type from the file extension. If detection is incorrect, use SetType to override.

func (UploaderFile) SetAttachName added in v1.1.0

func (f UploaderFile) SetAttachName(name string) UploaderFile

SetAttachName sets the multipart field name used by an attach:// reference. The name must match the suffix of the corresponding InputMedia.Media value.

Since: Bot API 10.2

func (UploaderFile) SetType

SetType overrides the auto-detected upload field type. For example, use it when a voice file is detected as audio.

type UploaderFileType

type UploaderFileType string

UploaderFileType represents the Telegram form field name for a file upload.

const (
	// UploaderPhotoType is the multipart field name for photo uploads.
	UploaderPhotoType UploaderFileType = "photo"
	// UploaderVideoType is the multipart field name for video uploads.
	UploaderVideoType UploaderFileType = "video"
	// UploaderAudioType is the multipart field name for audio uploads.
	UploaderAudioType UploaderFileType = "audio"
	// UploaderDocumentType is the multipart field name for document uploads.
	UploaderDocumentType UploaderFileType = "document"
	// UploaderVoiceType is the multipart field name for voice uploads.
	UploaderVoiceType UploaderFileType = "voice"
	// UploaderVideoNoteType is the multipart field name for video-note uploads.
	UploaderVideoNoteType UploaderFileType = "video_note"
	// UploaderThumbnailType is the multipart field name for thumbnail uploads.
	UploaderThumbnailType UploaderFileType = "thumbnail"
	// UploaderStickerType is the multipart field name for sticker uploads.
	UploaderStickerType UploaderFileType = "sticker"
	// UploaderCertificateType is the multipart field name for webhook certificate uploads.
	UploaderCertificateType UploaderFileType = "certificate"
	// UploaderLivePhotoType is the multipart field name for live photo uploads.
	UploaderLivePhotoType UploaderFileType = "live_photo"
)

type UploaderRequest

type UploaderRequest[R, P any] struct {
	// contains filtered or unexported fields
}

UploaderRequest is a low-level multipart upload request wrapper.

Prefer method-specific helpers such as SendPhoto or SetWebhook. UploaderRequest is intended for advanced use cases where callers manage the method name, files, and request/response types themselves. In that sense it is an unsafe escape hatch compared with the typed uploader API.

func NewUploaderRequest

func NewUploaderRequest[R, P any](method string, params P, files ...UploaderFile) UploaderRequest[R, P]

NewUploaderRequest creates a low-level multipart upload request with no associated chat ID.

func NewUploaderRequestWithChatID

func NewUploaderRequestWithChatID[R, P any](method string, params P, chatID int64, files ...UploaderFile) UploaderRequest[R, P]

NewUploaderRequestWithChatID creates a low-level multipart upload request with an associated chat ID. The chat ID is used for per-chat rate limiting.

func (UploaderRequest[R, P]) Do

func (r UploaderRequest[R, P]) Do(up *Uploader) (R, error)

Do executes the upload request synchronously with a background context. Use only for simple, non-critical uploads.

func (UploaderRequest[R, P]) DoWithContext

func (r UploaderRequest[R, P]) DoWithContext(ctx context.Context, up *Uploader) (R, error)

DoWithContext executes the upload request asynchronously via the worker pool. Returns the result or error. Respects context cancellation.

type User

type User struct {
	// ID Unique identifier for this user or bot. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a 64-bit integer or double-precision float type are safe for storing this
	// identifier.
	ID int64 `json:"id"`
	// FirstName User's or bot's first name
	FirstName string `json:"first_name"`
	// LastName Optional. User's or bot's last name
	LastName *string `json:"last_name,omitempty"`
	// Username Optional. User's or bot's username
	Username *string `json:"username,omitempty"`

	// IsBot True, if this user is a bot
	IsBot bool `json:"is_bot"` // Since: Bot API 3.3
	// LanguageCode Optional. IETF language tag of the user's language
	LanguageCode *string `json:"language_code,omitempty"` // Since: Bot API 3.0
	// IsPremium Optional. True, if this user is a Telegram Premium user
	IsPremium *bool `json:"is_premium,omitempty"` // Since: Bot API 6.1
	// AddedToAttachmentMenu Optional. True, if this user added the bot to the attachment menu
	AddedToAttachmentMenu *bool `json:"added_to_attachment_menu,omitempty"` // Since: Bot API 6.1
	// CanJoinGroups Optional. True, if the bot can be invited to groups. Returned only in getMe.
	CanJoinGroups *bool `json:"can_join_groups,omitempty"` // Since: Bot API 4.6
	// CanReadAllGroupMessages Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
	CanReadAllGroupMessages *bool `json:"can_read_all_group_messages,omitempty"` // Since: Bot API 4.6
	// SupportsInlineQueries Optional. True, if the bot supports inline queries. Returned only in getMe.
	SupportsInlineQueries *bool `json:"supports_inline_queries,omitempty"` // Since: Bot API 4.6
	// CanConnectToBusiness Optional. True, if the bot can be connected to a user account to manage it. Returned
	// only in getMe.
	CanConnectToBusiness *bool `json:"can_connect_to_business,omitempty"` // Since: Bot API 7.2
	// HasMainWebApp Optional. True, if the bot has a main Web App. Returned only in getMe.
	HasMainWebApp *bool `json:"has_main_web_app,omitempty"` // Since: Bot API 7.8
	// HasTopicsEnabled Optional. True, if the bot has forum topic mode enabled in private chats. Returned only
	// in getMe.
	HasTopicsEnabled *bool `json:"has_topics_enabled,omitempty"` // Since: Bot API 9.3
	// AllowsUsersToCreateTopics Optional. True, if the bot allows users to create and delete topics in private
	// chats. Returned only in getMe.
	AllowsUsersToCreateTopics *bool `json:"allows_users_to_create_topics,omitempty"` // Since: Bot API 9.4
	// CanManageBots Optional. True, if other bots can be created to be controlled by the bot. Returned only in
	// getMe.
	CanManageBots *bool `json:"can_manage_bots,omitempty"` // Since: Bot API 9.6
	// SupportsGuestQueries Optional. True, if the bot supports guest queries from chats it is not a member of.
	// Returned only in getMe.
	SupportsGuestQueries *bool `json:"supports_guest_queries,omitempty"` // Since: Bot API 10.0

	// SupportsJoinRequestQueries reports that the bot supports join request
	// queries and can be assigned to process them. Returned only in getMe.
	SupportsJoinRequestQueries *bool `json:"supports_join_request_queries,omitempty"` // Since: Bot API 10.1
}

User represents a Telegram user or bot. Since: Bot API 1.0 See https://core.telegram.org/bots/api#user

type UserChatBoosts

type UserChatBoosts struct {
	// Boosts The list of boosts added to the chat by the user
	Boosts []ChatBoost `json:"boosts"`
}

UserChatBoosts represents a list of boosts a user has given to a chat. Since: Bot API 7.0 See https://core.telegram.org/bots/api#userchatboosts

type UserProfileAudios

type UserProfileAudios struct {
	// TotalCount Total number of profile audios for the target user
	TotalCount int `json:"total_count"`
	// Audios Requested profile audios
	Audios []Audio `json:"audios"`
}

UserProfileAudios represents a user's profile audios. Since: Bot API 9.3 See https://core.telegram.org/bots/api#userprofileaudios

type UserProfilePhotos

type UserProfilePhotos struct {
	// TotalCount Total number of profile pictures the target user has
	TotalCount int `json:"total_count"`
	// Photos Requested profile pictures (in up to 4 sizes each)
	Photos [][]PhotoSize `json:"photos"`
}

UserProfilePhotos represents a user's profile photos. Since: Bot API 1.4 See https://core.telegram.org/bots/api#userprofilephotos

type UserRating

type UserRating struct {
	// Level Current level of the user, indicating their reliability when purchasing digital goods and services.
	// A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.
	Level int `json:"level"`
	// Rating Numerical value of the user's rating; the higher the rating, the better
	Rating int `json:"rating"`
	// CurrentLevelRating The rating value required to get the current level
	CurrentLevelRating int `json:"current_level_rating"`
	// NextLevelRating Optional. The rating value required to get to the next level; omitted if the maximum
	// level was reached
	NextLevelRating int `json:"next_level_rating"`
}

UserRating represents a user's rating with level progression. Since: Bot API 9.3 See https://core.telegram.org/bots/api#userrating

type UsersShared

type UsersShared struct {
	// RequestID Identifier of the request
	RequestID int `json:"request_id"`
	// Users Information about users shared with the bot
	Users []SharedUser `json:"users"`
}

UsersShared represents a service message about users shared via a KeyboardButtonRequestUsers button. Since: Bot API 6.5

type Venue

type Venue struct {
	// Location Venue location. Can't be a live location.
	Location Location `json:"location"`
	// Title Name of the venue
	Title string `json:"title"`
	// Address Address of the venue
	Address string `json:"address"`
	// FoursquareID Optional. Foursquare identifier of the venue
	FoursquareID string `json:"foursquare_id,omitempty"`
	// FoursquareType Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”,
	// “arts_entertainment/aquarium” or “food/icecream”.)
	FoursquareType string `json:"foursquare_type,omitempty"`
	// GooglePlaceID Optional. Google Places identifier of the venue
	GooglePlaceID string `json:"google_place_id,omitempty"`
	// GooglePlaceType Optional. Google Places type of the venue. (See supported types.)
	GooglePlaceType string `json:"google_place_type,omitempty"`
}

Venue represents a venue. Since: Bot API 2.0 See https://core.telegram.org/bots/api#venue

type VerifyChat

type VerifyChat struct {
	// ChatID Required. Unique identifier for the target chat or username of the target bot, supergroup or
	// channel in the format @username. Channel direct messages chats can't be verified.
	ChatID int64 `json:"chat_id"`
	// CustomDescription Optional. Custom description for the verification; 0-70 characters. Must be empty if
	// the organization isn't allowed to provide a custom verification description.
	CustomDescription string `json:"custom_description,omitempty"`
}

VerifyChat holds parameters for the verifyChat method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#verifychat

type VerifyUser

type VerifyUser struct {
	// UserID Required. Unique identifier of the target user
	UserID int64 `json:"user_id"`
	// CustomDescription Optional. Custom description for the verification; 0-70 characters. Must be empty if
	// the organization isn't allowed to provide a custom verification description.
	CustomDescription string `json:"custom_description,omitempty"`
}

VerifyUser holds parameters for the verifyUser method. Since: Bot API 8.0 See https://core.telegram.org/bots/api#verifyuser

type Video

type Video struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Width Video width as defined by the sender
	Width int `json:"width"`
	// Height Video height as defined by the sender
	Height int `json:"height"`
	// Duration Duration of the video in seconds as defined by the sender
	Duration int `json:"duration"`

	// Thumbnail Optional. Video thumbnail
	Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
	// Cover Optional. Available sizes of the cover of the video in the message
	Cover []PhotoSize `json:"cover,omitempty"` // Since: Bot API 8.3
	// StartTimestamp Optional. Timestamp in seconds from which the video will play in the message
	StartTimestamp int64 `json:"start_timestamp"` // Since: Bot API 8.3
	// Qualities Optional. List of available qualities of the video
	Qualities []VideoQuality `json:"qualities,omitempty"` // Since: Bot API 9.4
	// FileName Optional. Original filename as defined by the sender
	FileName string `json:"file_name,omitempty"`
	// MimeType Optional. MIME type of the file as defined by the sender
	MimeType string `json:"mime_type,omitempty"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int64 `json:"file_size,omitempty"`
}

Video represents a video file. Since: Bot API 1.0

type VideoChatEnded

type VideoChatEnded struct {
	// Duration Video chat duration in seconds
	Duration int64 `json:"duration"`
}

VideoChatEnded represents a service message about a video chat ended in the chat. Since: Bot API 5.1

type VideoChatParticipantsInvited

type VideoChatParticipantsInvited struct {
	// Users New members that were invited to the video chat
	Users []User `json:"users"`
}

VideoChatParticipantsInvited represents a service message about new members invited to a video chat. Since: Bot API 5.1

type VideoChatScheduled

type VideoChatScheduled struct {
	// StartDate Point in time (Unix timestamp) when the video chat is supposed to be started by a chat
	// administrator
	StartDate int64 `json:"start_date"`
}

VideoChatScheduled represents a service message about a video chat scheduled in the chat. Since: Bot API 6.0

type VideoChatStarted

type VideoChatStarted struct{}

VideoChatStarted represents a service message about a video chat started in the chat. Since: Bot API 5.1

type VideoNote

type VideoNote struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Length Video width and height (diameter of the video message) as defined by the sender
	Length int `json:"length"`
	// Duration Duration of the video in seconds as defined by the sender
	Duration int `json:"duration"`
	// Thumbnail Optional. Video thumbnail
	Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
	// FileSize Optional. File size in bytes
	FileSize int64 `json:"file_size,omitempty"`
}

VideoNote represents a video message. Since: Bot API 3.0

type VideoQuality

type VideoQuality struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Width Video width
	Width int `json:"width"`
	// Height Video height
	Height int `json:"height"`
	// Codec Codec that was used to encode the video, for example, “h264”, “h265”, or “av01”
	Codec string `json:"codec"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int64 `json:"file_size,omitempty"`
}

VideoQuality describes an alternative quality for a video. Since: Bot API 9.4 See https://core.telegram.org/bots/api#videoquality

type Voice

type Voice struct {
	// FileID Identifier for this file, which can be used to download or reuse the file
	FileID string `json:"file_id"`
	// FileUniqueID Unique identifier for this file, which is supposed to be the same over time and for
	// different bots. Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Duration Duration of the audio in seconds as defined by the sender
	Duration int `json:"duration"`
	// MimeType Optional. MIME type of the file as defined by the sender
	MimeType string `json:"mime_type,omitempty"`
	// FileSize Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
	// integer or double-precision float type are safe for storing this value.
	FileSize int `json:"file_size,omitempty"`
}

Voice represents a voice note. Since: Bot API 1.2

type WebAppData

type WebAppData struct {
	// Data The data. Be aware that a bad client can send arbitrary data in this field.
	Data string `json:"data"`
	// ButtonText Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad
	// client can send arbitrary data in this field.
	ButtonText string `json:"button_text"`
}

WebAppData represents data sent from a Web App to the bot. Since: Bot API 6.0

type WebAppInfo

type WebAppInfo struct {
	// URL An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps
	URL string `json:"url"`
}

WebAppInfo contains information about a Web App. Since: Bot API 6.0 See https://core.telegram.org/bots/api#webappinfo

type WebhookInfo

type WebhookInfo struct {
	// URL Webhook URL, may be empty if webhook is not set up
	URL string `json:"url"`
	// HasCustomCertificate True, if a custom certificate was provided for webhook certificate checks
	HasCustomCertificate bool `json:"has_custom_certificate"`
	// PendingUpdateCount Number of updates awaiting delivery
	PendingUpdateCount int `json:"pending_update_count"`
	// IPAddress Optional. Currently used webhook IP address
	IPAddress string `json:"ip_address,omitempty"`
	// LastErrorDate Optional. Unix time for the most recent error that happened when trying to deliver an
	// update via webhook
	LastErrorDate int `json:"last_error_date,omitempty"`
	// LastErrorMessage Optional. Error message in human-readable format for the most recent error that happened
	// when trying to deliver an update via webhook
	LastErrorMessage string `json:"last_error_message,omitempty"`
	// LastSynchronizationErrorDate Optional. Unix time of the most recent error that happened when trying to
	// synchronize available updates with Telegram datacenters
	LastSynchronizationErrorDate int `json:"last_synchronization_error_date,omitempty"`
	// MaxConnections Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for
	// update delivery
	MaxConnections int `json:"max_connections,omitempty"`
	// AllowedUpdates Optional. A list of update types the bot is subscribed to. Defaults to all update types
	// except chat_member, message_reaction, and message_reaction_count.
	AllowedUpdates []string `json:"allowed_updates,omitempty"`
}

WebhookInfo describes the current webhook status. Since: Bot API 2.2 See https://core.telegram.org/bots/api#webhookinfo

type WriteAccessAllowed

type WriteAccessAllowed struct {
	// FromRequest Optional. True, if the access was granted after the user accepted an explicit request from a
	// Web App sent by the method requestWriteAccess
	FromRequest bool `json:"from_request,omitempty"`
	// WebAppName Optional. Name of the Web App, if the access was granted when the Web App was launched from a
	// link
	WebAppName string `json:"web_app_name,omitempty"`
	// FromAttachmentMenu Optional. True, if the access was granted when the bot was added to the attachment or
	// side menu
	FromAttachmentMenu bool `json:"from_attachment_menu,omitempty"`
}

WriteAccessAllowed represents a service message about a user allowing a bot to write messages. Since: Bot API 6.4

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL