telegrambot

package module
v0.13.7 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 21 Imported by: 17

README

Telegram Bot API helper for Golang

This package is for building Telegram Bots with or without webhook interface.

View the documentation here.

How to get

$ go get -u github.com/meinside/telegram-bot-go

Usage

See codes in samples/.

Test

With following environment variables:

$ export TOKEN="01234567:abcdefghijklmn_ABCDEFGHIJKLMNOPQRST"
$ export CHAT_ID="-123456789"

# for verbose output messages
$ export VERBOSE=true

run tests with:

$ go test

Not Implemented (Yet, or Forever?)

Todos

  • (WIP) Add tests for every API method

Documentation

Overview

Package telegrambot / Telegram Bot API helper

https://core.telegram.org/bots/api

Created on : 2015.10.06, meinside@duck.com

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCertAndKey

func GenCertAndKey(
	domain string,
	outCertFilepath string,
	outKeyFilepath string,
	expiresInDays int,
) error

GenCertAndKey generates a certificate and a private key file with given domain. (`OpenSSL` is needed.)

func NewInlineKeyboardButtonsAsRowsWithCallbackData

func NewInlineKeyboardButtonsAsRowsWithCallbackData(
	values map[string]string,
) [][]InlineKeyboardButton

NewInlineKeyboardButtonsAsRowsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons (as rows) with callback data

Types

type APIResponse

type APIResponse[T any] struct {
	OK          bool    `json:"ok"`
	Description *string `json:"description,omitempty"`

	Parameters *APIResponseParameters `json:"parameters,omitempty"`

	Result *T `json:"result,omitempty"`
}

APIResponse is a base of API responses

type APIResponseMessageOrBool

type APIResponseMessageOrBool struct {
	OK          bool    `json:"ok"`
	Description *string `json:"description,omitempty"`

	Parameters *APIResponseParameters `json:"parameters,omitempty"`

	ResultMessage *Message `json:"result_message,omitempty"`
	ResultBool    *bool    `json:"result_bool,omitempty"`
}

APIResponseMessageOrBool type for ambiguous type of `result`

type APIResponseParameters

type APIResponseParameters struct {
	MigrateToChatID *int64 `json:"migrate_to_chat_id,omitempty"`
	RetryAfter      *int   `json:"retry_after,omitempty"`
}

APIResponseParameters is parameters in API responses

https://core.telegram.org/bots/api#responseparameters

type AcceptedGiftTypes added in v0.11.17

type AcceptedGiftTypes struct {
	UnlimitedGifts      bool `json:"unlimited_gifts"`
	LimitedGifts        bool `json:"limited_gifts"`
	UniqueGifts         bool `json:"unique_gifts"`
	PremiumSubscription bool `json:"premium_subscription"`
	GiftsFromChannels   bool `json:"gifts_from_channels"`
}

AcceptedGiftTypes describes the types of gifts that can be gifted to a user or a chat.

https://core.telegram.org/bots/api#acceptedgifttypes

type AffiliateInfo added in v0.11.11

type AffiliateInfo struct {
	AffiliateUser     *User `json:"affiliate_user,omitempty"`
	AffiliateChat     *Chat `json:"affiliate_chat,omitempty"`
	CommissionPerMile int   `json:"commission_per_mille"`
	Amount            int   `json:"amount"`
	NanostarAmount    *int  `json:"nanostar_amount,omitempty"`
}

AffiliateInfo is a struct for a affiliate of transaction

https://core.telegram.org/bots/api#affiliateinfo

type AllowedUpdate

type AllowedUpdate string

AllowedUpdate is a type for 'allowed_updates'

const (
	AllowMessage                 AllowedUpdate = "message"
	AllowEditedMessage           AllowedUpdate = "edited_message"
	AllowChannelPost             AllowedUpdate = "channel_post"
	AllowEditedChannelPost       AllowedUpdate = "edited_channel_post"
	AllowBusinessConnection      AllowedUpdate = "business_connection"
	AllowBusinessMessage         AllowedUpdate = "business_message"
	AllowEditedBusinessMessage   AllowedUpdate = "edited_business_message"
	AllowDeletedBusinessMessages AllowedUpdate = "deleted_business_messages"
	AllowMessageReaction         AllowedUpdate = "message_reaction"       // NOTE: must be an admin, and need to be explicitly specified
	AllowMessageReactionCount    AllowedUpdate = "message_reaction_count" // NOTE: must be an admin, and need to be explicitly specified
	AllowInlineQuery             AllowedUpdate = "inline_query"
	AllowChosenInlineResult      AllowedUpdate = "chosen_inline_result"
	AllowCallbackQuery           AllowedUpdate = "callback_query"
	AllowShippingQuery           AllowedUpdate = "shipping_query"
	AllowPreCheckoutQuery        AllowedUpdate = "pre_checkout_query"
	AllowPurchasedPaidMedia      AllowedUpdate = "purchased_paid_media"
	AllowPoll                    AllowedUpdate = "poll"
	AllowPollAnswer              AllowedUpdate = "poll_answer"
	AllowMyChatMember            AllowedUpdate = "my_chat_member"
	AllowChatMember              AllowedUpdate = "chat_member"        // NOTE: must be an admin, and need to be explicitly specified
	AllowChatJoinRequest         AllowedUpdate = "chat_join_request"  // NOTE: must have `can_invite_users` admin right
	AllowChatBoost               AllowedUpdate = "chat_boost"         // NOTE: must be an admin
	AllowRemovedChatBoost        AllowedUpdate = "removed_chat_boost" // NOTE: must be an admin
)

AllowedUpdate type constants

https://core.telegram.org/bots/api#update

type Animation

type Animation struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Width        int        `json:"width"`
	Height       int        `json:"height"`
	Duration     int        `json:"duration"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
	FileName     *string    `json:"file_name,omitempty"`
	MimeType     *string    `json:"mime_type,omitempty"`
	FileSize     *int       `json:"file_size,omitempty"`
}

Animation is a struct of Animation

https://core.telegram.org/bots/api#animation

type Audio

type Audio struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Duration     int        `json:"duration"`
	Performer    *string    `json:"performer,omitempty"`
	Title        *string    `json:"title,omitempty"`
	FileName     *string    `json:"file_name,omitempty"`
	MimeType     *string    `json:"mime_type,omitempty"`
	FileSize     *int       `json:"file_size,omitempty"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
}

Audio is a struct for an audio file

https://core.telegram.org/bots/api#audio

type BackgroundFill added in v0.10.8

type BackgroundFill struct {
	Type BackgroundFillType `json:"type"`

	// type == "solid"
	Color *int `json:"color,omitempty"`

	// type == "gradient"
	TopColor      *int `json:"top_color,omitempty"`      // RGB24
	BottomColor   *int `json:"bottom_color,omitempty"`   // RGB24
	RotationAngle *int `json:"rotation_angle,omitempty"` // 0-359

	// type == "freeform_gradient"
	Colors []int `json:"colors,omitempty"`
}

BackgroundFill is a struct for a type of background fill

https://core.telegram.org/bots/api#backgroundfill

type BackgroundFillType added in v0.10.8

type BackgroundFillType string

BackgroundFillType for types of BackgroundFill

const (
	BackgroundFillTypeSolid            BackgroundFillType = "solid"
	BackgroundFillTypeGradient         BackgroundFillType = "gradient"
	BackgroundFillTypeFreeformGradient BackgroundFillType = "freeform_gradient"
)

BackgroundFillType constants

type BackgroundType added in v0.10.8

type BackgroundType struct {
	Type BackgroundTypeType `json:"type"`

	// type == "fill"
	Fill             *BackgroundFill `json:"fill,omitempty"`
	DarkThemeDimming *int            `json:"dark_theme_dimming,omitempty"`

	// type == "wallpaper"
	Document *Document `json:"document,omitempty"`
	// DarkThemeDimming *int `json:"dark_theme_dimming,omitempty"`
	IsBlurred *bool `json:"is_blurred,omitempty"`
	IsMoving  *bool `json:"is_moving,omitempty"`

	// type == "pattern"
	// Document *Document `json:"document,omitempty"`
	// Fill *BackgroundFill `json:"fill,omitempty"`
	Intensity  *int  `json:"intensity,omitempty"`
	IsInverted *bool `json:"is_inverted,omitempty"`

	// type == "chat_theme"
	ThemeName *string `json:"theme_name,omitempty"`
}

BackgroundType is a struct for a type of background

https://core.telegram.org/bots/api#backgroundtype

type BackgroundTypeType added in v0.10.8

type BackgroundTypeType string

BackgroundTypeType for types of BackgroundType

NOTE: When the API adds a new background type, add its string to the const block below and add any new fields to the flat BackgroundType struct.

BackgroundTypeType constants

type Birthdate added in v0.10.6

type Birthdate struct {
	Day   int  `json:"day"`
	Month int  `json:"month"`
	Year  *int `json:"year,omitempty"`
}

Birthdate is a struct of birth date

https://core.telegram.org/bots/api#birthdate

type Bot

type Bot struct {
	Verbose  bool // print verbose log messages or not
	DumpHTTP bool // dump HTTP request and response or not
	// contains filtered or unexported fields
}

Bot struct

func NewClient

func NewClient(token string) *Bot

NewClient gets a new bot API client with given token string.

func (*Bot) AddCommandHandler

func (b *Bot) AddCommandHandler(
	command string,
	handler func(b *Bot, update Update, args string),
)

AddCommandHandler adds a handler function for given command.

func (*Bot) AddStickerToSet

func (b *Bot) AddStickerToSet(
	ctx context.Context,
	userID int64,
	name string,
	sticker InputSticker,
	options OptionsAddStickerToSet,
) (result APIResponse[bool], err error)

AddStickerToSet adds a sticker to set.

https://core.telegram.org/bots/api#addstickertoset

func (*Bot) AnswerCallbackQuery

func (b *Bot) AnswerCallbackQuery(
	ctx context.Context,
	callbackQueryID string,
	options OptionsAnswerCallbackQuery,
) (result APIResponse[bool], err error)

AnswerCallbackQuery answers a callback query.

https://core.telegram.org/bots/api#answercallbackquery

func (*Bot) AnswerChatJoinRequestQuery added in v0.13.5

func (b *Bot) AnswerChatJoinRequestQuery(
	ctx context.Context,
	chatJoinRequestQueryID string,
	res string,
) (result APIResponse[bool], err error)

AnswerChatJoinRequestQuery processes a received chat join request query.

https://core.telegram.org/bots/api#answerchatjoinrequestquery

func (*Bot) AnswerGuestQuery added in v0.13.4

func (b *Bot) AnswerGuestQuery(
	ctx context.Context,
	guestQueryID string,
	queryResult InlineQueryResult,
) (result APIResponse[SentGuestMessage], err error)

AnswerGuestQuery answers a received guest message.

https://core.telegram.org/bots/api#answerguestquery

func (*Bot) AnswerInlineQuery

func (b *Bot) AnswerInlineQuery(
	ctx context.Context,
	inlineQueryID string,
	results []any,
	options OptionsAnswerInlineQuery,
) (result APIResponse[bool], err error)

AnswerInlineQuery sends answers to an inline query.

results = array of InlineQueryResultArticle, InlineQueryResultPhoto, InlineQueryResultGif, InlineQueryResultMpeg4Gif, or InlineQueryResultVideo.

https://core.telegram.org/bots/api#answerinlinequery

func (*Bot) AnswerPreCheckoutQuery

func (b *Bot) AnswerPreCheckoutQuery(
	ctx context.Context,
	preCheckoutQueryID string,
	ok bool,
	errorMessage *string,
) (result APIResponse[bool], err error)

AnswerPreCheckoutQuery answers a pre-checkout query.

https://core.telegram.org/bots/api#answerprecheckoutquery

func (*Bot) AnswerShippingQuery

func (b *Bot) AnswerShippingQuery(
	ctx context.Context,
	shippingQueryID string,
	ok bool,
	shippingOptions []ShippingOption,
	errorMessage *string,
) (result APIResponse[bool], err error)

AnswerShippingQuery answers a shipping query.

if ok is true, shippingOptions should be provided. otherwise, errorMessage should be provided.

https://core.telegram.org/bots/api#answershippingquery

func (*Bot) AnswerWebAppQuery

func (b *Bot) AnswerWebAppQuery(
	ctx context.Context,
	webAppQueryID string,
	res InlineQueryResult,
) (result APIResponse[SentWebAppMessage], err error)

AnswerWebAppQuery answers a web app's query.

https://core.telegram.org/bots/api#answerwebappquery

func (*Bot) ApproveChatJoinRequest

func (b *Bot) ApproveChatJoinRequest(
	ctx context.Context,
	chatID ChatID,
	userID int64,
) (result APIResponse[bool], err error)

ApproveChatJoinRequest approves chat join request.

https://core.telegram.org/bots/api#approvechatjoinrequest

func (*Bot) ApproveSuggestedPost added in v0.11.19

func (b *Bot) ApproveSuggestedPost(
	ctx context.Context,
	chatID int64,
	messageID int64,
	options OptionsApproveSuggestedPost,
) (result APIResponse[bool], err error)

ApproveSuggestedPost approves a suggested post.

https://core.telegram.org/bots/api#approvesuggestedpost

func (*Bot) BanChatMember

func (b *Bot) BanChatMember(
	ctx context.Context,
	chatID ChatID,
	userID int64,
	options OptionsBanChatMember,
) (result APIResponse[bool], err error)

BanChatMember bans a chat member.

https://core.telegram.org/bots/api#banchatmember

func (*Bot) BanChatSenderChat

func (b *Bot) BanChatSenderChat(
	ctx context.Context,
	chatID ChatID,
	senderChatID int64,
) (result APIResponse[bool], err error)

BanChatSenderChat bans a channel chat in a supergroup or a channel.

https://core.telegram.org/bots/api#banchatsenderchat

func (*Bot) Close

func (b *Bot) Close(
	ctx context.Context,
) (result APIResponse[bool], err error)

Close closes this bot from local Bot API server.

https://core.telegram.org/bots/api#close

func (*Bot) CloseForumTopic

func (b *Bot) CloseForumTopic(
	ctx context.Context,
	chatID ChatID,
	messageThreadID int64,
) (result APIResponse[bool], err error)

CloseForumTopic closes an open topic in a forum supergroup chat.

https://core.telegram.org/bots/api#closeforumtopic

func (*Bot) CloseGeneralForumTopic

func (b *Bot) CloseGeneralForumTopic(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

CloseGeneralForumTopic closes an open 'General' topic in a forum supergroup chat.

https://core.telegram.org/bots/api#closegeneralforumtopic

func (*Bot) ConvertGiftToStars added in v0.11.17

func (b *Bot) ConvertGiftToStars(
	ctx context.Context,
	businessConnectionID, ownedGiftID string,
) (result APIResponse[bool], err error)

ConvertGiftToStars converts a given regular gift to Telegram Stars.

https://core.telegram.org/bots/api#convertgifttostars

func (*Bot) CopyMessage

func (b *Bot) CopyMessage(
	ctx context.Context,
	chatID, fromChatID ChatID,
	messageID int64,
	options OptionsCopyMessage,
) (result APIResponse[MessageID], err error)

CopyMessage copies a message.

https://core.telegram.org/bots/api#copymessage

func (*Bot) CopyMessages

func (b *Bot) CopyMessages(
	ctx context.Context,
	chatID, fromChatID ChatID,
	messageIDs []int64,
	options OptionsCopyMessages,
) (result APIResponse[[]MessageID], err error)

CopyMessages copies messages.

https://core.telegram.org/bots/api#copymessages

func (b *Bot) CreateChatInviteLink(
	ctx context.Context,
	chatID ChatID,
	options OptionsCreateChatInviteLink,
) (result APIResponse[ChatInviteLink], err error)

CreateChatInviteLink creates a chat invite link.

https://core.telegram.org/bots/api#createchatinvitelink

func (b *Bot) CreateChatSubscriptionInviteLink(
	ctx context.Context,
	chatID ChatID,
	subscriptionPeriod, subscriptionPrice int,
	options OptionsCreateChatSubscriptionInviteLink,
) (result APIResponse[ChatInviteLink], err error)

CreateChatSubscriptionInviteLink creates a subscription invite link for a channel chat.

https://core.telegram.org/bots/api#createchatsubscriptioninvitelink

func (*Bot) CreateForumTopic

func (b *Bot) CreateForumTopic(
	ctx context.Context,
	chatID ChatID,
	name string,
	options OptionsCreateForumTopic,
) (result APIResponse[ForumTopic], err error)

CreateForumTopic creates a topic in a forum supergroup chat or a private chat with a user.

https://core.telegram.org/bots/api#createforumtopic

func (b *Bot) CreateInvoiceLink(
	ctx context.Context,
	title, description, payload, currency string,
	prices []LabeledPrice,
	options OptionsCreateInvoiceLink,
) (result APIResponse[string], err error)

CreateInvoiceLink creates a link for an invoice.

NOTE: - `providerToken`: Pass "" for payments in Telegram Stars. - `currency`: Pass "XTR" for payments in Telegram Stars.

https://core.telegram.org/bots/api#createinvoicelink

func (*Bot) CreateNewStickerSet

func (b *Bot) CreateNewStickerSet(
	ctx context.Context,
	userID int64,
	name, title string,
	stickers []InputSticker,
	options OptionsCreateNewStickerSet,
) (result APIResponse[bool], err error)

CreateNewStickerSet creates a new sticker set.

https://core.telegram.org/bots/api#createnewstickerset

func (*Bot) DeclineChatJoinRequest

func (b *Bot) DeclineChatJoinRequest(
	ctx context.Context,
	chatID ChatID,
	userID int64,
) (result APIResponse[bool], err error)

DeclineChatJoinRequest declines chat join request.

https://core.telegram.org/bots/api#declinechatjoinrequest

func (*Bot) DeclineSuggestedPost added in v0.11.19

func (b *Bot) DeclineSuggestedPost(
	ctx context.Context,
	chatID int64,
	messageID int64,
	options OptionsDeclineSuggestedPost,
) (result APIResponse[bool], err error)

DeclineSuggestedPost declines a suggested post.

https://core.telegram.org/bots/api#declinesuggestedpost

func (*Bot) DeleteAllMessageReactions added in v0.13.4

func (b *Bot) DeleteAllMessageReactions(
	ctx context.Context,
	chatID ChatID,
	options OptionsDeleteAllMessageReactions,
) (result APIResponse[bool], err error)

DeleteAllMessageReactions deletes up to 10,000 recent reactions in a group or supergroup chat added by a given user or chat. The bot must have the 'can_delete_messages' administrator right in the chat.

https://core.telegram.org/bots/api#deleteallmessagereactions

func (*Bot) DeleteBusinessMessages added in v0.11.17

func (b *Bot) DeleteBusinessMessages(
	ctx context.Context,
	businessConnectionID string,
	messageIDs []int64,
) (result APIResponse[bool], err error)

DeleteBusinessMessages deletes messages on behalf of a business account.

https://core.telegram.org/bots/api#deletebusinessmessages

func (*Bot) DeleteChatPhoto

func (b *Bot) DeleteChatPhoto(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

DeleteChatPhoto deletes a chat photo.

https://core.telegram.org/bots/api#deletechatphoto

func (*Bot) DeleteChatStickerSet

func (b *Bot) DeleteChatStickerSet(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

DeleteChatStickerSet deletes a chat sticker set.

https://core.telegram.org/bots/api#deletechatstickerset

func (*Bot) DeleteForumTopic

func (b *Bot) DeleteForumTopic(
	ctx context.Context,
	chatID ChatID,
	messageThreadID int64,
) (result APIResponse[bool], err error)

DeleteForumTopic deletes a forum topic along with all its messages in a forum supergroup chat or a private chat with a user.

https://core.telegram.org/bots/api#deleteforumtopic

func (*Bot) DeleteMessage

func (b *Bot) DeleteMessage(
	ctx context.Context,
	chatID ChatID,
	messageID int64,
) (result APIResponse[bool], err error)

DeleteMessage deletes a message.

https://core.telegram.org/bots/api#deletemessage

func (*Bot) DeleteMessageReaction added in v0.13.4

func (b *Bot) DeleteMessageReaction(
	ctx context.Context,
	chatID ChatID,
	messageID int64,
	options OptionsDeleteMessageReaction,
) (result APIResponse[bool], err error)

DeleteMessageReaction removes a reaction from a message in a group or a supergroup chat. The bot must have the 'can_delete_messages' administrator right in the chat.

https://core.telegram.org/bots/api#deletemessagereaction

func (*Bot) DeleteMessages

func (b *Bot) DeleteMessages(
	ctx context.Context,
	chatID ChatID,
	messageIDs []int64,
) (result APIResponse[bool], err error)

DeleteMessages deletes messages.

https://core.telegram.org/bots/api#deletemessages

func (*Bot) DeleteMyCommands

func (b *Bot) DeleteMyCommands(
	ctx context.Context,
	options OptionsDeleteMyCommands,
) (result APIResponse[bool], err error)

DeleteMyCommands deletes commands of this bot.

https://core.telegram.org/bots/api#deletemycommands

func (*Bot) DeleteStickerFromSet

func (b *Bot) DeleteStickerFromSet(
	ctx context.Context,
	sticker string,
) (result APIResponse[bool], err error)

DeleteStickerFromSet deletes a sticker from set.

https://core.telegram.org/bots/api#deletestickerfromset

func (*Bot) DeleteStickerSet

func (b *Bot) DeleteStickerSet(
	ctx context.Context,
	name string,
) (result APIResponse[bool], err error)

DeleteStickerSet deletes a sticker set.

https://core.telegram.org/bots/api#deletestickerset

func (*Bot) DeleteStory added in v0.11.17

func (b *Bot) DeleteStory(
	ctx context.Context,
	businessConnectionID string,
	storyID int64,
) (result APIResponse[bool], err error)

DeleteStory deletes a story previously posted by the bot on behalf of a managed business account.

https://core.telegram.org/bots/api#deletestory

func (*Bot) DeleteWebhook

func (b *Bot) DeleteWebhook(
	ctx context.Context,
	dropPendingUpdates bool,
) (result APIResponse[bool], err error)

DeleteWebhook deletes webhook for this bot. (Function GetUpdates will not work if webhook is set, so in that case you'll need to delete it)

https://core.telegram.org/bots/api#deletewebhook

func (b *Bot) EditChatInviteLink(
	ctx context.Context,
	chatID ChatID,
	inviteLink string,
	options OptionsCreateChatInviteLink,
) (result APIResponse[ChatInviteLink], err error)

EditChatInviteLink edits a chat invite link.

https://core.telegram.org/bots/api#editchatinvitelink

func (b *Bot) EditChatSubscriptionInviteLink(
	ctx context.Context,
	chatID ChatID,
	inviteLink string,
	options OptionsEditChatSubscriptionInviteLink,
) (result APIResponse[ChatInviteLink], err error)

EditChatSubscriptionInviteLink edits a subscription invite link created by the bot.

https://core.telegram.org/bots/api#editchatsubscriptioninvitelink

func (*Bot) EditForumTopic

func (b *Bot) EditForumTopic(
	ctx context.Context,
	chatID ChatID,
	messageThreadID int64,
	options OptionsEditForumTopic,
) (result APIResponse[bool], err error)

EditForumTopic edits a topic in a forum supergroup chat or a private chat with a user.

https://core.telegram.org/bots/api#editforumtopic

func (*Bot) EditGeneralForumTopic

func (b *Bot) EditGeneralForumTopic(
	ctx context.Context,
	chatID ChatID,
	name string,
) (result APIResponse[bool], err error)

EditGeneralForumTopic edits the name of the 'General' topic in a forum supergroup chat.

https://core.telegram.org/bots/api#editgeneralforumtopic

func (*Bot) EditMessageCaption

func (b *Bot) EditMessageCaption(
	ctx context.Context,
	options OptionsEditMessageCaption,
) (result APIResponseMessageOrBool, err error)

EditMessageCaption edits caption of a message.

https://core.telegram.org/bots/api#editmessagecaption

func (*Bot) EditMessageChecklist added in v0.11.18

func (b *Bot) EditMessageChecklist(
	ctx context.Context,
	businessConnectionID string,
	chatID int64,
	messageID int64,
	checklist InputChecklist,
	options OptionsEditMessageChecklist,
) (result APIResponse[Message], err error)

EditMessageChecklist edits check list of a message.

https://core.telegram.org/bots/api#editmessagechecklist

func (*Bot) EditMessageLiveLocation

func (b *Bot) EditMessageLiveLocation(
	ctx context.Context,
	latitude, longitude float32,
	options OptionsEditMessageLiveLocation,
) (result APIResponseMessageOrBool, err error)

EditMessageLiveLocation edits live location of a message.

https://core.telegram.org/bots/api#editmessagelivelocation

func (*Bot) EditMessageMedia

func (b *Bot) EditMessageMedia(
	ctx context.Context,
	media InputMedia,
	options OptionsEditMessageMedia,
) (result APIResponseMessageOrBool, err error)

EditMessageMedia edites a media message.

https://core.telegram.org/bots/api#editmessagemedia

func (*Bot) EditMessageReplyMarkup

func (b *Bot) EditMessageReplyMarkup(
	ctx context.Context,
	options OptionsEditMessageReplyMarkup,
) (result APIResponseMessageOrBool, err error)

EditMessageReplyMarkup edits reply markup of a message.

https://core.telegram.org/bots/api#editmessagereplymarkup

func (*Bot) EditMessageText

func (b *Bot) EditMessageText(
	ctx context.Context,
	text string,
	options OptionsEditMessageText,
) (result APIResponseMessageOrBool, err error)

EditMessageText edits text of a message.

https://core.telegram.org/bots/api#editmessagetext

func (*Bot) EditStory added in v0.11.17

func (b *Bot) EditStory(
	ctx context.Context,
	businessConnectionID string,
	storyID int64,
	content InputStoryContent,
	options OptionsEditStory,
) (result APIResponse[Story], err error)

EditStory edits a story previously posted by the bot on behalf of a managed business account.

https://core.telegram.org/bots/api#editstory

func (*Bot) EditUserStarSubscription added in v0.11.9

func (b *Bot) EditUserStarSubscription(
	ctx context.Context,
	userID int64,
	telegramPaymentChargeID string,
	isCanceled bool,
) (result APIResponse[bool], err error)

EditUserStarSubscription allows the bot to cancel or re-enable extension of a subscription.

https://core.telegram.org/bots/api#edituserstarsubscription

func (b *Bot) ExportChatInviteLink(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[string], err error)

ExportChatInviteLink exports a chat invite link.

https://core.telegram.org/bots/api#exportchatinvitelink

func (*Bot) ForwardMessage

func (b *Bot) ForwardMessage(
	ctx context.Context,
	chatID, fromChatID ChatID,
	messageID int64,
	options OptionsForwardMessage,
) (result APIResponse[Message], err error)

ForwardMessage forwards a message.

https://core.telegram.org/bots/api#forwardmessage

func (*Bot) ForwardMessages

func (b *Bot) ForwardMessages(
	ctx context.Context,
	chatID, fromChatID ChatID,
	messageIDs []int64,
	options OptionsForwardMessages,
) (result APIResponse[[]MessageID], err error)

ForwardMessages forwards messages.

https://core.telegram.org/bots/api#forwardmessages

func (*Bot) GetAvailableGifts added in v0.11.9

func (b *Bot) GetAvailableGifts(
	ctx context.Context,
) (result APIResponse[Gifts], err error)

GetAvailableGifts returns the list of gifts that can be sent by the bot to users.

https://core.telegram.org/bots/api#getavailablegifts

func (*Bot) GetBusinessAccountGifts added in v0.11.17

func (b *Bot) GetBusinessAccountGifts(
	ctx context.Context,
	businessConnectionID string,
	options OptionsGetBusinessAccountGifts,
) (result APIResponse[OwnedGifts], err error)

GetBusinessAccountGifts returns the gifts received and owned by a managed business account.

https://core.telegram.org/bots/api#getbusinessaccountgifts

func (*Bot) GetBusinessAccountStarBalance added in v0.11.17

func (b *Bot) GetBusinessAccountStarBalance(
	ctx context.Context,
	businessConnectionID string,
) (result APIResponse[StarAmount], err error)

GetBusinessAccountStarBalance returns the amount of Telegram Stars owned by a managed business account.

https://core.telegram.org/bots/api#getbusinessaccountstarbalance

func (*Bot) GetBusinessConnection added in v0.10.6

func (b *Bot) GetBusinessConnection(
	ctx context.Context,
	businessConnectionID string,
) (result APIResponse[BusinessConnection], err error)

GetBusinessConnection gets a business connection.

https://core.telegram.org/bots/api#getbusinessconnection

func (*Bot) GetChat

func (b *Bot) GetChat(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[ChatFullInfo], err error)

GetChat gets a chat.

https://core.telegram.org/bots/api#getchat

func (*Bot) GetChatAdministrators

func (b *Bot) GetChatAdministrators(
	ctx context.Context,
	chatID ChatID,
	options OptionsGetChatAdministrators,
) (result APIResponse[[]ChatMember], err error)

GetChatAdministrators gets chat administrators.

https://core.telegram.org/bots/api#getchatadministrators

func (*Bot) GetChatGifts added in v0.12.1

func (b *Bot) GetChatGifts(
	ctx context.Context,
	chatID ChatID,
	options OptionsGetChatGifts,
) (result APIResponse[OwnedGifts], err error)

GetChatGifts returns the gifts owned by a chat.

https://core.telegram.org/bots/api#getchatgifts

func (*Bot) GetChatMember

func (b *Bot) GetChatMember(
	ctx context.Context,
	chatID ChatID,
	userID int64,
) (result APIResponse[ChatMember], err error)

GetChatMember gets a chat member.

https://core.telegram.org/bots/api#getchatmember

func (*Bot) GetChatMemberCount

func (b *Bot) GetChatMemberCount(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[int], err error)

GetChatMemberCount gets chat members' count.

https://core.telegram.org/bots/api#getchatmembercount

func (*Bot) GetChatMenuButton

func (b *Bot) GetChatMenuButton(
	ctx context.Context,
	options OptionsGetChatMenuButton,
) (result APIResponse[MenuButton], err error)

GetChatMenuButton fetches current chat menu button.

https://core.telegram.org/bots/api#getchatmenubutton

func (*Bot) GetCustomEmojiStickers

func (b *Bot) GetCustomEmojiStickers(
	ctx context.Context,
	customEmojiIDs []string,
) (result APIResponse[[]Sticker], err error)

GetCustomEmojiStickers gets custom emoji stickers.

https://core.telegram.org/bots/api#getcustomemojistickers

func (*Bot) GetFile

func (b *Bot) GetFile(
	ctx context.Context,
	fileID string,
) (result APIResponse[File], err error)

GetFile gets file info and prepare for download.

https://core.telegram.org/bots/api#getfile

func (*Bot) GetFileURL

func (b *Bot) GetFileURL(file File) string

GetFileURL gets download link from a given File.

func (*Bot) GetForumTopicIconStickers

func (b *Bot) GetForumTopicIconStickers(
	ctx context.Context,
) (result APIResponse[[]Sticker], err error)

GetForumTopicIconStickers fetches custom emoji stickers which can be used as a forum topic icon by any user.

https://core.telegram.org/bots/api#getforumtopiciconstickers

func (*Bot) GetGameHighScores

func (b *Bot) GetGameHighScores(
	ctx context.Context,
	userID int64,
	options OptionsGetGameHighScores,
) (result APIResponse[[]GameHighScore], err error)

GetGameHighScores gets high scores of a game.

https://core.telegram.org/bots/api#getgamehighscores

func (*Bot) GetManagedBotAccessSettings added in v0.13.4

func (b *Bot) GetManagedBotAccessSettings(
	ctx context.Context,
	userID int64,
) (result APIResponse[BotAccessSettings], err error)

GetManagedBotAccessSettings gets access settings of a managed bot.

https://core.telegram.org/bots/api#getmanagedbotaccesssettings

func (*Bot) GetManagedBotToken added in v0.13.3

func (b *Bot) GetManagedBotToken(
	ctx context.Context,
	userID int64,
) (result APIResponse[string], err error)

GetManagedBotToken gets the token of a managed bot.

https://core.telegram.org/bots/api#getmanagedbottoken

func (*Bot) GetMe

func (b *Bot) GetMe(
	ctx context.Context,
) (result APIResponse[User], err error)

GetMe gets info of this bot.

https://core.telegram.org/bots/api#getme

func (*Bot) GetMyCommands

func (b *Bot) GetMyCommands(
	ctx context.Context,
	options OptionsGetMyCommands,
) (result APIResponse[[]BotCommand], err error)

GetMyCommands fetches commands of this bot.

https://core.telegram.org/bots/api#getmycommands

func (*Bot) GetMyDefaultAdministratorRights

func (b *Bot) GetMyDefaultAdministratorRights(
	ctx context.Context,
	options OptionsGetMyDefaultAdministratorRights,
) (result APIResponse[bool], err error)

GetMyDefaultAdministratorRights gets my default administrator rights.

https://core.telegram.org/bots/api#getmydefaultadministratorrights

func (*Bot) GetMyDescription

func (b *Bot) GetMyDescription(
	ctx context.Context,
	options OptionsGetMyDescription,
) (result APIResponse[BotDescription], err error)

GetMyDescription gets the bot's description.

https://core.telegram.org/bots/api#setmydescription

func (*Bot) GetMyName

func (b *Bot) GetMyName(
	ctx context.Context,
	options OptionsGetMyName,
) (result APIResponse[BotName], err error)

GetMyName fetches the bot's name.

https://core.telegram.org/bots/api#getmyname

func (*Bot) GetMyShortDescription

func (b *Bot) GetMyShortDescription(
	ctx context.Context,
	options OptionsGetMyShortDescription,
) (result APIResponse[BotShortDescription], err error)

GetMyShortDescription gets the bot's short description.

https://core.telegram.org/bots/api#getmyshortdescription

func (*Bot) GetMyStarBalance added in v0.11.18

func (b *Bot) GetMyStarBalance(
	ctx context.Context,
) (result APIResponse[StarAmount], err error)

GetMyStarBalance fetches the current balance of Telegram Stars.

https://core.telegram.org/bots/api#getmystarbalance

func (*Bot) GetStarTransactions added in v0.11.2

func (b *Bot) GetStarTransactions(
	ctx context.Context,
	options OptionsGetStarTransactions,
) (result APIResponse[StarTransactions], err error)

GetStarTransactions gets star transactions.

https://core.telegram.org/bots/api#getstartransactions

func (*Bot) GetStickerSet

func (b *Bot) GetStickerSet(
	ctx context.Context,
	name string,
) (result APIResponse[StickerSet], err error)

GetStickerSet gets a sticker set.

https://core.telegram.org/bots/api#getstickerset

func (*Bot) GetUpdates

func (b *Bot) GetUpdates(
	ctx context.Context,
	options OptionsGetUpdates,
) (result APIResponse[[]Update], err error)

GetUpdates retrieves updates from Telegram bot API.

https://core.telegram.org/bots/api#getupdates

func (*Bot) GetUserChatBoosts

func (b *Bot) GetUserChatBoosts(
	ctx context.Context,
	chatID ChatID,
	userID int64,
) (result APIResponse[UserChatBoosts], err error)

GetUserChatBoosts gets boosts of a user.

https://core.telegram.org/bots/api#getuserchatboosts

func (*Bot) GetUserGifts added in v0.12.1

func (b *Bot) GetUserGifts(
	ctx context.Context,
	userID int64,
	options OptionsGetUserGifts,
) (result APIResponse[OwnedGifts], err error)

GetUserGifts returns the gifts owned and hosted by a user.

https://core.telegram.org/bots/api#getusergifts

func (*Bot) GetUserPersonalChatMessages added in v0.13.4

func (b *Bot) GetUserPersonalChatMessages(ctx context.Context, userID int64, limit int) (result APIResponse[[]Message], err error)

GetUserPersonalChatMessages gets the last messages from the personal chat of a given user.

https://core.telegram.org/bots/api#getuserpersonalchatmessages

func (*Bot) GetUserProfileAudios added in v0.12.2

func (b *Bot) GetUserProfileAudios(
	ctx context.Context,
	userID int64,
	options OptionsGetUserProfileAudios,
) (result APIResponse[UserProfileAudios], err error)

GetUserProfileAudios gets a list of profile audios for a user.

https://core.telegram.org/bots/api#getuserprofileaudios

func (*Bot) GetUserProfilePhotos

func (b *Bot) GetUserProfilePhotos(
	ctx context.Context,
	userID int64,
	options OptionsGetUserProfilePhotos,
) (result APIResponse[UserProfilePhotos], err error)

GetUserProfilePhotos gets user profile photos.

https://core.telegram.org/bots/api#getuserprofilephotos

func (*Bot) GetWebhookInfo

func (b *Bot) GetWebhookInfo(
	ctx context.Context,
) (result APIResponse[WebhookInfo], err error)

GetWebhookInfo gets webhook info for this bot.

https://core.telegram.org/bots/api#getwebhookinfo

func (*Bot) GiftPremiumSubscription added in v0.11.17

func (b *Bot) GiftPremiumSubscription(
	ctx context.Context,
	userID int64,
	monthCount, starCount int,
	options OptionsGiftPremiumSubscription,
) (result APIResponse[bool], err error)

GiftPremiumSubscription gifts a Telegram Premium subscription to the given user.

https://core.telegram.org/bots/api#giftpremiumsubscription

func (*Bot) HideGeneralForumTopic

func (b *Bot) HideGeneralForumTopic(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

HideGeneralForumTopic hides the 'General' topic in a forum supergroup chat.

https://core.telegram.org/bots/api#hidegeneralforumtopic

func (*Bot) LeaveChat

func (b *Bot) LeaveChat(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

LeaveChat leaves a chat.

https://core.telegram.org/bots/api#leavechat

func (*Bot) LogOut

func (b *Bot) LogOut(
	ctx context.Context,
) (result APIResponse[bool], err error)

LogOut logs this bot from cloud Bot API server.

https://core.telegram.org/bots/api#logout

func (*Bot) PinChatMessage

func (b *Bot) PinChatMessage(
	ctx context.Context,
	chatID ChatID,
	messageID int64,
	options OptionsPinChatMessage,
) (result APIResponse[bool], err error)

PinChatMessage pins a chat message.

https://core.telegram.org/bots/api#pinchatmessage

func (*Bot) PostStory added in v0.11.17

func (b *Bot) PostStory(
	ctx context.Context,
	businessConnectionID string,
	content InputStoryContent,
	activePeriod int,
	options OptionsPostStory,
) (result APIResponse[Story], err error)

PostStory posts a story on behalf of a managed business account.

https://core.telegram.org/bots/api#poststory

func (*Bot) PromoteChatMember

func (b *Bot) PromoteChatMember(
	ctx context.Context,
	chatID ChatID,
	userID int64,
	options OptionsPromoteChatMember,
) (result APIResponse[bool], err error)

PromoteChatMember promotes a chat member.

https://core.telegram.org/bots/api#promotechatmember

func (*Bot) ReadBusinessMessage added in v0.11.17

func (b *Bot) ReadBusinessMessage(
	ctx context.Context,
	businessConnectionID string,
	chatID, messageID int64,
) (result APIResponse[bool], err error)

ReadBusinessMessage marks an incoming message as read on behalf of a business account.

https://core.telegram.org/bots/api#readbusinessmessage

func (*Bot) RefundStarPayment added in v0.11.1

func (b *Bot) RefundStarPayment(
	ctx context.Context,
	userID int64,
	telegramPaymentChargeID string,
) (result APIResponse[bool], err error)

RefundStarPayment refunds a successful payment in Telegram Stars.

https://core.telegram.org/bots/api#refundstarpayment

func (*Bot) RemoveBusinessAccountProfilePhoto added in v0.11.17

func (b *Bot) RemoveBusinessAccountProfilePhoto(
	ctx context.Context,
	businessConnectionID string,
	options OptionsRemoveBusinessAccountProfilePhoto,
) (result APIResponse[bool], err error)

RemoveBusinessAccountProfilePhoto removes the current profile photo of a managed business account.

https://core.telegram.org/bots/api#removebusinessaccountprofilephoto

func (*Bot) RemoveChatVerification added in v0.11.12

func (b *Bot) RemoveChatVerification(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

RemoveChatVerification removes a chat's verification.

https://core.telegram.org/bots/api#removechatverification

func (*Bot) RemoveMyProfilePhoto added in v0.12.2

func (b *Bot) RemoveMyProfilePhoto(
	ctx context.Context,
) (result APIResponse[bool], err error)

RemoveMyProfilePhoto deletes the bot's profile photo.

https://core.telegram.org/bots/api#removemyprofilephoto

func (*Bot) RemoveUserVerification added in v0.11.12

func (b *Bot) RemoveUserVerification(
	ctx context.Context,
	userID int64,
) (result APIResponse[bool], err error)

RemoveUserVerification removes a user's verification.

https://core.telegram.org/bots/api#removeuserverification

func (*Bot) ReopenForumTopic

func (b *Bot) ReopenForumTopic(
	ctx context.Context,
	chatID ChatID,
	messageThreadID int64,
) (result APIResponse[bool], err error)

ReopenForumTopic reopens a closed topic in a forum supergroup chat.

https://core.telegram.org/bots/api#reopenforumtopic

func (*Bot) ReopenGeneralForumTopic

func (b *Bot) ReopenGeneralForumTopic(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

ReopenGeneralForumTopic reopens a closed 'General' topic in a forum supergroup chat.

https://core.telegram.org/bots/api#reopengeneralforumtopic

func (*Bot) ReplaceManagedBotToken added in v0.13.3

func (b *Bot) ReplaceManagedBotToken(
	ctx context.Context,
	userID int64,
) (result APIResponse[string], err error)

ReplaceManagedBotToken revokes the current token of a managed bot and generates a new one.

https://core.telegram.org/bots/api#replacemanagedbottoken

func (*Bot) ReplaceStickerInSet added in v0.10.6

func (b *Bot) ReplaceStickerInSet(
	ctx context.Context,
	userID, name, oldSticker string,
	sticker InputSticker,
) (result APIResponse[bool], err error)

ReplaceStickerInSet replaces an existing sticker in a sticker set with a new one.

https://core.telegram.org/bots/api#replacestickerinset

func (*Bot) RepostStory added in v0.12.1

func (b *Bot) RepostStory(
	ctx context.Context,
	businessConnectionID string,
	fromChatID int64,
	fromStoryID int64,
	activePeriod int,
	options OptionsRepostStory,
) (result APIResponse[Story], err error)

RepostStory reposts a story on behalf of a business account from another business account.

https://core.telegram.org/bots/api#repoststory

func (*Bot) RestrictChatMember

func (b *Bot) RestrictChatMember(
	ctx context.Context,
	chatID ChatID,
	userID int64,
	permissions ChatPermissions,
	options OptionsRestrictChatMember,
) (result APIResponse[bool], err error)

RestrictChatMember restricts a chat member.

https://core.telegram.org/bots/api#restrictchatmember

func (b *Bot) RevokeChatInviteLink(
	ctx context.Context,
	chatID ChatID,
	inviteLink string,
) (result APIResponse[ChatInviteLink], err error)

RevokeChatInviteLink revoks a chat invite link.

https://core.telegram.org/bots/api#revokechatinvitelink

func (*Bot) SavePreparedInlineMessage added in v0.11.9

func (b *Bot) SavePreparedInlineMessage(
	ctx context.Context,
	userID int64,
	result InlineQueryResult,
	options OptionsSavePreparedInlineMessage,
) (res APIResponse[PreparedInlineMessage], err error)

SavePreparedInlineMessage stores a message that can be sent by a user of a Mini App.

https://core.telegram.org/bots/api#savepreparedinlinemessage

func (*Bot) SavePreparedKeyboardButton added in v0.13.3

func (b *Bot) SavePreparedKeyboardButton(
	ctx context.Context,
	userID int64,
	button KeyboardButton,
) (res APIResponse[PreparedKeyboardButton], err error)

SavePreparedKeyboardButton stores a keyboard button that can be used by a user within a Mini App.

https://core.telegram.org/bots/api#savepreparedkeyboardbutton

func (*Bot) SendAnimation

func (b *Bot) SendAnimation(
	ctx context.Context,
	chatID ChatID,
	animation InputFile,
	options OptionsSendAnimation,
) (result APIResponse[Message], err error)

SendAnimation sends an animation.

https://core.telegram.org/bots/api#sendanimation

func (*Bot) SendAudio

func (b *Bot) SendAudio(
	ctx context.Context,
	chatID ChatID,
	audio InputFile,
	options OptionsSendAudio,
) (result APIResponse[Message], err error)

SendAudio sends an audio file. (.mp3 or .m4a format, will be played with external players)

https://core.telegram.org/bots/api#sendaudio

func (*Bot) SendChatAction

func (b *Bot) SendChatAction(
	ctx context.Context,
	chatID ChatID,
	action ChatAction,
	options OptionsSendChatAction,
) (result APIResponse[bool], err error)

SendChatAction sends chat actions.

https://core.telegram.org/bots/api#sendchataction

func (*Bot) SendChatJoinRequestWebApp added in v0.13.5

func (b *Bot) SendChatJoinRequestWebApp(
	ctx context.Context,
	chatJoinRequestQueryID string,
	webAppURL string,
) (result APIResponse[bool], err error)

SendChatJoinRequestWebApp processes a received chat join request query by showing a Mini App to the user before deciding the outcome.

https://core.telegram.org/bots/api#sendchatjoinrequestwebapp

func (*Bot) SendChecklist added in v0.11.18

func (b *Bot) SendChecklist(
	ctx context.Context,
	businessConnectionID string,
	chatID ChatID,
	checklist InputChecklist,
	options OptionsSendChecklist,
) (result APIResponse[Message], err error)

SendChecklist sends a checklist.

https://core.telegram.org/bots/api#sendchecklist

func (*Bot) SendContact

func (b *Bot) SendContact(
	ctx context.Context,
	chatID ChatID,
	phoneNumber, firstName string,
	options OptionsSendContact,
) (result APIResponse[Message], err error)

SendContact sends contacts.

https://core.telegram.org/bots/api#sendcontact

func (*Bot) SendDice

func (b *Bot) SendDice(
	ctx context.Context,
	chatID ChatID,
	options OptionsSendDice,
) (result APIResponse[Message], err error)

SendDice sends a random dice.

https://core.telegram.org/bots/api#senddice

func (*Bot) SendDocument

func (b *Bot) SendDocument(
	ctx context.Context,
	chatID ChatID,
	document InputFile,
	options OptionsSendDocument,
) (result APIResponse[Message], err error)

SendDocument sends a general file.

https://core.telegram.org/bots/api#senddocument

func (*Bot) SendGame

func (b *Bot) SendGame(
	ctx context.Context,
	chatID ChatID,
	gameShortName string,
	options OptionsSendGame,
) (result APIResponse[Message], err error)

SendGame sends a game.

https://core.telegram.org/bots/api#sendgame

func (*Bot) SendGift added in v0.11.9

func (b *Bot) SendGift(
	ctx context.Context,
	giftID string,
	options OptionsSendGift,
) (result APIResponse[bool], err error)

SendGift sends a gift to the given user.

https://core.telegram.org/bots/api#sendgift

func (*Bot) SendInvoice

func (b *Bot) SendInvoice(
	ctx context.Context,
	chatID int64,
	title, description, payload, providerToken, currency string,
	prices []LabeledPrice,
	options OptionsSendInvoice,
) (result APIResponse[Message], err error)

SendInvoice sends an invoice.

NOTE: - `providerToken`: Pass "" for payments in Telegram Stars. - `currency`: Pass "XTR" for payments in Telegram Stars.

https://core.telegram.org/bots/api#sendinvoice

func (*Bot) SendLivePhoto added in v0.13.4

func (b *Bot) SendLivePhoto(
	ctx context.Context,
	chatID ChatID,
	livePhoto InputFile,
	photo InputFile,
	options OptionsSendLivePhoto,
) (result APIResponse[Message], err error)

SendLivePhoto sends a live photo.

https://core.telegram.org/bots/api#sendlivephoto

func (*Bot) SendLocation

func (b *Bot) SendLocation(
	ctx context.Context,
	chatID ChatID,
	latitude, longitude float32,
	options OptionsSendLocation,
) (result APIResponse[Message], err error)

SendLocation sends locations.

https://core.telegram.org/bots/api#sendlocation

func (*Bot) SendMediaGroup

func (b *Bot) SendMediaGroup(
	ctx context.Context,
	chatID ChatID,
	media []InputMedia,
	options OptionsSendMediaGroup,
) (result APIResponse[[]Message], err error)

SendMediaGroup sends a group of photos or videos as an album.

https://core.telegram.org/bots/api#sendmediagroup

func (*Bot) SendMessage

func (b *Bot) SendMessage(
	ctx context.Context,
	chatID ChatID,
	text string,
	options OptionsSendMessage,
) (result APIResponse[Message], err error)

SendMessage sends a message to the bot.

https://core.telegram.org/bots/api#sendmessage

func (*Bot) SendMessageDraft added in v0.12.1

func (b *Bot) SendMessageDraft(
	ctx context.Context,
	chatID ChatID,
	draftID int64,
	text string,
	options OptionsSendMessageDraft,
) (result APIResponse[bool], err error)

SendMessageDraft sends a message draft.

https://core.telegram.org/bots/api#sendmessagedraft

func (*Bot) SendPaidMedia added in v0.11.3

func (b *Bot) SendPaidMedia(
	ctx context.Context,
	chatID ChatID,
	starCount int,
	media []InputPaidMedia,
	options OptionsSendPaidMedia,
) (result APIResponse[Message], err error)

SendPaidMedia sends paid media.

https://core.telegram.org/bots/api#sendpaidmedia

func (*Bot) SendPhoto

func (b *Bot) SendPhoto(
	ctx context.Context,
	chatID ChatID,
	photo InputFile,
	options OptionsSendPhoto,
) (result APIResponse[Message], err error)

SendPhoto sends a photo.

https://core.telegram.org/bots/api#sendphoto

func (*Bot) SendPoll

func (b *Bot) SendPoll(
	ctx context.Context,
	chatID ChatID,
	question string,
	pollOptions []InputPollOption,
	options OptionsSendPoll,
) (result APIResponse[Message], err error)

SendPoll sends a poll.

https://core.telegram.org/bots/api#sendpoll

func (*Bot) SendRichMessage added in v0.13.5

func (b *Bot) SendRichMessage(
	ctx context.Context,
	chatID ChatID,
	richMessage InputRichMessage,
	options OptionsSendRichMessage,
) (result APIResponse[Message], err error)

SendRichMessage sends a rich message.

https://core.telegram.org/bots/api#sendrichmessage

func (*Bot) SendRichMessageDraft added in v0.13.5

func (b *Bot) SendRichMessageDraft(
	ctx context.Context,
	chatID ChatID,
	draftID int64,
	richMessage InputRichMessage,
	options OptionsSendRichMessageDraft,
) (result APIResponse[bool], err error)

SendRichMessageDraft streams a partial rich message to a user while the message is being generated.

https://core.telegram.org/bots/api#sendrichmessagedraft

func (*Bot) SendSticker

func (b *Bot) SendSticker(
	ctx context.Context,
	chatID ChatID,
	sticker InputFile,
	options OptionsSendSticker,
) (result APIResponse[Message], err error)

SendSticker sends a sticker.

https://core.telegram.org/bots/api#sendsticker

func (*Bot) SendVenue

func (b *Bot) SendVenue(
	ctx context.Context,
	chatID ChatID,
	latitude, longitude float32,
	title, address string,
	options OptionsSendVenue,
) (result APIResponse[Message], err error)

SendVenue sends venues.

https://core.telegram.org/bots/api#sendvenue

func (*Bot) SendVideo

func (b *Bot) SendVideo(
	ctx context.Context,
	chatID ChatID,
	video InputFile,
	options OptionsSendVideo,
) (result APIResponse[Message], err error)

SendVideo sends a video file.

https://core.telegram.org/bots/api#sendvideo

func (*Bot) SendVideoNote

func (b *Bot) SendVideoNote(
	ctx context.Context,
	chatID ChatID,
	videoNote InputFile,
	options OptionsSendVideoNote,
) (result APIResponse[Message], err error)

SendVideoNote sends a video note.

videoNote cannot be a remote http url (not supported yet)

https://core.telegram.org/bots/api#sendvideonote

func (*Bot) SendVoice

func (b *Bot) SendVoice(
	ctx context.Context,
	chatID ChatID,
	voice InputFile,
	options OptionsSendVoice,
) (result APIResponse[Message], err error)

SendVoice sends a voice file. (.ogg format only, will be played with Telegram itself))

https://core.telegram.org/bots/api#sendvoice

func (*Bot) SetBusinessAccountBio added in v0.11.17

func (b *Bot) SetBusinessAccountBio(
	ctx context.Context,
	businessConnectionID string,
	options OptionsSetBusinessAccountBio,
) (result APIResponse[bool], err error)

SetBusinessAccountBio changes the bio of a managed business account.

https://core.telegram.org/bots/api#setbusinessaccountbio

func (*Bot) SetBusinessAccountGiftSettings added in v0.11.17

func (b *Bot) SetBusinessAccountGiftSettings(
	ctx context.Context,
	businessConnectionID string,
	showGiftButton bool,
	acceptedGiftTypes AcceptedGiftTypes,
) (result APIResponse[bool], err error)

SetBusinessAccountGiftSettings changes the privacy settings pertaining to incoming gifts in a managed business account.

https://core.telegram.org/bots/api#setbusinessaccountgiftsettings

func (*Bot) SetBusinessAccountName added in v0.11.17

func (b *Bot) SetBusinessAccountName(
	ctx context.Context,
	businessConnectionID string,
	firstName string,
	options OptionsSetBusinessAccountName,
) (result APIResponse[bool], err error)

SetBusinessAccountName changes the first and last name of a managed business account.

https://core.telegram.org/bots/api#setbusinessaccountname

func (*Bot) SetBusinessAccountProfilePhoto added in v0.11.17

func (b *Bot) SetBusinessAccountProfilePhoto(
	ctx context.Context,
	businessConnectionID string,
	photo InputProfilePhoto,
	options OptionsSetBusinessAccountProfilePhoto,
) (result APIResponse[bool], err error)

SetBusinessAccountProfilePhoto changes the profile photo of a managed business account.

https://core.telegram.org/bots/api#setbusinessaccountprofilephoto

func (*Bot) SetBusinessAccountUsername added in v0.11.17

func (b *Bot) SetBusinessAccountUsername(
	ctx context.Context,
	businessConnectionID string,
	options OptionsSetBusinessAccountUsername,
) (result APIResponse[bool], err error)

SetBusinessAccountUsername changes the username of a managed business account.

https://core.telegram.org/bots/api#setbusinessaccountusername

func (*Bot) SetCallbackQueryHandler

func (b *Bot) SetCallbackQueryHandler(
	handler func(b *Bot, update Update, callbackQuery CallbackQuery),
)

SetCallbackQueryHandler sets a function for handling callback queries.

func (*Bot) SetChannelPostHandler

func (b *Bot) SetChannelPostHandler(
	handler func(b *Bot, update Update, channelPost Message, edited bool),
)

SetChannelPostHandler sets a function for handling channel posts.

func (*Bot) SetChatAdministratorCustomTitle

func (b *Bot) SetChatAdministratorCustomTitle(
	ctx context.Context,
	chatID ChatID,
	userID int64,
	customTitle string,
) (result APIResponse[bool], err error)

SetChatAdministratorCustomTitle sets chat administrator's custom title.

https://core.telegram.org/bots/api#setchatadministratorcustomtitle

func (*Bot) SetChatDescription

func (b *Bot) SetChatDescription(
	ctx context.Context,
	chatID ChatID,
	description string,
) (result APIResponse[bool], err error)

SetChatDescription sets a chat description.

https://core.telegram.org/bots/api#setchatdescription

func (*Bot) SetChatJoinRequestHandler

func (b *Bot) SetChatJoinRequestHandler(
	handler func(b *Bot, update Update, chatJoinRequest ChatJoinRequest),
)

SetChatJoinRequestHandler sets a function for handling chat join requests.

func (*Bot) SetChatMemberTag added in v0.13.1

func (b *Bot) SetChatMemberTag(
	ctx context.Context,
	chatID ChatID,
	userID int64,
	options OptionsSetChatMemberTag,
) (result APIResponse[bool], err error)

SetChatMemberTag sets a tag for a regular member in a group or a supergroup.

https://core.telegram.org/bots/api#setchatmembertag

func (*Bot) SetChatMemberUpdateHandler

func (b *Bot) SetChatMemberUpdateHandler(
	handler func(b *Bot, update Update, memberUpdated ChatMemberUpdated, isMine bool),
)

SetChatMemberUpdateHandler sets a function for handling chat member updates.

func (*Bot) SetChatMenuButton

func (b *Bot) SetChatMenuButton(
	ctx context.Context,
	options OptionsSetChatMenuButton,
) (result APIResponse[bool], err error)

SetChatMenuButton sets chat menu button.

https://core.telegram.org/bots/api#setchatmenubutton

func (*Bot) SetChatPermissions

func (b *Bot) SetChatPermissions(
	ctx context.Context,
	chatID ChatID,
	permissions ChatPermissions,
	options OptionsSetChatPermissions,
) (result APIResponse[bool], err error)

SetChatPermissions sets permissions of a chat.

https://core.telegram.org/bots/api#setchatpermissions

func (*Bot) SetChatPhoto

func (b *Bot) SetChatPhoto(
	ctx context.Context,
	chatID ChatID,
	photo InputFile,
) (result APIResponse[bool], err error)

SetChatPhoto sets a chat photo.

https://core.telegram.org/bots/api#setchatphoto

func (*Bot) SetChatStickerSet

func (b *Bot) SetChatStickerSet(
	ctx context.Context,
	chatID ChatID,
	stickerSetName string,
) (result APIResponse[bool], err error)

SetChatStickerSet sets a chat sticker set.

https://core.telegram.org/bots/api#setchatstickerset

func (*Bot) SetChatTitle

func (b *Bot) SetChatTitle(
	ctx context.Context,
	chatID ChatID,
	title string,
) (result APIResponse[bool], err error)

SetChatTitle sets a chat title.

https://core.telegram.org/bots/api#setchattitle

func (*Bot) SetChosenInlineResultHandler

func (b *Bot) SetChosenInlineResultHandler(
	handler func(b *Bot, update Update, chosenInlineResult ChosenInlineResult),
)

SetChosenInlineResultHandler sets a function for handling chosen inline results.

func (*Bot) SetCustomEmojiStickerSetThumbnail

func (b *Bot) SetCustomEmojiStickerSetThumbnail(
	ctx context.Context,
	name string,
	options OptionsSetCustomEmojiStickerSetThumbnail,
) (result APIResponse[bool], err error)

SetCustomEmojiStickerSetThumbnail sets the custom emoji sticker set's thumbnail.

https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail

func (*Bot) SetGameScore

func (b *Bot) SetGameScore(
	ctx context.Context,
	userID int64,
	score int,
	options OptionsSetGameScore,
) (result APIResponseMessageOrBool, err error)

SetGameScore sets score of a game.

https://core.telegram.org/bots/api#setgamescore

func (*Bot) SetInlineQueryHandler

func (b *Bot) SetInlineQueryHandler(
	handler func(b *Bot, update Update, inlineQuery InlineQuery),
)

SetInlineQueryHandler sets a function for handling inline queries.

func (*Bot) SetManagedBotAccessSettings added in v0.13.4

func (b *Bot) SetManagedBotAccessSettings(
	ctx context.Context,
	userID int64,
	isAccessRestricted bool,
	options OptionsSetManagedBotAccessSettings,
) (result APIResponse[bool], err error)

SetManagedBotAccessSettings changes the access settings of a managed bot.

https://core.telegram.org/bots/api#setmanagedbotaccesssettings

func (*Bot) SetMaxWorkers added in v0.13.2

func (b *Bot) SetMaxWorkers(n int)

SetMaxWorkers sets the maximum number of concurrent handler goroutines.

Default is 100. When all worker slots are occupied, new updates will block until a slot becomes available, providing natural backpressure.

func (*Bot) SetMediaGroupHandler added in v0.11.0

func (b *Bot) SetMediaGroupHandler(
	handler func(b *Bot, updates []Update, mediaGroupID string),
)

SetMediaGroupHandler sets a function for handling updates with media group id.

func (*Bot) SetMessageHandler

func (b *Bot) SetMessageHandler(
	handler func(b *Bot, update Update, message Message, edited bool),
)

SetMessageHandler sets a function for handling messages.

func (*Bot) SetMessageReaction

func (b *Bot) SetMessageReaction(
	ctx context.Context,
	chatID ChatID,
	messageID int64,
	options OptionsSetMessageReaction,
) (result APIResponse[bool], err error)

SetMessageReaction sets message reaction.

https://core.telegram.org/bots/api#setmessagereaction

func (*Bot) SetMyCommands

func (b *Bot) SetMyCommands(
	ctx context.Context,
	commands []BotCommand,
	options OptionsSetMyCommands,
) (result APIResponse[bool], err error)

SetMyCommands sets commands of this bot.

https://core.telegram.org/bots/api#setmycommands

func (*Bot) SetMyDefaultAdministratorRights

func (b *Bot) SetMyDefaultAdministratorRights(
	ctx context.Context,
	options OptionsSetMyDefaultAdministratorRights,
) (result APIResponse[bool], err error)

SetMyDefaultAdministratorRights sets my default administrator rights.

https://core.telegram.org/bots/api#setmydefaultadministratorrights

func (*Bot) SetMyDescription

func (b *Bot) SetMyDescription(
	ctx context.Context,
	options OptionsSetMyDescription,
) (result APIResponse[bool], err error)

SetMyDescription sets the bot's description.

https://core.telegram.org/bots/api#setmydescription

func (*Bot) SetMyName

func (b *Bot) SetMyName(
	ctx context.Context,
	name string,
	options OptionsSetMyName,
) (result APIResponse[bool], err error)

SetMyName changes the bot's name.

https://core.telegram.org/bots/api#setmyname

func (*Bot) SetMyProfilePhoto added in v0.12.2

func (b *Bot) SetMyProfilePhoto(
	ctx context.Context,
	photo InputProfilePhoto,
) (result APIResponse[bool], err error)

SetMyProfilePhoto sets the bot's profile photo.

https://core.telegram.org/bots/api#setmyprofilephoto

func (*Bot) SetMyShortDescription

func (b *Bot) SetMyShortDescription(
	ctx context.Context,
	options OptionsSetMyShortDescription,
) (result APIResponse[bool], err error)

SetMyShortDescription sets the bot's short description.

https://core.telegram.org/bots/api#setmyshortdescription

func (*Bot) SetNoMatchingCommandHandler

func (b *Bot) SetNoMatchingCommandHandler(
	handler func(b *Bot, update Update, cmd, args string),
)

SetNoMatchingCommandHandler sets a function for handling no-matching commands.

func (*Bot) SetPollAnswerHandler

func (b *Bot) SetPollAnswerHandler(
	handler func(b *Bot, update Update, pollAnswer PollAnswer),
)

SetPollAnswerHandler sets a function for handling poll answers.

func (*Bot) SetPollHandler

func (b *Bot) SetPollHandler(
	handler func(b *Bot, update Update, poll Poll),
)

SetPollHandler sets a function for handling polls.

func (*Bot) SetPreCheckoutQueryHandler

func (b *Bot) SetPreCheckoutQueryHandler(
	handler func(b *Bot, update Update, preCheckoutQuery PreCheckoutQuery),
)

SetPreCheckoutQueryHandler sets a function for handling pre-checkout queries.

func (*Bot) SetShippingQueryHandler

func (b *Bot) SetShippingQueryHandler(
	handler func(b *Bot, update Update, shippingQuery ShippingQuery),
)

SetShippingQueryHandler sets a function for handling shipping queries.

func (*Bot) SetStickerEmojiList

func (b *Bot) SetStickerEmojiList(
	ctx context.Context,
	sticker string,
	emojiList []string,
) (result APIResponse[bool], err error)

SetStickerEmojiList sets the emoji list of sticker set.

https://core.telegram.org/bots/api#setstickeremojilist

func (*Bot) SetStickerKeywords

func (b *Bot) SetStickerKeywords(
	ctx context.Context,
	sticker string,
	keywords []string,
) (result APIResponse[bool], err error)

SetStickerKeywords sets the keywords of sticker.

https://core.telegram.org/bots/api#setstickerkeywords

func (*Bot) SetStickerMaskPosition

func (b *Bot) SetStickerMaskPosition(
	ctx context.Context,
	sticker string,
	options OptionsSetStickerMaskPosition,
) (result APIResponse[bool], err error)

SetStickerMaskPosition sets mask position of sticker.

https://core.telegram.org/bots/api#setstickermaskposition

func (*Bot) SetStickerPositionInSet

func (b *Bot) SetStickerPositionInSet(
	ctx context.Context,
	sticker string,
	position int,
) (result APIResponse[bool], err error)

SetStickerPositionInSet sets sticker position in set.

https://core.telegram.org/bots/api#setstickerpositioninset

func (*Bot) SetStickerSetThumbnail

func (b *Bot) SetStickerSetThumbnail(
	ctx context.Context,
	name string,
	userID int64,
	format StickerFormat,
	options OptionsSetStickerSetThumbnail,
) (result APIResponse[bool], err error)

SetStickerSetThumbnail sets a thumbnail of a sticker set.

https://core.telegram.org/bots/api#setstickersetthumbnail

func (*Bot) SetStickerSetTitle

func (b *Bot) SetStickerSetTitle(
	ctx context.Context,
	name, title string,
) (result APIResponse[bool], err error)

SetStickerSetTitle sets the title of sticker set.

https://core.telegram.org/bots/api#setstickersettitle

func (*Bot) SetUserEmojiStatus added in v0.11.9

func (b *Bot) SetUserEmojiStatus(
	ctx context.Context,
	userID int64,
	options OptionsSetUserEmojiStatus,
) (result APIResponse[bool], err error)

SetUserEmojiStatus changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App.

https://core.telegram.org/bots/api#setuseremojistatus

func (*Bot) SetWebhook

func (b *Bot) SetWebhook(
	ctx context.Context,
	host string,
	port int,
	options OptionsSetWebhook,
) (result APIResponse[bool], err error)

SetWebhook sets various options for receiving incoming updates.

`port` should be one of: 443, 80, 88, or 8443.

https://core.telegram.org/bots/api#setwebhook

func (*Bot) StartPollingUpdates

func (b *Bot) StartPollingUpdates(
	updateOffset int64,
	interval int,
	updateHandler func(b *Bot, update Update, err error),
	optionalParams ...any,
)

StartPollingUpdates retrieves updates from API server constantly, synchronously.

`optionalParams` can be:

  • []AllowedUpdates

NOTE: Make sure webhook is deleted, or not registered before polling.

func (*Bot) StartWebhookServerAndWait

func (b *Bot) StartWebhookServerAndWait(
	certFilepath string,
	keyFilepath string,
	webhookHandler func(b *Bot, webhook Update, err error),
)

StartWebhookServerAndWait starts a webhook server(and waits forever). Function SetWebhook(host, port, certFilepath) should be called priorly to setup host, port, and certification file. Certification file(.pem) and a private key is needed. Incoming webhooks will be received through webhookHandler function.

https://core.telegram.org/bots/self-signed

func (*Bot) StopMessageLiveLocation

func (b *Bot) StopMessageLiveLocation(
	ctx context.Context,
	options OptionsStopMessageLiveLocation,
) (result APIResponseMessageOrBool, err error)

StopMessageLiveLocation stops live location of a message.

https://core.telegram.org/bots/api#stopmessagelivelocation

func (*Bot) StopPoll

func (b *Bot) StopPoll(
	ctx context.Context,
	chatID ChatID,
	messageID int64,
	options OptionsStopPoll,
) (result APIResponse[Poll], err error)

StopPoll stops a poll.

https://core.telegram.org/bots/api#stoppoll

func (*Bot) StopPollingUpdates

func (b *Bot) StopPollingUpdates()

StopPollingUpdates stops loop of polling updates

func (*Bot) TransferBusinessAccountStars added in v0.11.17

func (b *Bot) TransferBusinessAccountStars(
	ctx context.Context,
	businessConnectionID string,
	starCount int,
) (result APIResponse[bool], err error)

TransferBusinessAccountStars transfers Telegram Stars from the business account balance to the bot's balance.

https://core.telegram.org/bots/api#transferbusinessaccountstars

func (*Bot) TransferGift added in v0.11.17

func (b *Bot) TransferGift(
	ctx context.Context,
	businessConnectionID, ownedGiftID string,
	newOwnerChatID int64,
	options OptionsTransferGift,
) (result APIResponse[bool], err error)

TransferGift transfers an owned unique gift to another user.

https://core.telegram.org/bots/api#transfergift

func (*Bot) UnbanChatMember

func (b *Bot) UnbanChatMember(
	ctx context.Context,
	chatID ChatID,
	userID int64,
	onlyIfBanned bool,
) (result APIResponse[bool], err error)

UnbanChatMember unbans a chat member.

https://core.telegram.org/bots/api#unbanchatmember

func (*Bot) UnbanChatSenderChat

func (b *Bot) UnbanChatSenderChat(
	ctx context.Context,
	chatID ChatID,
	senderChatID int64,
) (result APIResponse[bool], err error)

UnbanChatSenderChat unbans a previously banned channel chat in a supergroup or a channel.

https://core.telegram.org/bots/api#unbanchatsenderchat

func (*Bot) UnhideGeneralForumTopic

func (b *Bot) UnhideGeneralForumTopic(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

UnhideGeneralForumTopic unhides the 'General' topic in a forum supergroup chat.

https://core.telegram.org/bots/api#unhidegeneralforumtopic

func (*Bot) UnpinAllChatMessages

func (b *Bot) UnpinAllChatMessages(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

UnpinAllChatMessages unpins all chat messages.

https://core.telegram.org/bots/api#unpinallchatmessages

func (*Bot) UnpinAllForumTopicMessages

func (b *Bot) UnpinAllForumTopicMessages(
	ctx context.Context,
	chatID ChatID,
	messageThreadID int64,
) (result APIResponse[bool], err error)

UnpinAllForumTopicMessages clears the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user.

https://core.telegram.org/bots/api#unpinallforumtopicmessages

func (*Bot) UnpinAllGeneralForumTopicMessages

func (b *Bot) UnpinAllGeneralForumTopicMessages(
	ctx context.Context,
	chatID ChatID,
) (result APIResponse[bool], err error)

UnpinAllGeneralForumTopicMessages clears the list of pinned messages in a General forum topic.

https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages

func (*Bot) UnpinChatMessage

func (b *Bot) UnpinChatMessage(
	ctx context.Context,
	chatID ChatID,
	options OptionsUnpinChatMessage,
) (result APIResponse[bool], err error)

UnpinChatMessage unpins a chat message.

https://core.telegram.org/bots/api#unpinchatmessage

func (*Bot) UpgradeGift added in v0.11.17

func (b *Bot) UpgradeGift(
	ctx context.Context,
	businessConnectionID, ownedGiftID string,
	options OptionsUpgradeGift,
) (result APIResponse[bool], err error)

UpgradeGift upgrades a given regular gift to a unique gift.

https://core.telegram.org/bots/api#upgradegift

func (*Bot) UploadStickerFile

func (b *Bot) UploadStickerFile(
	ctx context.Context,
	userID int64,
	sticker InputFile,
	stickerFormat StickerFormat,
) (result APIResponse[File], err error)

UploadStickerFile uploads a sticker file.

https://core.telegram.org/bots/api#uploadstickerfile

func (*Bot) VerifyChat added in v0.11.12

func (b *Bot) VerifyChat(
	ctx context.Context,
	chatID ChatID,
	options OptionsVerifyChat,
) (result APIResponse[bool], err error)

VerifyChat verifies a chat.

https://core.telegram.org/bots/api#verifychat

func (*Bot) VerifyUser added in v0.11.12

func (b *Bot) VerifyUser(
	ctx context.Context,
	userID int64,
	options OptionsVerifyUser,
) (result APIResponse[bool], err error)

VerifyUser verifies a user.

https://core.telegram.org/bots/api#verifyuser

type BotAccessSettings added in v0.13.4

type BotAccessSettings struct {
	IsAccessRestricted bool   `json:"is_access_restricted"`
	AddedUsers         []User `json:"added_users,omitempty"`
}

BotAccessSettings is a struct which describes the access settings of a bot.

https://core.telegram.org/bots/api#botaccesssettings

type BotCommand

type BotCommand struct {
	Command     string `json:"command"`
	Description string `json:"description"`
}

BotCommand is a struct of a bot command

https://core.telegram.org/bots/api#botcommand

type BotCommandScopeAllChatAdministrators

type BotCommandScopeAllChatAdministrators BotCommandScopeDefault // = "all_chat_administrators"

BotCommandScopeAllChatAdministrators represents the bot command scopes

https://core.telegram.org/bots/api#botcommandscopeallchatadministrators

type BotCommandScopeAllGroupChats

type BotCommandScopeAllGroupChats BotCommandScopeDefault // = "all_group_chats"

BotCommandScopeAllGroupChats represents the bot command scopes

https://core.telegram.org/bots/api#botcommandscopeallgroupchats

type BotCommandScopeAllPrivateChats

type BotCommandScopeAllPrivateChats BotCommandScopeDefault // = "all_private_chats"

BotCommandScopeAllPrivateChats represents the bot command scopes

https://core.telegram.org/bots/api#botcommandscopeallprivatechats

type BotCommandScopeChat

type BotCommandScopeChat struct {
	BotCommandScopeDefault        // = "chat"
	ChatID                 ChatID `json:"chat_id"`
}

BotCommandScopeChat represents the bot command scopes

https://core.telegram.org/bots/api#botcommandscopechat

type BotCommandScopeChatAdministrators

type BotCommandScopeChatAdministrators struct {
	BotCommandScopeDefault        // = "chat_administrators"
	ChatID                 ChatID `json:"chat_id"`
}

BotCommandScopeChatAdministrators represents the bot command scopes

https://core.telegram.org/bots/api#botcommandscopechatadministrators

type BotCommandScopeChatMember

type BotCommandScopeChatMember struct {
	BotCommandScopeDefault        // = "chat_member"
	ChatID                 ChatID `json:"chat_id"`
	UserID                 int64  `json:"user_id"`
}

BotCommandScopeChatMember represents the bot command scopes

https://core.telegram.org/bots/api#botcommandscopechatmember

type BotCommandScopeDefault

type BotCommandScopeDefault struct {
	Type BotCommandScopeType `json:"type"` // = "default"
}

BotCommandScopeDefault represents the bot command scopes

https://core.telegram.org/bots/api#botcommandscopedefault

type BotCommandScopeType

type BotCommandScopeType string

BotCommandScopeType type

https://core.telegram.org/bots/api#botcommandscope

const (
	BotCommandScopeTypeDefault               BotCommandScopeType = "default"
	BotCommandScopeTypeAllPrivateChats       BotCommandScopeType = "all_private_chats"
	BotCommandScopeTypeAllGroupChats         BotCommandScopeType = "all_group_chats"
	BotCommandScopeTypeAllChatAdministrators BotCommandScopeType = "all_chat_administrators"
	BotCommandScopeTypeChat                  BotCommandScopeType = "chat"
	BotCommandScopeTypeChatAdministrators    BotCommandScopeType = "chat_administrators"
	BotCommandScopeTypeChatMember            BotCommandScopeType = "chat_member"
)

BotCommandScopeType constants

type BotDescription

type BotDescription struct {
	Description string `json:"description"`
}

BotDescription is a struct of a bot's description

https://core.telegram.org/bots/api#botdescription

type BotName

type BotName struct {
	Name string `json:"name"`
}

BotName is a struct of a bot's name

https://core.telegram.org/bots/api#botname

type BotShortDescription

type BotShortDescription struct {
	ShortDescription string `json:"short_description"`
}

BotShortDescription is a struct of a bot's short description

https://core.telegram.org/bots/api#botshortdescription

type BusinessBotRights added in v0.11.17

type BusinessBotRights struct {
	CanReply                   *bool `json:"can_reply,omitempty"`
	CanReadMessages            *bool `json:"can_read_messages,omitempty"`
	CanDeleteOutgoingMessages  *bool `json:"can_delete_outgoing_messages,omitempty"`
	CanDeleteAllMessages       *bool `json:"can_delete_all_messages,omitempty"`
	CanEditName                *bool `json:"can_edit_name,omitempty"`
	CanEditBio                 *bool `json:"can_edit_bio,omitempty"`
	CanEditProfilePhoto        *bool `json:"can_edit_profile_photo,omitempty"`
	CanEditUsername            *bool `json:"can_edit_username,omitempty"`
	CanChangeGiftSettings      *bool `json:"can_change_gift_settings,omitempty"`
	CanViewGiftsAndStars       *bool `json:"can_view_gifts_and_stars,omitempty"`
	CanConvertGiftsToStars     *bool `json:"can_convert_gifts_to_stars,omitempty"`
	CanTransferAndUpgradeGifts *bool `json:"can_transfer_and_upgrade_gifts,omitempty"`
	CanTransferStars           *bool `json:"can_transfer_stars,omitempty"`
	CanManageStories           *bool `json:"can_manage_stories,omitempty"`
}

BusinessBotRights is a struct for business bot rights

https://core.telegram.org/bots/api#businessbotrights

type BusinessConnection added in v0.10.6

type BusinessConnection struct {
	ID         string             `json:"id"`
	User       User               `json:"user"`
	UserChatID int64              `json:"user_chat_id"`
	Date       int                `json:"date"`
	CanReply   bool               `json:"can_reply"`
	Rights     *BusinessBotRights `json:"rights,omitempty"`
	IsEnabled  bool               `json:"is_enabled"`
}

BusinessConnection is a struct for a business connection

https://core.telegram.org/bots/api#businessconnection

type BusinessIntro added in v0.10.6

type BusinessIntro struct {
	Title   *string  `json:"title,omitempty"`
	Message *string  `json:"message,omitempty"`
	Sticker *Sticker `json:"sticker,omitempty"`
}

BusinessIntro is a struct of introduction of a business

https://core.telegram.org/bots/api#businessintro

type BusinessLocation added in v0.10.6

type BusinessLocation struct {
	Address  string    `json:"address"`
	Location *Location `json:"location,omitempty"`
}

BusinessLocation is a struct of a business location

https://core.telegram.org/bots/api#businesslocation

type BusinessMessagesDeleted added in v0.10.6

type BusinessMessagesDeleted struct {
	BusinessConnectionID string  `json:"business_connection_id"`
	Chat                 Chat    `json:"chat"`
	MessageIDs           []int64 `json:"message_ids"`
}

BusinessMessagesDeleted is a struct sent when messages are deleted from connected business accounts

https://core.telegram.org/bots/api#businessmessagesdeleted

type BusinessOpeningHours added in v0.10.6

type BusinessOpeningHours struct {
	TimeZoneName string                         `json:"time_zone_name"`
	OpeningHours []BusinessOpeningHoursInterval `json:"opening_hours"`
}

BusinessOpeningHours is a struct of an opening hours of business

https://core.telegram.org/bots/api#businessopeninghours

type BusinessOpeningHoursInterval added in v0.10.6

type BusinessOpeningHoursInterval struct {
	OpeningMinute int `json:"opening_minute"`
	ClosingMinute int `json:"closing_minute"`
}

BusinessOpeningHoursInterval is a struct of an opening hours interval of business

https://core.telegram.org/bots/api#businessopeninghoursinterval

type CallbackGame

type CallbackGame struct {
}

CallbackGame is for callback of games

https://core.telegram.org/bots/api#callbackgame

type CallbackQuery

type CallbackQuery struct {
	ID              string                    `json:"id"`
	From            User                      `json:"from"`
	Message         *MaybeInaccessibleMessage `json:"message,omitempty"`
	InlineMessageID *string                   `json:"inline_message_id,omitempty"`
	ChatInstance    string                    `json:"chat_instance"`
	Data            *string                   `json:"data,omitempty"`
	GameShortName   *string                   `json:"game_short_name,omitempty"`
}

CallbackQuery is a struct for a callback query

https://core.telegram.org/bots/api#callbackquery

type Chat

type Chat struct {
	ID               int64    `json:"id"`
	Type             ChatType `json:"type"`
	Title            *string  `json:"title,omitempty"`
	Username         *string  `json:"username,omitempty"`
	FirstName        *string  `json:"first_name,omitempty"`
	LastName         *string  `json:"last_name,omitempty"`
	IsForum          *bool    `json:"is_forum,omitempty"`
	IsDirectMessages *bool    `json:"is_direct_messages,omitempty"`
}

Chat is a struct of a chat

https://core.telegram.org/bots/api#chat

type ChatAction

type ChatAction string

ChatAction is a type of action in chats

const (
	ChatActionTyping          ChatAction = "typing"
	ChatActionUploadPhoto     ChatAction = "upload_photo"
	ChatActionRecordVideo     ChatAction = "record_video"
	ChatActionUploadVideo     ChatAction = "upload_video"
	ChatActionRecordVoice     ChatAction = "record_voice"
	ChatActionUploadVoice     ChatAction = "upload_voice"
	ChatActionUploadDocument  ChatAction = "upload_document"
	ChatActionChooseSticker   ChatAction = "choose_sticker"
	ChatActionFindLocation    ChatAction = "find_location"
	ChatActionRecordVideoNote ChatAction = "record_video_note"
	ChatActionUploadVideoNote ChatAction = "upload_video_note"
)

ChatAction strings

type ChatAdministratorRights

type ChatAdministratorRights struct {
	IsAnonymous             bool  `json:"is_anonymous"`
	CanManageChat           bool  `json:"can_manage_chat"`
	CanDeleteMessages       bool  `json:"can_delete_messages"`
	CanManageVideoChats     bool  `json:"can_manage_video_chats"`
	CanRestrictMembers      bool  `json:"can_restrict_members"`
	CanPromoteMembers       bool  `json:"can_promote_members"`
	CanChangeInfo           bool  `json:"can_change_info"`
	CanInviteUsers          bool  `json:"can_invite_users"`
	CanPostStories          bool  `json:"can_post_stories"`
	CanEditStories          bool  `json:"can_edit_stories"`
	CanDeleteStories        bool  `json:"can_delete_stories"`
	CanPostMessages         *bool `json:"can_post_messages,omitempty"`
	CanEditMessages         *bool `json:"can_edit_messages,omitempty"`
	CanPinMessages          *bool `json:"can_pin_messages,omitempty"`
	CanManageTopics         *bool `json:"can_manage_topics,omitempty"`
	CanManageDirectMessages *bool `json:"can_manage_direct_messages,omitempty"`
	CanManageTags           *bool `json:"can_manage_tags,omitempty"`
}

ChatAdministratorRights is a struct of chat administrator's rights

NOTE: Can be generated with NewChatAdministratorRights() function in types_helper.go

https://core.telegram.org/bots/api#chatadministratorrights

func NewChatAdministratorRights added in v0.10.7

func NewChatAdministratorRights(
	isAnonymous,
	canManageChat,
	canDeleteMessages,
	canManageVideoChats,
	canRestrictMembers,
	canPromoteMembers,
	canChangeInfo,
	canInviteUsers,
	canPostStories,
	canEditStories,
	canDeleteStories bool,
) ChatAdministratorRights

NewChatAdministratorRights returns a new ChatAdministratorRights.

func (ChatAdministratorRights) SetCanEditMessages added in v0.10.7

func (r ChatAdministratorRights) SetCanEditMessages(canEditMessages bool) ChatAdministratorRights

SetCanEditMessages sets the `can_edit_messages` value of ChatAdministratorRights.

func (ChatAdministratorRights) SetCanManageTopics added in v0.10.7

func (r ChatAdministratorRights) SetCanManageTopics(canManageTopics bool) ChatAdministratorRights

SetCanManageTopics sets the `can_manage_topics` value of ChatAdministratorRights.

func (ChatAdministratorRights) SetCanPinMessages added in v0.10.7

func (r ChatAdministratorRights) SetCanPinMessages(canPinMessages bool) ChatAdministratorRights

SetCanPinMessages sets the `can_pin_messages` value of ChatAdministratorRights.

func (ChatAdministratorRights) SetCanPostMessages added in v0.10.7

func (r ChatAdministratorRights) SetCanPostMessages(canPostMessages bool) ChatAdministratorRights

SetCanPostMessages sets the `can_post_messages` value of ChatAdministratorRights.

type ChatBackground added in v0.10.8

type ChatBackground struct {
	Type BackgroundType `json:"type"`
}

ChatBackground is a struct for chat background

https://core.telegram.org/bots/api#chatbackground

type ChatBoost

type ChatBoost struct {
	BoostID        string          `json:"boost_id"`
	AddDate        int             `json:"add_date"`
	ExpirationDate int             `json:"expiration_date"`
	Source         ChatBoostSource `json:"source"`
}

ChatBoost is a struct for a chat boost

https://core.telegram.org/bots/api#chatboost

type ChatBoostAdded added in v0.10.4

type ChatBoostAdded struct {
	BoostCount int `json:"boost_count"`
}

ChatBoostAdded is a struct of an added boost to a chat

https://core.telegram.org/bots/api#chatboostadded

type ChatBoostRemoved

type ChatBoostRemoved struct {
	Chat       Chat            `json:"chat"`
	BoostID    string          `json:"boost_id"`
	RemoveDate int             `json:"remove_date"`
	Source     ChatBoostSource `json:"source"`
}

ChatBoostRemoved is a struct for a removed boost

https://core.telegram.org/bots/api#chatboostremoved

type ChatBoostSource

type ChatBoostSource struct {
	Source string `json:"source"`

	User *User `json:"user,omitempty"`

	// source == "giveaway"
	GiveawayMessageID *int64 `json:"giveaway_message_id,omitempty"`
	PrizeStarCount    *int   `json:"prize_star_count,omitempty"`
	IsUnclaimed       *bool  `json:"is_unclaimed,omitempty"`
}

ChatBoostSource is a struct for sources of chat boosts

https://core.telegram.org/bots/api#chatboostsource

func NewChatBoostSourceGiftCode

func NewChatBoostSourceGiftCode(user User) ChatBoostSource

NewChatBoostSourceGiftCode returns a new ChatBoostSourceGiftCode.

func NewChatBoostSourceGiveaway

func NewChatBoostSourceGiveaway(
	giveawayMessageID int64,
	user *User,
	isUnclaimed bool,
) ChatBoostSource

NewChatBoostSourceGiveaway returns a new ChatBoostSourceGiveaway.

func NewChatBoostSourcePremium

func NewChatBoostSourcePremium(user User) ChatBoostSource

NewChatBoostSourcePremium returns a new ChatBoostSourcePremium.

type ChatBoostUpdated

type ChatBoostUpdated struct {
	Chat  Chat      `json:"chat"`
	Boost ChatBoost `json:"boost"`
}

ChatBoostUpdated is a struct for an added or changed boost

https://core.telegram.org/bots/api#chatboostupdated

type ChatFullInfo added in v0.10.8

type ChatFullInfo struct {
	ID                                 int64                 `json:"id"`
	Type                               ChatType              `json:"type"`
	Title                              *string               `json:"title,omitempty"`
	Username                           *string               `json:"username,omitempty"`
	FirstName                          *string               `json:"first_name,omitempty"`
	LastName                           *string               `json:"last_name,omitempty"`
	IsForum                            *bool                 `json:"is_forum,omitempty"`
	IsDirectMessages                   *bool                 `json:"is_direct_messages,omitempty"`
	AccentColorID                      int                   `json:"accent_color_id"`
	MaxReactionCount                   int                   `json:"max_reaction_count"`
	Photo                              *ChatPhoto            `json:"photo,omitempty"`
	ActiveUsernames                    []string              `json:"active_usernames,omitempty"`
	Birthdate                          *Birthdate            `json:"birthdate,omitempty"`
	BusinessIntro                      *BusinessIntro        `json:"business_intro,omitempty"`
	BusinessLocation                   *BusinessLocation     `json:"business_location,omitempty"`
	BusinessOpeningHours               *BusinessOpeningHours `json:"business_opening_hours,omitempty"`
	PersonalChat                       *Chat                 `json:"personal_chat,omitempty"`
	ParentChat                         *Chat                 `json:"parent_chat,omitempty"`
	AvailableReactions                 []ReactionType        `json:"available_reactions,omitempty"`
	BackgroundCustomEmojiID            *string               `json:"background_custom_emoji_id,omitempty"`
	ProfileAccentColorID               *int                  `json:"profile_accent_color_id,omitempty"`
	ProfileBackgroundCustomEmojiID     *string               `json:"profile_background_custom_emoji_id,omitempty"`
	EmojiStatusCustomEmojiID           *string               `json:"emoji_status_custom_emoji_id,omitempty"`
	EmojiStatusExpirationDate          *int                  `json:"emoji_status_expiration_date,omitempty"`
	Bio                                *string               `json:"bio,omitempty"`
	HasPrivateForwards                 *bool                 `json:"has_private_forwards,omitempty"`
	HasRestrictedVoiceAndVideoMessages *bool                 `json:"has_restricted_voice_and_video_messages,omitempty"`
	JoinToSendMessages                 *bool                 `json:"join_to_send_messages,omitempty"`
	JoinByRequest                      *bool                 `json:"join_by_request,omitempty"`
	Description                        *string               `json:"description,omitempty"`
	InviteLink                         *string               `json:"invite_link,omitempty"`
	PinnedMessage                      *Message              `json:"pinned_message,omitempty"`
	Permissions                        *ChatPermissions      `json:"permissions,omitempty"`
	AcceptedGiftTypes                  *AcceptedGiftTypes    `json:"accepted_gift_types,omitempty"`
	CanSendPaidMedia                   *bool                 `json:"can_send_paid_media,omitempty"`
	SlowModeDelay                      *int                  `json:"slow_mode_delay,omitempty"`
	UnrestrictBoostCount               *int                  `json:"unrestrict_boost_count,omitempty"`
	MessageAutoDeleteTime              *int                  `json:"message_auto_delete_time,omitempty"`
	HasAggressiveAntiSpamEnabled       *bool                 `json:"has_aggressive_anti_spam_enabled,omitempty"`
	HasHiddenMembers                   *bool                 `json:"has_hidden_members,omitempty"`
	HasProtectedContent                *bool                 `json:"has_protected_content,omitempty"`
	HasVisibleHistory                  *bool                 `json:"has_visible_history,omitempty"`
	StickerSetName                     *string               `json:"sticker_set_name,omitempty"`
	CanSetStickerSet                   *bool                 `json:"can_set_sticker_set,omitempty"`
	CustomEmojiStickerSetName          *string               `json:"custom_emoji_sticker_set_name,omitempty"`
	LinkedChatID                       *int64                `json:"linked_chat_id,omitempty"`
	Location                           *ChatLocation         `json:"location,omitempty"`
	Rating                             *UserRating           `json:"rating,omitempty"`
	FirstProfileAudio                  *Audio                `json:"first_profile_audio,omitempty"`
	UniqueGiftColors                   *UniqueGiftColors     `json:"unique_gift_colors,omitempty"`
	PaidMessageStarCount               *int                  `json:"paid_message_star_count,omitempty"`
	GuardBot                           *User                 `json:"guard_bot,omitempty"`
}

ChatFullInfo is a struct for a full info of chat

https://core.telegram.org/bots/api#chatfullinfo

type ChatID

type ChatID any

ChatID can be `Message.Chat.Id`, or target channel name (in string, eg. "@channelusername")

type ChatInviteLink struct {
	InviteLink              string  `json:"invite_link"`
	Creator                 User    `json:"creator"`
	CreatesJoinRequest      bool    `json:"creates_join_request"`
	IsPrimary               bool    `json:"is_primary"`
	IsRevoked               bool    `json:"is_revoked"`
	Name                    *string `json:"name,omitempty"`
	ExpireDate              *int    `json:"expire_date,omitempty"`
	MemberLimit             *int    `json:"member_limit,omitempty"`
	PendingJoinRequestCount *int    `json:"pending_join_request_count,omitempty"`
}

ChatInviteLink is a struct of an invite link for a chat

https://core.telegram.org/bots/api#chatinvitelink

type ChatJoinRequest

type ChatJoinRequest struct {
	Chat       Chat            `json:"chat"`
	From       User            `json:"from"`
	UserChatID int64           `json:"user_chat_id"`
	Date       int             `json:"date"`
	Bio        *string         `json:"bio,omitempty"`
	InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
	QueryID    *string         `json:"query_id,omitempty"`
}

ChatJoinRequest is a struct of chat join request

https://core.telegram.org/bots/api#chatjoinrequest

type ChatLocation

type ChatLocation struct {
	Location Location `json:"location"`
	Address  string   `json:"address"`
}

ChatLocation is a struct of chat location

https://core.telegram.org/bots/api#chatlocation

type ChatMember

type ChatMember struct {
	Status                ChatMemberStatus `json:"status"`
	User                  User             `json:"user"`
	IsAnonymous           *bool            `json:"is_anonymous,omitempty"`              // owner and administrators only
	CustomTitle           *string          `json:"custom_title,omitempty"`              // owner and administrators only
	CanBeEdited           *bool            `json:"can_be_edited,omitempty"`             // administrators only
	CanManageChat         *bool            `json:"can_manage_chat,omitempty"`           // administrators only
	CanPostMessages       *bool            `json:"can_post_messages,omitempty"`         // administrators only
	CanEditMessages       *bool            `json:"can_edit_messages,omitempty"`         // administrators only
	CanDeleteMessages     *bool            `json:"can_delete_messages,omitempty"`       // administrators only
	CanManageVideoChats   *bool            `json:"can_manage_video_chats,omitempty"`    // administrators only
	CanRestrictMembers    *bool            `json:"can_restrict_members,omitempty"`      // administrators only
	CanPromoteMembers     *bool            `json:"can_promote_members,omitempty"`       // administrators only
	CanChangeInfo         *bool            `json:"can_change_info,omitempty"`           // administrators and restricted only
	CanInviteUsers        *bool            `json:"can_invite_users,omitempty"`          // administrators and restricted only
	CanPinMessages        *bool            `json:"can_pin_messages,omitempty"`          // administrators and restricted only
	CanManageTopics       *bool            `json:"can_manage_topics,omitempty"`         // administrators and restricted only
	IsMember              *bool            `json:"is_member,omitempty"`                 // restricted only
	CanSendMessages       *bool            `json:"can_send_messages,omitempty"`         // restricted only
	CanSendMediaMessages  *bool            `json:"can_send_media_messages,omitempty"`   // restricted only
	CanSendPolls          *bool            `json:"can_send_polls,omitempty"`            // restricted only
	CanSendOtherMessages  *bool            `json:"can_send_other_messages,omitempty"`   // restricted only
	CanAddWebPagePreviews *bool            `json:"can_add_web_page_previews,omitempty"` // restricted only
	UntilDate             *int             `json:"until_date,omitempty"`                // restricted and kicked only
}

ChatMember is a struct of a chat member

https://core.telegram.org/bots/api#chatmember

type ChatMemberAdministrator

type ChatMemberAdministrator struct {
	Status                  string  `json:"status"` // = "administrator"
	User                    User    `json:"user"`
	CanBeEdited             bool    `json:"can_be_edited"`
	IsAnonymous             bool    `json:"is_anonymous"`
	CanManageChat           bool    `json:"can_manage_chat"`
	CanDeleteMessages       bool    `json:"can_delete_messages"`
	CanManageVideoChats     bool    `json:"can_manage_video_chats"`
	CanRestrictMembers      bool    `json:"can_restrict_members"`
	CanPromoteMembers       bool    `json:"can_promote_members"`
	CanChangeInfo           bool    `json:"can_change_info"`
	CanInviteUsers          bool    `json:"can_invite_users"`
	CanPostStories          bool    `json:"can_post_stories"`
	CanEditStories          bool    `json:"can_edit_stories"`
	CanDeleteStories        bool    `json:"can_delete_stories"`
	CanPostMessages         *bool   `json:"can_post_messages,omitempty"`
	CanEditMessages         *bool   `json:"can_edit_messages,omitempty"`
	CanPinMessages          *bool   `json:"can_pin_messages,omitempty"`
	CanManageTopics         *bool   `json:"can_manage_topics,omitempty"`
	CanManageDirectMessages *bool   `json:"can_manage_direct_messages,omitempty"`
	CanManageTags           *bool   `json:"can_manage_tags,omitempty"`
	CustomTitle             *string `json:"custom_title,omitempty"`
}

ChatMemberAdministrator is a struct of a chat member who is an administrator.

https://core.telegram.org/bots/api#chatmemberadministrator

type ChatMemberBanned

type ChatMemberBanned struct {
	Status    string `json:"status"` // = "kicked"
	User      User   `json:"user"`
	UntilDate int    `json:"until_date"`
}

ChatMemberBanned is a struct of a chat member who is banned.

https://core.telegram.org/bots/api#chatmemberbanned

type ChatMemberLeft

type ChatMemberLeft struct {
	Status string `json:"status"` // = "left"
	User   User   `json:"user"`
}

ChatMemberLeft is a struct of a chat member who left.

https://core.telegram.org/bots/api#chatmemberleft

type ChatMemberMember

type ChatMemberMember struct {
	Status    string  `json:"status"` // = "member"
	Tag       *string `json:"tag,omitempty"`
	User      User    `json:"user"`
	UntilDate int     `json:"until_date"`
}

ChatMemberMember is a struct of a chat member.

https://core.telegram.org/bots/api#chatmembermember

type ChatMemberOwner

type ChatMemberOwner struct {
	Status      string  `json:"status"` // = "creator"
	User        User    `json:"user"`
	IsAnonymous bool    `json:"is_anonymous"`
	CustomTitle *string `json:"custom_title,omitempty"`
}

ChatMemberOwner is a struct of a chat member who is an owner.

https://core.telegram.org/bots/api#chatmemberowner

type ChatMemberRestricted

type ChatMemberRestricted struct {
	Status                string  `json:"status"` // = "restricted"
	Tag                   *string `json:"tag,omitempty"`
	User                  User    `json:"user"`
	IsMember              bool    `json:"is_member"`
	CanSendMessages       bool    `json:"can_send_messages"`
	CanSendAudios         bool    `json:"can_send_audios"`
	CanSendDocuments      bool    `json:"can_send_documents"`
	CanSendPhotos         bool    `json:"can_send_photos"`
	CanSendVideos         bool    `json:"can_send_videos"`
	CanSendVideoNotes     bool    `json:"can_send_video_notes"`
	CanSendVoiceNotes     bool    `json:"can_send_voice_notes"`
	CanSendPolls          bool    `json:"can_send_polls"`
	CanSendOtherMessages  bool    `json:"can_send_other_messages"`
	CanAddWebPagePreviews bool    `json:"can_add_web_page_previews"`
	CanReactToMessages    bool    `json:"can_react_to_messages"`
	CanEditTag            bool    `json:"can_edit_tag"`
	CanChangeInfo         bool    `json:"can_change_info"`
	CanInviteUsers        bool    `json:"can_invite_users"`
	CanPinMessages        bool    `json:"can_pin_messages"`
	CanManageTopics       bool    `json:"can_manage_topics"`
	UntilDate             int     `json:"until_date"`
}

ChatMemberRestricted is a struct of chat member who is restricted

https://core.telegram.org/bots/api#chatmemberrestricted

type ChatMemberStatus

type ChatMemberStatus string

ChatMemberStatus is a status of chat member

NOTE: When the API adds a new chat member status, add its string to the const block below, add any new fields to the flat ChatMember struct, and add a corresponding ChatMemberXXX variant struct.

https://core.telegram.org/bots/api#chatmember

const (
	ChatMemberStatusCreator       ChatMemberStatus = "creator"
	ChatMemberStatusAdministrator ChatMemberStatus = "administrator"
	ChatMemberStatusMember        ChatMemberStatus = "member"
	ChatMemberStatusRestricted    ChatMemberStatus = "restricted"
	ChatMemberStatusLeft          ChatMemberStatus = "left"
	ChatMemberStatusBanned        ChatMemberStatus = "kicked"
)

ChatMemberStatus strings

type ChatMemberUpdated

type ChatMemberUpdated struct {
	Chat                    Chat            `json:"chat"`
	From                    User            `json:"from"`
	Date                    int             `json:"date"`
	OldChatMember           ChatMember      `json:"old_chat_member"`
	NewChatMember           ChatMember      `json:"new_chat_member"`
	InviteLink              *ChatInviteLink `json:"invite_link,omitempty"`
	ViaJoinRequest          *bool           `json:"via_join_request,omitempty"`
	ViaChatFolderInviteLink *bool           `json:"via_chat_folder_invite_link,omitempty"`
}

ChatMemberUpdated is a struct of an updated chat member

https://core.telegram.org/bots/api#chatmemberupdated

type ChatOwnerChanged added in v0.12.2

type ChatOwnerChanged struct {
	NewOwner User `json:"new_owner"`
}

ChatOwnerChanged is a struct for a changed chat owner.

https://core.telegram.org/bots/api#chatownerchanged

type ChatOwnerLeft added in v0.12.2

type ChatOwnerLeft struct {
	NewOwner *User `json:"new_owner,omitempty"`
}

ChatOwnerLeft is a struct for a left chat owner.

https://core.telegram.org/bots/api#chatownerleft

type ChatPermissions

type ChatPermissions struct {
	CanSendMessages       *bool `json:"can_send_messages,omitempty"`
	CanSendAudios         *bool `json:"can_send_audios,omitempty"`
	CanSendDocuments      *bool `json:"can_send_documents,omitempty"`
	CanSendPhotos         *bool `json:"can_send_photos,omitempty"`
	CanSendVideos         *bool `json:"can_send_videos,omitempty"`
	CanSendVideoNotes     *bool `json:"can_send_video_notes,omitempty"`
	CanSendVoiceNotes     *bool `json:"can_send_voice_notes,omitempty"`
	CanSendPolls          *bool `json:"can_send_polls,omitempty"`
	CanSendOtherMessages  *bool `json:"can_send_other_messages,omitempty"`
	CanAddWebPagePreviews *bool `json:"can_add_web_page_previews,omitempty"`
	CanReactToMessages    *bool `json:"can_react_to_messages,omitempty"`
	CanEditTag            *bool `json:"can_edit_tag,omitempty"`
	CanChangeInfo         *bool `json:"can_change_info,omitempty"`
	CanInviteUsers        *bool `json:"can_invite_users,omitempty"`
	CanPinMessages        *bool `json:"can_pin_messages,omitempty"`
	CanManageTopics       *bool `json:"can_manage_topics,omitempty"`
}

ChatPermissions is a struct of chat permissions

NOTE: Can be generated with NewChatPermissions() function in types_helper.go

https://core.telegram.org/bots/api#chatpermissions

func NewChatPermissions added in v0.10.7

func NewChatPermissions() ChatPermissions

NewChatPermissions returns a new ChatPermissions. (all permissions are false)

func (ChatPermissions) SetCanAddWebPagePreviews added in v0.10.7

func (p ChatPermissions) SetCanAddWebPagePreviews(can bool) ChatPermissions

SetCanAddWebPagePreviews sets the `can_add_web_page_previews` value of ChatPermissions.

func (ChatPermissions) SetCanChangeInfo added in v0.10.7

func (p ChatPermissions) SetCanChangeInfo(can bool) ChatPermissions

SetCanChangeInfo sets the `can_change_info` value of ChatPermissions.

func (ChatPermissions) SetCanInviteUsers added in v0.10.7

func (p ChatPermissions) SetCanInviteUsers(can bool) ChatPermissions

SetCanInviteUsers sets the `can_invite_users` value of ChatPermissions.

func (ChatPermissions) SetCanManageTopics added in v0.10.7

func (p ChatPermissions) SetCanManageTopics(can bool) ChatPermissions

SetCanManageTopics sets the `can_manage_topics` value of ChatPermissions.

func (ChatPermissions) SetCanPinMessages added in v0.10.7

func (p ChatPermissions) SetCanPinMessages(can bool) ChatPermissions

SetCanPinMessages sets the `can_pin_messages` value of ChatPermissions.

func (ChatPermissions) SetCanSendAudios added in v0.10.7

func (p ChatPermissions) SetCanSendAudios(can bool) ChatPermissions

SetCanSendAudios sets the `can_send_audios` value of ChatPermissions.

func (ChatPermissions) SetCanSendDocuments added in v0.10.7

func (p ChatPermissions) SetCanSendDocuments(can bool) ChatPermissions

SetCanSendDocuments sets the `can_send_documents` value of ChatPermissions.

func (ChatPermissions) SetCanSendMessages added in v0.10.7

func (p ChatPermissions) SetCanSendMessages(can bool) ChatPermissions

SetCanSendMessages sets the `can_send_messages` value of ChatPermissions.

func (ChatPermissions) SetCanSendOtherMessages added in v0.10.7

func (p ChatPermissions) SetCanSendOtherMessages(can bool) ChatPermissions

SetCanSendOtherMessages sets the `can_send_other_messages` value of ChatPermissions.

func (ChatPermissions) SetCanSendPhotos added in v0.10.7

func (p ChatPermissions) SetCanSendPhotos(can bool) ChatPermissions

SetCanSendPhotos sets the `can_send_photos` value of ChatPermissions.

func (ChatPermissions) SetCanSendPolls added in v0.10.7

func (p ChatPermissions) SetCanSendPolls(can bool) ChatPermissions

SetCanSendPolls sets the `can_send_polls` value of ChatPermissions.

func (ChatPermissions) SetCanSendVideoNotes added in v0.10.7

func (p ChatPermissions) SetCanSendVideoNotes(can bool) ChatPermissions

SetCanSendVideoNotes sets the `can_send_video_notes` value of ChatPermissions.

func (ChatPermissions) SetCanSendVideos added in v0.10.7

func (p ChatPermissions) SetCanSendVideos(can bool) ChatPermissions

SetCanSendVideos sets the `can_send_videos` value of ChatPermissions.

func (ChatPermissions) SetCanSendVoiceNotes added in v0.10.7

func (p ChatPermissions) SetCanSendVoiceNotes(can bool) ChatPermissions

SetCanSendVoiceNotes sets the `can_send_voice_notes` value of ChatPermissions.

type ChatPhoto

type ChatPhoto struct {
	SmallFileID       string `json:"small_file_id"`
	SmallFileUniqueID string `json:"small_file_unique_id"`
	BigFileID         string `json:"big_file_id"`
	BigFileUniqueID   string `json:"big_file_unique_id"`
}

ChatPhoto is a struct for a chat photo

https://core.telegram.org/bots/api#chatphoto

type ChatShared

type ChatShared struct {
	RequestID int64       `json:"request_id"`
	ChatID    int64       `json:"chat_id"`
	Title     *string     `json:"title,omitempty"`
	Username  *string     `json:"username,omitempty"`
	Photo     []PhotoSize `json:"photo,omitempty"`
}

ChatShared is a struct for a chat which shared the message.

https://core.telegram.org/bots/api#chatshared

type ChatType

type ChatType string

ChatType is a type of Chat

const (
	ChatTypePrivate ChatType = "private"
	ChatTypeGroup   ChatType = "group"
	ChatTypeChannel ChatType = "channel"
)

ChatType strings

type Checklist added in v0.11.18

type Checklist struct {
	Title                    string          `json:"title"`
	TitleEntities            []MessageEntity `json:"title_entities,omitempty"`
	Tasks                    []ChecklistTask `json:"tasks"`
	OthersCanAddTasks        *bool           `json:"others_can_add_tasks,omitempty"`
	OthersCanMarkTasksAsDone *bool           `json:"others_can_mark_tasks_as_done,omitempty"`
}

Checklist is a struct of a checklist

https://core.telegram.org/bots/api#checklist

type ChecklistTask added in v0.11.18

type ChecklistTask struct {
	ID              int64           `json:"id"`
	Text            string          `json:"text"`
	TextEntities    []MessageEntity `json:"text_entities,omitempty"`
	CompletedByUser *User           `json:"completed_by_user,omitempty"`
	CompletedByChat *Chat           `json:"completed_by_chat,omitempty"`
	CompletionDate  *int64          `json:"completion_date,omitempty"`
}

ChecklistTask is a struct of a checklist task

https://core.telegram.org/bots/api#checklisttask

type ChecklistTasksAdded added in v0.11.18

type ChecklistTasksAdded struct {
	ChecklistMessage *Message        `json:"checklist_message,omitempty"`
	Tasks            []ChecklistTask `json:"tasks"`
}

ChecklistTasksAdded is a struct for service message: checklist tasks added

https://core.telegram.org/bots/api#checklisttasksadded

type ChecklistTasksDone added in v0.11.18

type ChecklistTasksDone struct {
	ChecklistMessage       *Message `json:"checklist_message,omitempty"`
	MarkedAsDoneTaskIDs    []int64  `json:"marked_as_done_task_ids,omitempty"`
	MarkedAsNotDoneTaskIDs []int64  `json:"marked_as_not_done_task_ids,omitempty"`
}

ChecklistTasksDone is a struct for service message: checklist tasks done

https://core.telegram.org/bots/api#checklisttasksdone

type ChosenInlineResult

type ChosenInlineResult struct {
	ResultID        string    `json:"result_id"`
	From            User      `json:"from"`
	Location        *Location `json:"location,omitempty"`
	InlineMessageID *string   `json:"inline_message_id,omitempty"`
	Query           string    `json:"query"`
}

ChosenInlineResult is a struct for a chosen inline result

https://core.telegram.org/bots/api#choseninlineresult

type Contact

type Contact struct {
	PhoneNumber string  `json:"phone_number"`
	FirstName   string  `json:"first_name"`
	LastName    *string `json:"last_name,omitempty"`
	UserID      *int64  `json:"user_id,omitempty"`
	VCard       *string `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard
}

Contact is a struct for a contact info

https://core.telegram.org/bots/api#contact

type CopyTextButton added in v0.11.8

type CopyTextButton struct {
	Text string `json:"text"` // 1~256 characters
}

CopyTextButton is a struct for CopyTextButton

https://core.telegram.org/bots/api#copytextbutton

type Dice

type Dice struct {
	Emoji string `json:"emoji"`
	Value int    `json:"value"` // 1-6 for dice, dart, and bowling; 1-5 for basketball and football; 1-64 for slotmachine;
}

Dice is a struct for dice in message

https://core.telegram.org/bots/api#dice

type DirectMessagePriceChanged added in v0.11.18

type DirectMessagePriceChanged struct {
	AreDirectMessagesEnabled bool `json:"are_direct_messages_enabled"`
	DirectMessageStarCount   *int `json:"direct_message_star_count,omitempty"`
}

DirectMessagePriceChanged is a struct for a service message about a change in the price of direct messages.

https://core.telegram.org/bots/api#directmessagepricechanged

type DirectMessagesTopic added in v0.11.19

type DirectMessagesTopic struct {
	TopicID int64 `json:"topic_id"`
	User    *User `json:"user,omitempty"`
}

DirectMessagesTopic is a struct for direct messages topic

https://core.telegram.org/bots/api#directmessagestopic

type Document

type Document struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
	FileName     *string    `json:"file_name,omitempty"`
	MimeType     *string    `json:"mime_type,omitempty"`
	FileSize     int        `json:"file_size,omitempty"`
}

Document is a struct for an ordinary file

https://core.telegram.org/bots/api#document

type DocumentMimeType

type DocumentMimeType string

DocumentMimeType is a document mime type for an inline query

const (
	DocumentMimeTypePdf DocumentMimeType = "application/pdf"
	DocumentMimeTypeZip DocumentMimeType = "application/zip"
)

DocumentMimeType strings

type ErrBotBlockedByUser added in v0.11.16

type ErrBotBlockedByUser struct {
	// contains filtered or unexported fields

} // for error: 'Forbidden: bot blocked by user'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrBotBlockedByUser) Error added in v0.11.16

func (e ErrBotBlockedByUser) Error() string

Error returns error message.

type ErrBotCantSendToBots added in v0.11.16

type ErrBotCantSendToBots struct {
	// contains filtered or unexported fields

} // for error: 'Forbidden: bot can't send messages to bots'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrBotCantSendToBots) Error added in v0.11.16

func (e ErrBotCantSendToBots) Error() string

Error returns error message.

type ErrBotKicked added in v0.11.16

type ErrBotKicked struct {
	// contains filtered or unexported fields

} // for error: 'Forbidden: bot was kicked'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrBotKicked) Error added in v0.11.16

func (e ErrBotKicked) Error() string

Error returns error message.

type ErrChatNotFound added in v0.11.16

type ErrChatNotFound struct {
	// contains filtered or unexported fields

} // for error: 'Bad Request: chat not found'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrChatNotFound) Error added in v0.11.16

func (e ErrChatNotFound) Error() string

Error returns error message.

type ErrConflictedLongPoll added in v0.11.16

type ErrConflictedLongPoll struct {
	// contains filtered or unexported fields

} // for error: 'Conflict: Terminated by other long poll'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrConflictedLongPoll) Error added in v0.11.16

func (e ErrConflictedLongPoll) Error() string

Error returns error message.

type ErrConflictedWebHook added in v0.11.16

type ErrConflictedWebHook struct {
	// contains filtered or unexported fields

} // for error: 'Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrConflictedWebHook) Error added in v0.11.16

func (e ErrConflictedWebHook) Error() string

Error returns error message.

type ErrContextTimeout added in v0.12.0

type ErrContextTimeout struct {
	// contains filtered or unexported fields

} // for error: 'context deadline exceeded'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrContextTimeout) Error added in v0.12.0

func (e ErrContextTimeout) Error() string

Error returns error message.

type ErrGroupMigratedToSupergroup added in v0.11.16

type ErrGroupMigratedToSupergroup struct {
	// contains filtered or unexported fields

} // for error: 'Bad request: Group migrated to supergroup'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrGroupMigratedToSupergroup) Error added in v0.11.16

func (e ErrGroupMigratedToSupergroup) Error() string

Error returns error message.

type ErrInvalidFileID added in v0.11.16

type ErrInvalidFileID struct {
	// contains filtered or unexported fields

} // for error: 'Bad request: Invalid file id'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrInvalidFileID) Error added in v0.11.16

func (e ErrInvalidFileID) Error() string

Error returns error message.

type ErrJSONParseFailed added in v0.11.16

type ErrJSONParseFailed struct {
	// contains filtered or unexported fields

} // for error: 'failed to parse json'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrJSONParseFailed) Error added in v0.11.16

func (e ErrJSONParseFailed) Error() string

Error returns error message.

type ErrMessageCantBeEdited added in v0.11.16

type ErrMessageCantBeEdited struct {
	// contains filtered or unexported fields

} // for error: 'Bad Request: message can't be edited'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrMessageCantBeEdited) Error added in v0.11.16

func (e ErrMessageCantBeEdited) Error() string

Error returns error message.

type ErrMessageEmpty added in v0.11.16

type ErrMessageEmpty struct {
	// contains filtered or unexported fields

} // for error: 'Bad Request: message text is empty'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrMessageEmpty) Error added in v0.11.16

func (e ErrMessageEmpty) Error() string

Error returns error message.

type ErrMessageNotModified added in v0.11.16

type ErrMessageNotModified struct {
	// contains filtered or unexported fields

} // for error: 'Bad request: Message not modified'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrMessageNotModified) Error added in v0.11.16

func (e ErrMessageNotModified) Error() string

Error returns error message.

type ErrMessageTooLong added in v0.11.16

type ErrMessageTooLong struct {
	// contains filtered or unexported fields

} // for error: 'Bad Request: message is too long'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrMessageTooLong) Error added in v0.11.16

func (e ErrMessageTooLong) Error() string

Error returns error message.

type ErrTooManyRequests added in v0.11.16

type ErrTooManyRequests struct {
	// contains filtered or unexported fields

} // for error: 'Too many requests'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrTooManyRequests) Error added in v0.11.16

func (e ErrTooManyRequests) Error() string

Error returns error message.

type ErrUnauthorized added in v0.11.16

type ErrUnauthorized struct {
	// contains filtered or unexported fields

} // for error: 'Unauthorized'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrUnauthorized) Error added in v0.11.16

func (e ErrUnauthorized) Error() string

Error returns error message.

type ErrUnclassified added in v0.11.16

type ErrUnclassified struct {
	// contains filtered or unexported fields

} // for unclassified errors

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrUnclassified) Error added in v0.11.16

func (e ErrUnclassified) Error() string

Error returns error message.

type ErrUserDeactivated added in v0.11.16

type ErrUserDeactivated struct {
	// contains filtered or unexported fields

} // for error: 'Forbidden: user is deactivated'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrUserDeactivated) Error added in v0.11.16

func (e ErrUserDeactivated) Error() string

Error returns error message.

type ErrUserNotFound added in v0.11.16

type ErrUserNotFound struct {
	// contains filtered or unexported fields

} // for error: 'Bad Request: user not found'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrUserNotFound) Error added in v0.11.16

func (e ErrUserNotFound) Error() string

Error returns error message.

type ErrWrongParameterAction added in v0.11.16

type ErrWrongParameterAction struct {
	// contains filtered or unexported fields

} // for error: 'Bad request: Wrong parameter action in request'

custom error types

referenced: https://github.com/TelegramBotAPI/errors

func (ErrWrongParameterAction) Error added in v0.11.16

func (e ErrWrongParameterAction) Error() string

Error returns error message.

type ExternalReplyInfo

type ExternalReplyInfo struct {
	Origin             MessageOrigin       `json:"origin"`
	Chat               *Chat               `json:"chat,omitempty"`
	MessageID          *int64              `json:"message_id,omitempty"`
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
	Animation          *Animation          `json:"animation,omitempty"`
	Audio              *Audio              `json:"audio,omitempty"`
	Document           *Document           `json:"document,omitempty"`
	LivePhoto          *LivePhoto          `json:"live_photo,omitempty"`
	PaidMedia          *PaidMediaInfo      `json:"paid_media,omitempty"`
	Photo              []PhotoSize         `json:"photo,omitempty"`
	Sticker            *Sticker            `json:"sticker,omitempty"`
	Story              *Story              `json:"story,omitempty"`
	Video              *Video              `json:"video,omitempty"`
	VideoNote          *VideoNote          `json:"video_note,omitempty"`
	Voice              *Voice              `json:"voice,omitempty"`
	HasMediaSpoiler    bool                `json:"has_media_spoiler,omitempty"`
	Checklist          *Checklist          `json:"checklist,omitempty"`
	Contact            *Contact            `json:"contact,omitempty"`
	Dice               *Dice               `json:"dice,omitempty"`
	Game               *Game               `json:"game,omitempty"`
	Giveaway           *Giveaway           `json:"giveaway,omitempty"`
	GiveawayWinners    *GiveawayWinners    `json:"giveaway_winners,omitempty"`
	Invoice            *Invoice            `json:"invoice,omitempty"`
	Location           *Location           `json:"location,omitempty"`
	Poll               *Poll               `json:"poll,omitempty"`
	Venue              *Venue              `json:"venue,omitempty"`
}

ExternalReplyInfo is a struct of an external reply info of a message

https://core.telegram.org/bots/api#externalreplyinfo

type File

type File struct {
	FileID       string  `json:"file_id"`
	FileUniqueID string  `json:"file_unique_id"`
	FileSize     *int    `json:"file_size,omitempty"`
	FilePath     *string `json:"file_path,omitempty"`
}

File is a struct for a file

https://core.telegram.org/bots/api#file

type ForceReply

type ForceReply struct {
	ForceReply            bool    `json:"force_reply"`
	InputFieldPlaceholder *string `json:"input_field_placeholder,omitempty"` // 1-64 characters
	Selective             *bool   `json:"selective,omitempty"`
}

ForceReply is a struct for force-reply

https://core.telegram.org/bots/api#forcereply

type ForumTopic

type ForumTopic struct {
	MessageThreadID   int64   `json:"message_thread_id"`
	Name              string  `json:"name"`
	IconColor         int     `json:"icon_color"`
	IconCustomEmojiID *string `json:"icon_custom_emoji_id,omitempty"`
	IsNameImplicit    *bool   `json:"is_name_implicit,omitempty"`
}

ForumTopic is a struct for a forum topic.

https://core.telegram.org/bots/api#forumtopic

type ForumTopicClosed

type ForumTopicClosed struct{}

ForumTopicClosed is a struct for a closed forum topic in the chat.

https://core.telegram.org/bots/api#forumtopicclosed

type ForumTopicCreated

type ForumTopicCreated struct {
	Name              string  `json:"name"`
	IconColor         int     `json:"icon_color"`
	IconCustomEmojiID *string `json:"icon_custom_emoji_id,omitempty"`
	IsNameImplicit    *bool   `json:"is_name_implicit,omitempty"`
}

ForumTopicCreated is a struct for a new forum topic created in the chat.

https://core.telegram.org/bots/api#forumtopiccreated

type ForumTopicEdited

type ForumTopicEdited struct {
	Name              *string `json:"name,omitempty"`
	IconCustomEmojiID *string `json:"icon_custom_emoji_id,omitempty"`
}

ForumTopicEdited is a struct for a edited forum topic in the chat.

https://core.telegram.org/bots/api#forumtopicedited

type ForumTopicReopened

type ForumTopicReopened struct{}

ForumTopicReopened is a struct for a reopened forum topic in the chat.

https://core.telegram.org/bots/api#forumtopicreopened

type Game

type Game struct {
	Title        string          `json:"title"`
	Description  string          `json:"description"`
	Photo        []PhotoSize     `json:"photo"`
	Text         *string         `json:"text,omitempty"`
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	Animation    *Animation      `json:"animation,omitempty"`
}

Game is a struct of Game

https://core.telegram.org/bots/api#game

type GameHighScore

type GameHighScore struct {
	Position int  `json:"position"`
	User     User `json:"user"`
	Score    int  `json:"score"`
}

GameHighScore is a struct of GameHighScore

https://core.telegram.org/bots/api#gamehighscore

type GeneralForumTopicHidden

type GeneralForumTopicHidden struct{}

GeneralForumTopicHidden is a struct for a hidden general forum topic in the chat.

https://core.telegram.org/bots/api#generalforumtopichidden

type GeneralForumTopicUnhidden

type GeneralForumTopicUnhidden struct{}

GeneralForumTopicUnhidden is a struct for an unhidden general forum topic in the chat.

https://core.telegram.org/bots/api#generalforumtopicunhidden

type Gift added in v0.11.9

type Gift struct {
	ID                     string          `json:"id"`
	Sticker                Sticker         `json:"sticker"`
	StarCount              int             `json:"star_count"`
	UpgradeStarCount       *int            `json:"upgrade_star_count,omitempty"`
	IsPremium              *bool           `json:"is_premium,omitempty"`
	HasColors              *bool           `json:"has_colors,omitempty"`
	TotalCount             *int            `json:"total_count,omitempty"`
	RemainingCount         *int            `json:"remaining_count,omitempty"`
	PersonalTotalCount     *int            `json:"personal_total_count,omitempty"`
	PersonalRemainingCount *int            `json:"personal_remaining_count,omitempty"`
	Background             *GiftBackground `json:"background,omitempty"`
	UniqueGiftVariantCount *int            `json:"unique_gift_variant_count,omitempty"`
	PublisherChat          *Chat           `json:"publisher_chat,omitempty"`
}

Gift represents a gift that can be sent by the bot.

https://core.telegram.org/bots/api#gift

type GiftBackground added in v0.12.1

type GiftBackground struct {
	CenterColor int `json:"center_color"`
	EdgeColor   int `json:"edge_color"`
	TextColor   int `json:"text_color"`
}

GiftBackground is a struct for a gift background.

https://core.telegram.org/bots/api#giftbackground

type GiftInfo added in v0.11.17

type GiftInfo struct {
	Gift                    Gift            `json:"gift"`
	OwnedGiftID             *string         `json:"owned_gift_id,omitempty"`
	ConvertStarCount        *int            `json:"convert_star_count,omitempty"`
	PrepaidUpgradeStarCount *int            `json:"prepaid_upgrade_star_count,omitempty"`
	IsUpgradeSeparate       *bool           `json:"is_upgrade_separate,omitempty"`
	CanBeUpgraded           *bool           `json:"can_be_upgraded,omitempty"`
	Text                    *string         `json:"text,omitempty"`
	Entities                []MessageEntity `json:"entities,omitempty"`
	IsPrivate               *bool           `json:"is_private,omitempty"`
	UniqueGiftNumber        *int            `json:"unique_gift_number,omitempty"`
}

GiftInfo describes a service message about a regular gift that was sent or received.

https://core.telegram.org/bots/api#giftinfo

type Gifts added in v0.11.9

type Gifts struct {
	Gifts []Gift `json:"gifts"`
}

Gifts represents a list of gifts.

https://core.telegram.org/bots/api#gifts

type Giveaway

type Giveaway struct {
	Chats                         []Chat   `json:"chats"`
	WinnersSelectionDate          int      `json:"winners_selection_date"`
	WinnerCount                   int      `json:"winner_count"`
	OnlyNewMembers                *bool    `json:"only_new_members,omitempty"`
	HasPublicWinners              *bool    `json:"has_public_winners,omitempty"`
	PrizeDescription              *string  `json:"prize_description,omitempty"`
	CountryCodes                  []string `json:"country_codes,omitempty"`
	PrizeStarCount                *int     `json:"prize_star_count,omitempty"`
	PremiumSubscriptionMonthCount *int     `json:"premium_subscription_month_count,omitempty"`
}

Giveaway struct for giveaways

https://core.telegram.org/bots/api#giveaway

type GiveawayCompleted

type GiveawayCompleted struct {
	WinnerCount         int      `json:"winner_count"`
	UnclaimedPrizeCount *int     `json:"unclaimed_prize_count,omitempty"`
	GiveawayMessage     *Message `json:"giveaway_message,omitempty"`
	IsStarGiveaway      *bool    `json:"is_star_giveaway,omitempty"`
}

GiveawayCompleted struct for service message about the completion of a giveaway without public winners

https://core.telegram.org/bots/api#giveawaycompleted

type GiveawayCreated

type GiveawayCreated struct {
	PrizeStarCount *int `json:"prize_star_count,omitempty"`
}

GiveawayCreated struct for service message about the creation of giveaway

https://core.telegram.org/bots/api#giveawaycreated

type GiveawayWinners

type GiveawayWinners struct {
	Chat                          Chat    `json:"chat"`
	GiveawayMessageID             int64   `json:"giveaway_message_id"`
	WinnersSelectionDate          int     `json:"winners_selection_date"`
	WinnerCount                   int     `json:"winner_count"`
	Winners                       []User  `json:"winners"`
	AdditionalChatCount           *int    `json:"additional_chat_count,omitempty"`
	PrizeStarCount                *int    `json:"prize_star_count,omitempty"`
	PremiumSubscriptionMonthCount *int    `json:"premium_subscription_month_count,omitempty"`
	UnclaimedPrizeCount           *int    `json:"unclaimed_prize_count,omitempty"`
	OnlyNewMembers                *bool   `json:"only_new_members,omitempty"`
	WasRefunded                   *bool   `json:"was_refunded,omitempty"`
	PrizeDescription              *string `json:"prize_description,omitempty"`
}

GiveawayWinners struct for representing the completion of a giveaway with public winners

https://core.telegram.org/bots/api#giveawaywinners

type InaccessibleMessage

type InaccessibleMessage struct {
	Chat      Chat  `json:"chat"`
	MessageID int64 `json:"message_id"`
	Date      int   `json:"date"` // NOTE: always 0
}

InaccessibleMessage is a struct of an inaccessible message

https://core.telegram.org/bots/api#inaccessiblemessage

type InlineKeyboardButton

type InlineKeyboardButton struct {
	Text                         string                       `json:"text"`
	IconCustomEmojiID            *string                      `json:"icon_custom_emoji_id,omitempty"`
	Style                        *KeyboardStyle               `json:"style,omitempty"`
	URL                          *string                      `json:"url,omitempty"`
	CallbackData                 *string                      `json:"callback_data,omitempty"`
	WebApp                       *WebAppInfo                  `json:"web_app,omitempty"`
	LoginURL                     *LoginURL                    `json:"login_url,omitempty"`
	SwitchInlineQuery            *string                      `json:"switch_inline_query,omitempty"`
	SwitchInlineQueryCurrentChat *string                      `json:"switch_inline_query_current_chat,omitempty"`
	SwitchInlineQueryChosenChat  *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"`
	CopyText                     *CopyTextButton              `json:"copy_text,omitempty"`
	CallbackGame                 *CallbackGame                `json:"callback_game,omitempty"`
	Pay                          *bool                        `json:"pay,omitempty"`
}

InlineKeyboardButton is a struct for InlineKeyboardButtons

NOTE: Can be generated with NewInlineKeyboardButton() function in types_helper.go

https://core.telegram.org/bots/api#inlinekeyboardbutton

func NewInlineKeyboardButton added in v0.10.7

func NewInlineKeyboardButton(text string) InlineKeyboardButton

NewInlineKeyboardButton returns a new InlineKeyboardButton with given text.

func NewInlineKeyboardButtonsAsColumnsWithCallbackData

func NewInlineKeyboardButtonsAsColumnsWithCallbackData(
	values map[string]string,
) []InlineKeyboardButton

NewInlineKeyboardButtonsAsColumnsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons (as columns) with callback data

func NewInlineKeyboardButtonsWithCallbackData

func NewInlineKeyboardButtonsWithCallbackData(
	values map[string]string,
) []InlineKeyboardButton

NewInlineKeyboardButtonsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons with callback data

func NewInlineKeyboardButtonsWithSwitchInlineQuery

func NewInlineKeyboardButtonsWithSwitchInlineQuery(
	values map[string]string,
) []InlineKeyboardButton

NewInlineKeyboardButtonsWithSwitchInlineQuery is a helper function for generating an array of InlineKeyboardButtons with switch inline query

func NewInlineKeyboardButtonsWithURL

func NewInlineKeyboardButtonsWithURL(
	values map[string]string,
) []InlineKeyboardButton

NewInlineKeyboardButtonsWithURL is a helper function for generating an array of InlineKeyboardButtons with urls

func (InlineKeyboardButton) SetCallbackData added in v0.10.7

func (b InlineKeyboardButton) SetCallbackData(data string) InlineKeyboardButton

SetCallbackData sets the `callback_data` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetCallbackGame added in v0.10.7

func (b InlineKeyboardButton) SetCallbackGame(callbackGame CallbackGame) InlineKeyboardButton

SetCallbackGame sets the `callback_game` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetIconCustomEmojiID added in v0.12.2

func (b InlineKeyboardButton) SetIconCustomEmojiID(iconCustomEmojiID string) InlineKeyboardButton

SetIconCustomEmojiID sets the `icon_custom_emoji_id` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetLoginURL added in v0.10.7

func (b InlineKeyboardButton) SetLoginURL(loginURL LoginURL) InlineKeyboardButton

SetLoginURL sets the `login_url` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetPay added in v0.10.7

SetPay sets the `pay` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetStyle added in v0.12.2

SetStyle sets the `style` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetSwichInlineQuery added in v0.10.7

func (b InlineKeyboardButton) SetSwichInlineQuery(query string) InlineKeyboardButton

SetSwichInlineQuery sets the `switch_inline_query` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetSwichInlineQueryChosenChat added in v0.10.7

func (b InlineKeyboardButton) SetSwichInlineQueryChosenChat(chosenChat SwitchInlineQueryChosenChat) InlineKeyboardButton

SetSwichInlineQueryChosenChat sets the `switch_inline_query_chosen_chat` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetSwichInlineQueryCurrentChat added in v0.10.7

func (b InlineKeyboardButton) SetSwichInlineQueryCurrentChat(query string) InlineKeyboardButton

SetSwichInlineQueryCurrentChat sets the `switch_inline_query_current_chat` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetURL added in v0.10.7

SetURL sets the `url` value of InlineKeyboardButton.

func (InlineKeyboardButton) SetWebApp added in v0.10.7

SetWebApp sets the `web_app` value of InlineKeyboardButton.

type InlineKeyboardMarkup

type InlineKeyboardMarkup struct {
	InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard"`
}

InlineKeyboardMarkup is a struct for InlineKeyboardMarkup

NOTE: Can be generated with NewInlineKeyboardMarkup() function in types_helper.go

https://core.telegram.org/bots/api#inlinekeyboardmarkup

func NewInlineKeyboardMarkup added in v0.10.7

func NewInlineKeyboardMarkup(keyboard [][]InlineKeyboardButton) InlineKeyboardMarkup

NewInlineKeyboardMarkup returns a new InlineKeyboardMarkup with given rows of keyboard buttons.

type InlineQuery

type InlineQuery struct {
	ID       string    `json:"id"`
	From     User      `json:"from"`
	Query    string    `json:"query"`
	Offset   string    `json:"offset"`
	ChatType *string   `json:"chat_type,omitempty"`
	Location *Location `json:"location,omitempty"`
}

InlineQuery is a struct of an inline query

https://core.telegram.org/bots/api#inlinequery

type InlineQueryResult

type InlineQueryResult struct {
	Type InlineQueryResultType `json:"type"`
	ID   string                `json:"id"`
}

InlineQueryResult is a struct for inline query results

NOTE: Can be generated with NewInlineQueryResult*() functions in types_helper.go

https://core.telegram.org/bots/api#inlinequeryresult

type InlineQueryResultArticle

type InlineQueryResultArticle struct {
	InlineQueryResult
	Title               string                `json:"title"`
	InputMessageContent InputMessageContent   `json:"input_message_content"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	URL                 *string               `json:"url,omitempty"` // NOTE: pass an empty string for hiding the URL
	Description         *string               `json:"description,omitempty"`
	ThumbnailURL        *string               `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      *int                  `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     *int                  `json:"thumbnail_height,omitempty"`
}

InlineQueryResultArticle is a struct for InlineQueryResultArticle

func NewInlineQueryResultArticle

func NewInlineQueryResultArticle(
	title, messageText, description string,
) (newArticle InlineQueryResultArticle, generatedID *string)

NewInlineQueryResultArticle is a helper function for generating a new InlineQueryResultArticle.

https://core.telegram.org/bots/api#inlinequeryresultarticle

func (InlineQueryResultArticle) SetDescription added in v0.10.7

func (r InlineQueryResultArticle) SetDescription(description string) InlineQueryResultArticle

SetDescription sets the `description` value of InlineQueryResultArticle.

func (InlineQueryResultArticle) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultArticle.

func (InlineQueryResultArticle) SetThumbnailHeight added in v0.10.7

func (r InlineQueryResultArticle) SetThumbnailHeight(height int) InlineQueryResultArticle

SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultArticle.

func (InlineQueryResultArticle) SetThumbnailURL added in v0.10.7

func (r InlineQueryResultArticle) SetThumbnailURL(thumbnailURL string) InlineQueryResultArticle

SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultArticle.

func (InlineQueryResultArticle) SetThumbnailWidth added in v0.10.7

func (r InlineQueryResultArticle) SetThumbnailWidth(width int) InlineQueryResultArticle

SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultArticle.

func (InlineQueryResultArticle) SetURL added in v0.10.7

SetURL sets the `url` value of InlineQueryResultArticle.

NOTE: Set an empty string for hiding the URL.

type InlineQueryResultAudio

type InlineQueryResultAudio struct {
	InlineQueryResult
	AudioURL            string                `json:"audio_url"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	Performer           *string               `json:"performer,omitempty"`
	AudioDuration       *int                  `json:"audio_duration,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultAudio is a struct of InlineQueryResultAudio

func NewInlineQueryResultAudio

func NewInlineQueryResultAudio(
	audioURL, title string,
) (newAudio InlineQueryResultAudio, generatedID *string)

NewInlineQueryResultAudio is a helper function for generating a new InlineQueryResultAudio.

https://core.telegram.org/bots/api#inlinequeryresultaudio

func (InlineQueryResultAudio) SetAudioDuration added in v0.10.7

func (r InlineQueryResultAudio) SetAudioDuration(duration int) InlineQueryResultAudio

SetAudioDuration sets the `audio_duration` value of InlineQueryResultAudio.

func (InlineQueryResultAudio) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultAudio.

func (InlineQueryResultAudio) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultAudio) SetCaptionEntities(entities []MessageEntity) InlineQueryResultAudio

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultAudio.

func (InlineQueryResultAudio) SetInputMessageContent added in v0.10.7

func (r InlineQueryResultAudio) SetInputMessageContent(content InputMessageContent) InlineQueryResultAudio

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultAudio.

func (InlineQueryResultAudio) SetParseMode added in v0.10.7

func (r InlineQueryResultAudio) SetParseMode(parseMode ParseMode) InlineQueryResultAudio

SetParseMode sets the `parse_mode` value of InlineQueryResultAudio.

func (InlineQueryResultAudio) SetPerformer added in v0.10.7

func (r InlineQueryResultAudio) SetPerformer(performer string) InlineQueryResultAudio

SetPerformer sets the `performer` value of InlineQueryResultAudio.

func (InlineQueryResultAudio) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultAudio.

type InlineQueryResultCachedAudio

type InlineQueryResultCachedAudio struct {
	InlineQueryResult
	AudioFileID         string                `json:"audio_file_id"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedAudio is a struct of InlineQueryResultCachedAudio

func NewInlineQueryResultCachedAudio

func NewInlineQueryResultCachedAudio(
	audioFileID string,
) (newAudio InlineQueryResultCachedAudio, generatedID *string)

NewInlineQueryResultCachedAudio is a helper function for generating a new InlineQueryResultCachedAudio.

https://core.telegram.org/bots/api#inlinequeryresultcachedaudio

func (InlineQueryResultCachedAudio) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultCachedAudio.

func (InlineQueryResultCachedAudio) SetCaptionEntities added in v0.10.7

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedAudio.

func (InlineQueryResultCachedAudio) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedAudio.

func (InlineQueryResultCachedAudio) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultCachedAudio.

func (InlineQueryResultCachedAudio) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedAudio.

type InlineQueryResultCachedDocument

type InlineQueryResultCachedDocument struct {
	InlineQueryResult
	Title               string                `json:"title"`
	DocumentFileID      string                `json:"document_file_id"`
	Description         *string               `json:"description,omitempty"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedDocument is a struct of InlineQueryResultCachedDocument

func NewInlineQueryResultCachedDocument

func NewInlineQueryResultCachedDocument(
	title, documentFileID string,
) (newDocument InlineQueryResultCachedDocument, generatedID *string)

NewInlineQueryResultCachedDocument is a helper function for generating a new InlineQueryResultCachedDocument.

https://core.telegram.org/bots/api#inlinequeryresultcacheddocument

func (InlineQueryResultCachedDocument) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultCachedDocument.

func (InlineQueryResultCachedDocument) SetCaptionEntities added in v0.10.7

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedDocument.

func (InlineQueryResultCachedDocument) SetDescription added in v0.10.7

SetDescription sets the `description` value of InlineQueryResultCachedDocument.

func (InlineQueryResultCachedDocument) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedDocument.

func (InlineQueryResultCachedDocument) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultCachedDocument.

func (InlineQueryResultCachedDocument) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedDocument.

type InlineQueryResultCachedGif

type InlineQueryResultCachedGif struct {
	InlineQueryResult
	GifFileID             string                `json:"gif_file_id"`
	Title                 *string               `json:"title,omitempty"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedGif is a struct of InlineQueryResultCachedGif

func NewInlineQueryResultCachedGif

func NewInlineQueryResultCachedGif(
	gifFileID string,
) (newGif InlineQueryResultCachedGif, generatedID *string)

NewInlineQueryResultCachedGif is a helper function for generating a new InlineQueryResultCachedGif.

https://core.telegram.org/bots/api#inlinequeryresultcachedgif

func (InlineQueryResultCachedGif) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultCachedGif.

func (InlineQueryResultCachedGif) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultCachedGif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedGif

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedGif.

func (InlineQueryResultCachedGif) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedGif.

func (InlineQueryResultCachedGif) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultCachedGif.

func (InlineQueryResultCachedGif) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedGif.

func (InlineQueryResultCachedGif) SetTitle added in v0.10.7

SetTitle sets the `title` value of InlineQueryResultCachedGif.

type InlineQueryResultCachedMpeg4Gif

type InlineQueryResultCachedMpeg4Gif struct {
	InlineQueryResult
	Mpeg4FileID           string                `json:"mpeg4_file_id"`
	Title                 *string               `json:"title,omitempty"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedMpeg4Gif is a struct of InlineQueryResultCachedMpeg4Gif

func NewInlineQueryResultCachedMpeg4Gif

func NewInlineQueryResultCachedMpeg4Gif(
	mpeg4FileID string,
) (newMpeg4Gif InlineQueryResultCachedMpeg4Gif, generatedID *string)

NewInlineQueryResultCachedMpeg4Gif is a helper function for generating a new InlineQueryResultCachedMpeg4Gif.

https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif

func (InlineQueryResultCachedMpeg4Gif) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultCachedMpeg4Gif.

func (InlineQueryResultCachedMpeg4Gif) SetCaptionEntities added in v0.10.7

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedMpeg4Gif.

func (InlineQueryResultCachedMpeg4Gif) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedMpeg4Gif.

func (InlineQueryResultCachedMpeg4Gif) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultCachedMpeg4Gif.

func (InlineQueryResultCachedMpeg4Gif) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedMpeg4Gif.

func (InlineQueryResultCachedMpeg4Gif) SetTitle added in v0.10.7

SetTitle sets the `title` value of InlineQueryResultCachedMpeg4Gif.

type InlineQueryResultCachedPhoto

type InlineQueryResultCachedPhoto struct {
	InlineQueryResult
	PhotoFileID           string                `json:"photo_file_id"`
	Title                 *string               `json:"title,omitempty"`
	Description           *string               `json:"description,omitempty"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedPhoto is a struct of InlineQueryResultCachedPhoto

func NewInlineQueryResultCachedPhoto

func NewInlineQueryResultCachedPhoto(
	photoFileID string,
) (newPhoto InlineQueryResultCachedPhoto, generatedID *string)

NewInlineQueryResultCachedPhoto is a helper function for generating a new InlineQueryResultCachedPhoto.

https://core.telegram.org/bots/api#inlinequeryresultcachedphoto

func (InlineQueryResultCachedPhoto) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultCachedPhoto.

func (InlineQueryResultCachedPhoto) SetCaptionEntities added in v0.10.7

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedPhoto.

func (InlineQueryResultCachedPhoto) SetDescription added in v0.10.7

SetDescription sets the `description` value of InlineQueryResultCachedPhoto.

func (InlineQueryResultCachedPhoto) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedPhoto.

func (InlineQueryResultCachedPhoto) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultCachedPhoto.

func (InlineQueryResultCachedPhoto) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedPhoto.

func (InlineQueryResultCachedPhoto) SetTitle added in v0.10.7

SetTitle sets the `title` value of InlineQueryResultCachedPhoto.

type InlineQueryResultCachedSticker

type InlineQueryResultCachedSticker struct {
	InlineQueryResult
	StickerFileID       string                `json:"sticker_file_id"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedSticker is a struct of InlineQueryResultCachedSticker

func NewInlineQueryResultCachedSticker

func NewInlineQueryResultCachedSticker(
	stickerFileID string,
) (newSticker InlineQueryResultCachedSticker, generatedID *string)

NewInlineQueryResultCachedSticker is a helper function for generating a new InlineQueryResultCachedSticker.

https://core.telegram.org/bots/api#inlinequeryresultcachedsticker

func (InlineQueryResultCachedSticker) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedSticker.

func (InlineQueryResultCachedSticker) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedSticker.

type InlineQueryResultCachedVideo

type InlineQueryResultCachedVideo struct {
	InlineQueryResult
	VideoFileID           string                `json:"video_file_id"`
	Title                 string                `json:"title"`
	Description           *string               `json:"description,omitempty"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVideo is a struct of InlineQueryResultCachedVideo

func NewInlineQueryResultCachedVideo

func NewInlineQueryResultCachedVideo(
	title, videoFileID string,
) (newVideo InlineQueryResultCachedVideo, generatedID *string)

NewInlineQueryResultCachedVideo is a helper function for generating a new InlineQueryResultCachedVideo.

https://core.telegram.org/bots/api#inlinequeryresultcachedvideo

func (InlineQueryResultCachedVideo) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultCachedVideo.

func (InlineQueryResultCachedVideo) SetCaptionEntities added in v0.10.7

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedVideo.

func (InlineQueryResultCachedVideo) SetDescription added in v0.10.7

SetDescription sets the `description` value of InlineQueryResultCachedVideo.

func (InlineQueryResultCachedVideo) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedVideo.

func (InlineQueryResultCachedVideo) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultCachedVideo.

func (InlineQueryResultCachedVideo) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedVideo.

type InlineQueryResultCachedVoice

type InlineQueryResultCachedVoice struct {
	InlineQueryResult
	VoiceFileID         string                `json:"voice_file_id"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVoice is a struct of InlineQueryResultCachedVoice

func NewInlineQueryResultCachedVoice

func NewInlineQueryResultCachedVoice(
	title, voiceFileID string,
) (newVoice InlineQueryResultCachedVoice, generatedID *string)

NewInlineQueryResultCachedVoice is a helper function for generating a new InlineQueryResultCachedVoice.

https://core.telegram.org/bots/api#inlinequeryresultcachedvoice

func (InlineQueryResultCachedVoice) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultCachedVoice.

func (InlineQueryResultCachedVoice) SetCaptionEntities added in v0.10.7

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedVoice.

func (InlineQueryResultCachedVoice) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedVoice.

func (InlineQueryResultCachedVoice) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultCachedVoice.

func (InlineQueryResultCachedVoice) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedVoice.

type InlineQueryResultContact

type InlineQueryResultContact struct {
	InlineQueryResult
	PhoneNumber         string                `json:"phone_number"`
	FirstName           string                `json:"first_name"`
	LastName            *string               `json:"last_name,omitempty"`
	VCard               *string               `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbnailURL        *string               `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      *int                  `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     *int                  `json:"thumbnail_height,omitempty"`
}

InlineQueryResultContact is a struct of InlineQueryResultContact

func NewInlineQueryResultContact

func NewInlineQueryResultContact(
	phoneNumber, firstName string,
) (newContact InlineQueryResultContact, generatedID *string)

NewInlineQueryResultContact is a helper function for generating a new InlineQueryResultContact.

https://core.telegram.org/bots/api#inlinequeryresultcontact

func (InlineQueryResultContact) SetInputMessageContent added in v0.10.7

func (r InlineQueryResultContact) SetInputMessageContent(content InputMessageContent) InlineQueryResultContact

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultContact.

func (InlineQueryResultContact) SetLastName added in v0.10.7

SetLastName sets the `last_name` value of InlineQueryResultContact.

func (InlineQueryResultContact) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultContact.

func (InlineQueryResultContact) SetThumbnailHeight added in v0.10.7

func (r InlineQueryResultContact) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultContact

SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultContact.

func (InlineQueryResultContact) SetThumbnailURL added in v0.10.7

func (r InlineQueryResultContact) SetThumbnailURL(thumbnailURL string) InlineQueryResultContact

SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultContact.

func (InlineQueryResultContact) SetThumbnailWidth added in v0.10.7

func (r InlineQueryResultContact) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultContact

SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultContact.

func (InlineQueryResultContact) SetVCard added in v0.10.7

SetVCard sets the `vcard` value of InlineQueryResultContact.

type InlineQueryResultDocument

type InlineQueryResultDocument struct {
	InlineQueryResult
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	DocumentURL         string                `json:"document_url"`
	MimeType            DocumentMimeType      `json:"mime_type"`
	Description         *string               `json:"description,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbnailURL        *string               `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      *int                  `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     *int                  `json:"thumbnail_height,omitempty"`
}

InlineQueryResultDocument is a struct of InlineQueryResultDocument

func NewInlineQueryResultDocument

func NewInlineQueryResultDocument(
	documentURL, title string,
	mimeType DocumentMimeType,
) (newDocument InlineQueryResultDocument, generatedID *string)

NewInlineQueryResultDocument is a helper function for generating a new InlineQueryResultDocument.

https://core.telegram.org/bots/api#inlinequeryresultdocument

func (InlineQueryResultDocument) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultDocument) SetCaptionEntities(entities []MessageEntity) InlineQueryResultDocument

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetDescription added in v0.10.7

func (r InlineQueryResultDocument) SetDescription(description string) InlineQueryResultDocument

SetDescription sets the `description` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetThumbnailHeight added in v0.10.7

func (r InlineQueryResultDocument) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultDocument

SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetThumbnailURL added in v0.10.7

func (r InlineQueryResultDocument) SetThumbnailURL(thumbnailURL string) InlineQueryResultDocument

SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultDocument.

func (InlineQueryResultDocument) SetThumbnailWidth added in v0.10.7

func (r InlineQueryResultDocument) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultDocument

SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultDocument.

type InlineQueryResultGame

type InlineQueryResultGame struct {
	InlineQueryResult
	GameShortName string                `json:"game_short_name"`
	ReplyMarkup   *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

InlineQueryResultGame is a struct of InlineQueryResultGame

func NewInlineQueryResultGame added in v0.10.7

func NewInlineQueryResultGame(
	shortName string,
) (newGame InlineQueryResultGame, generatedID *string)

NewInlineQueryResultGame is a helper function for generating a new InlineQueryResultGame.

https://core.telegram.org/bots/api#inlinequeryresultgame

func (InlineQueryResultGame) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultGame.

type InlineQueryResultGif

type InlineQueryResultGif struct {
	InlineQueryResult
	GifURL                string                `json:"gif_url"`
	GifWidth              *int                  `json:"gif_width,omitempty"`
	GifHeight             *int                  `json:"gif_height,omitempty"`
	GifDuration           *int                  `json:"gif_duration,omitempty"`
	ThumbnailURL          string                `json:"thumbnail_url"`
	ThumbnailMimeType     *ThumbnailMimeType    `json:"thumbnail_mime_type,omitempty"`
	Title                 *string               `json:"title,omitempty"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultGif is a struct for InlineQueryResultGif

func NewInlineQueryResultGif

func NewInlineQueryResultGif(
	gifURL, thumbnailURL string,
) (newGif InlineQueryResultGif, generatedID *string)

NewInlineQueryResultGif is a helper function for generating a new InlineQueryResultGif.

Gif must be in gif format, < 1MB.

https://core.telegram.org/bots/api#inlinequeryresultgif

func (InlineQueryResultGif) SetCaption added in v0.10.7

func (r InlineQueryResultGif) SetCaption(caption string) InlineQueryResultGif

SetCaption sets the `caption` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultGif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultGif

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetGifDuration added in v0.10.7

func (r InlineQueryResultGif) SetGifDuration(duration int) InlineQueryResultGif

SetGifDuration sets the `gif_duration` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetGifHeight added in v0.10.7

func (r InlineQueryResultGif) SetGifHeight(height int) InlineQueryResultGif

SetGifHeight sets the `gif_height` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetGifWidth added in v0.10.7

func (r InlineQueryResultGif) SetGifWidth(width int) InlineQueryResultGif

SetGifWidth sets the `gif_width` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetInputMessageContent added in v0.10.7

func (r InlineQueryResultGif) SetInputMessageContent(content InputMessageContent) InlineQueryResultGif

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetParseMode added in v0.10.7

func (r InlineQueryResultGif) SetParseMode(parseMode ParseMode) InlineQueryResultGif

SetParseMode sets the `parse_mode` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetThumbnailMimeType added in v0.10.7

func (r InlineQueryResultGif) SetThumbnailMimeType(mimeType ThumbnailMimeType) InlineQueryResultGif

SetThumbnailMimeType sets the `thumbnail_mime_type` value of InlineQueryResultGif.

func (InlineQueryResultGif) SetTitle added in v0.10.7

SetTitle sets the `title` value of InlineQueryResultGif.

type InlineQueryResultLocation

type InlineQueryResultLocation struct {
	InlineQueryResult
	Latitude             float32               `json:"latitude"`
	Longitude            float32               `json:"longitude"`
	Title                string                `json:"title"`
	HorizontalAccuracy   *float32              `json:"horizontal_accuracy,omitempty"`
	LivePeriod           *int                  `json:"live_period,omitempty"`
	Heading              *int                  `json:"heading,omitempty"`
	ProximityAlertRadius *int                  `json:"proximity_alert_radius,omitempty"`
	ReplyMarkup          *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent  *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbnailURL         *string               `json:"thumbnail_url,omitempty"`
	ThumbnailWidth       *int                  `json:"thumbnail_width,omitempty"`
	ThumbnailHeight      *int                  `json:"thumbnail_height,omitempty"`
}

InlineQueryResultLocation is a struct of InlineQueryResultLocation

func NewInlineQueryResultLocation

func NewInlineQueryResultLocation(
	latitude, longitude float32,
	title string,
) (newLocation InlineQueryResultLocation, generatedID *string)

NewInlineQueryResultLocation is a helper function for generating a new InlineQueryResultLocation.

https://core.telegram.org/bots/api#inlinequeryresultlocation

func (InlineQueryResultLocation) SetHeading added in v0.10.7

SetHeading sets the `heading` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetHorizontalAccuracy added in v0.10.7

func (r InlineQueryResultLocation) SetHorizontalAccuracy(horizontalAccuracy float32) InlineQueryResultLocation

SetHorizontalAccuracy sets the `horizontal_accuracy` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetLivePeriod added in v0.10.7

func (r InlineQueryResultLocation) SetLivePeriod(livePeriod int) InlineQueryResultLocation

SetLivePeriod sets the `live_period` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetProximityAlertRadius added in v0.10.7

func (r InlineQueryResultLocation) SetProximityAlertRadius(radius int) InlineQueryResultLocation

SetProximityAlertRadius sets the `proximity_alert_radius` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetThumbnailHeight added in v0.10.7

func (r InlineQueryResultLocation) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultLocation

SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetThumbnailURL added in v0.10.7

func (r InlineQueryResultLocation) SetThumbnailURL(thumbnailURL string) InlineQueryResultLocation

SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultLocation.

func (InlineQueryResultLocation) SetThumbnailWidth added in v0.10.7

func (r InlineQueryResultLocation) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultLocation

SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultLocation.

type InlineQueryResultMpeg4Gif

type InlineQueryResultMpeg4Gif struct {
	InlineQueryResult
	Mpeg4URL              string                `json:"mpeg4_url"`
	Mpeg4Width            *int                  `json:"mpeg4_width,omitempty"`
	Mpeg4Height           *int                  `json:"mpeg4_height,omitempty"`
	Mpeg4Duration         *int                  `json:"mpeg4_duration,omitempty"`
	ThumbnailURL          string                `json:"thumbnail_url"`
	ThumbnailMimeType     *ThumbnailMimeType    `json:"thumbnail_mime_type,omitempty"`
	Title                 *string               `json:"title,omitempty"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultMpeg4Gif is a struct for InlineQueryResultMpeg4Gif

func NewInlineQueryResultMpeg4Gif

func NewInlineQueryResultMpeg4Gif(
	mpeg4URL, thumbnailURL string,
) (newMpeg4Gif InlineQueryResultMpeg4Gif, generatedID *string)

NewInlineQueryResultMpeg4Gif is a helper function for generating a new InlineQueryResultMpeg4Gif.

Mpeg4 must be in H.264/MPEG-4 AVC video(wihout sound) format, < 1MB.

https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif

func (InlineQueryResultMpeg4Gif) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultMpeg4Gif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultMpeg4Gif

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetInputMessageContent added in v0.10.7

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetMpeg4Duration added in v0.10.7

func (r InlineQueryResultMpeg4Gif) SetMpeg4Duration(duration int) InlineQueryResultMpeg4Gif

SetMpeg4Duration sets the `mpeg4_duration` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetMpeg4Height added in v0.10.7

func (r InlineQueryResultMpeg4Gif) SetMpeg4Height(height int) InlineQueryResultMpeg4Gif

SetMpeg4Height sets the `mpeg4_height` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetMpeg4Width added in v0.10.7

SetMpeg4Width sets the `mpeg4_width` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetParseMode added in v0.10.7

SetParseMode sets the `parse_mode` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetThumbnailMimeType added in v0.10.7

SetThumbnailMimeType sets the `thumbnail_mime_type` value of InlineQueryResultMpeg4Gif.

func (InlineQueryResultMpeg4Gif) SetTitle added in v0.10.7

SetTitle sets the `title` value of InlineQueryResultMpeg4Gif.

type InlineQueryResultPhoto

type InlineQueryResultPhoto struct {
	InlineQueryResult
	PhotoURL              string                `json:"photo_url"`
	PhotoWidth            *int                  `json:"photo_width,omitempty"`
	PhotoHeight           *int                  `json:"photo_height,omitempty"`
	ThumbnailURL          string                `json:"thumbnail_url"`
	Title                 *string               `json:"title,omitempty"`
	Description           *string               `json:"description,omitempty"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultPhoto is a struct for InlineQueryResultPhoto

func NewInlineQueryResultPhoto

func NewInlineQueryResultPhoto(
	photoURL, thumbnailURL string,
) (newPhoto InlineQueryResultPhoto, generatedID *string)

NewInlineQueryResultPhoto is a helper function for generating a new InlineQueryResultPhoto.

Photo must be in jpeg format, < 5MB.

https://core.telegram.org/bots/api#inlinequeryresultphoto

func (InlineQueryResultPhoto) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultPhoto) SetCaptionEntities(entities []MessageEntity) InlineQueryResultPhoto

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetDescription added in v0.10.7

func (r InlineQueryResultPhoto) SetDescription(description string) InlineQueryResultPhoto

SetDescription sets the `description` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetInputMessageContent added in v0.10.7

func (r InlineQueryResultPhoto) SetInputMessageContent(content InputMessageContent) InlineQueryResultPhoto

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetParseMode added in v0.10.7

func (r InlineQueryResultPhoto) SetParseMode(parseMode ParseMode) InlineQueryResultPhoto

SetParseMode sets the `parse_mode` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetPhotoHeight added in v0.10.7

func (r InlineQueryResultPhoto) SetPhotoHeight(height int) InlineQueryResultPhoto

SetPhotoHeight sets the `photo_height` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetPhotoWidth added in v0.10.7

func (r InlineQueryResultPhoto) SetPhotoWidth(width int) InlineQueryResultPhoto

SetPhotoWidth sets the `photo_width` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultPhoto.

func (InlineQueryResultPhoto) SetTitle added in v0.10.7

SetTitle sets the `title` value of InlineQueryResultPhoto.

type InlineQueryResultType

type InlineQueryResultType string

InlineQueryResultType is a type of inline query result

const (
	InlineQueryResultTypeArticle  InlineQueryResultType = "article"
	InlineQueryResultTypePhoto    InlineQueryResultType = "photo"
	InlineQueryResultTypeGif      InlineQueryResultType = "gif"
	InlineQueryResultTypeMpeg4Gif InlineQueryResultType = "mpeg4_gif"
	InlineQueryResultTypeVideo    InlineQueryResultType = "video"
	InlineQueryResultTypeAudio    InlineQueryResultType = "audio"
	InlineQueryResultTypeVoice    InlineQueryResultType = "voice"
	InlineQueryResultTypeDocument InlineQueryResultType = "document"
	InlineQueryResultTypeLocation InlineQueryResultType = "location"
	InlineQueryResultTypeVenue    InlineQueryResultType = "venue"
	InlineQueryResultTypeContact  InlineQueryResultType = "contact"
	InlineQueryResultTypeSticker  InlineQueryResultType = "sticker"
	InlineQueryResultTypeGame     InlineQueryResultType = "game"
)

InlineQueryResultType strings

type InlineQueryResultVenue

type InlineQueryResultVenue struct {
	InlineQueryResult
	Latitude            float32               `json:"latitude"`
	Longitude           float32               `json:"longitude"`
	Title               string                `json:"title"`
	Address             string                `json:"address"`
	FoursquareID        *string               `json:"foursquare_id,omitempty"`
	FoursquareType      *string               `json:"foursquare_type,omitempty"`
	GooglePlaceID       *string               `json:"google_place_id,omitempty"`
	GooglePlaceType     *string               `json:"google_place_type,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbnailURL        *string               `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      *int                  `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     *int                  `json:"thumbnail_height,omitempty"`
}

InlineQueryResultVenue is a struct of InlineQueryResultVenue

func NewInlineQueryResultVenue

func NewInlineQueryResultVenue(
	latitude, longitude float32,
	title, address string,
) (newVenue InlineQueryResultVenue, generatedID *string)

NewInlineQueryResultVenue is a helper function for generating a new InlineQueryResultVenue.

https://core.telegram.org/bots/api#inlinequeryresultvenue

func (InlineQueryResultVenue) SetFoursquareID added in v0.10.7

func (r InlineQueryResultVenue) SetFoursquareID(foursquareID string) InlineQueryResultVenue

SetFoursquareID sets the `foursquare_id` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetFoursquareType added in v0.10.7

func (r InlineQueryResultVenue) SetFoursquareType(foursquareType string) InlineQueryResultVenue

SetFoursquareType sets the `foursquare_type` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetGooglePlaceID added in v0.10.7

func (r InlineQueryResultVenue) SetGooglePlaceID(googlePlaceID string) InlineQueryResultVenue

SetGooglePlaceID sets the `google_place_id` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetGooglePlaceType added in v0.10.7

func (r InlineQueryResultVenue) SetGooglePlaceType(googlePlaceType string) InlineQueryResultVenue

SetGooglePlaceType sets the `google_place_type` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetInputMessageContent added in v0.10.7

func (r InlineQueryResultVenue) SetInputMessageContent(content InputMessageContent) InlineQueryResultVenue

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetThumbnailHeight added in v0.10.7

func (r InlineQueryResultVenue) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultVenue

SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetThumbnailURL added in v0.10.7

func (r InlineQueryResultVenue) SetThumbnailURL(thumbnailURL string) InlineQueryResultVenue

SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultVenue.

func (InlineQueryResultVenue) SetThumbnailWidth added in v0.10.7

func (r InlineQueryResultVenue) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultVenue

SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultVenue.

type InlineQueryResultVideo

type InlineQueryResultVideo struct {
	InlineQueryResult
	VideoURL              string                `json:"video_url"`
	MimeType              VideoMimeType         `json:"mime_type"`
	ThumbnailURL          string                `json:"thumbnail_url"`
	Title                 string                `json:"title"`
	Caption               *string               `json:"caption,omitempty"`
	ParseMode             *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool                 `json:"show_caption_above_media,omitempty"`
	VideoWidth            *int                  `json:"video_width,omitempty"`
	VideoHeight           *int                  `json:"video_height,omitempty"`
	VideoDuration         *int                  `json:"video_duration,omitempty"`
	Description           *string               `json:"description,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultVideo is a struct of InlineQueryResultVideo

func NewInlineQueryResultVideo

func NewInlineQueryResultVideo(
	videoURL, thumbnailURL, title string,
	mimeType VideoMimeType,
) (newVideo InlineQueryResultVideo, generatedID *string)

NewInlineQueryResultVideo is a helper function for generating a new InlineQueryResultVideo.

https://core.telegram.org/bots/api#inlinequeryresultvideo

func (InlineQueryResultVideo) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultVideo) SetCaptionEntities(entities []MessageEntity) InlineQueryResultVideo

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetDescription added in v0.10.7

func (r InlineQueryResultVideo) SetDescription(description string) InlineQueryResultVideo

SetDescription sets the `description` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetInputMessageContent added in v0.10.7

func (r InlineQueryResultVideo) SetInputMessageContent(content InputMessageContent) InlineQueryResultVideo

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetParseMode added in v0.10.7

func (r InlineQueryResultVideo) SetParseMode(parseMode ParseMode) InlineQueryResultVideo

SetParseMode sets the `parse_mode` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetVideoDuration added in v0.10.7

func (r InlineQueryResultVideo) SetVideoDuration(duration int) InlineQueryResultVideo

SetVideoDuration sets the `video_duration` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetVideoHeight added in v0.10.7

func (r InlineQueryResultVideo) SetVideoHeight(height int) InlineQueryResultVideo

SetVideoHeight sets the `video_height` value of InlineQueryResultVideo.

func (InlineQueryResultVideo) SetVideoWidth added in v0.10.7

func (r InlineQueryResultVideo) SetVideoWidth(width int) InlineQueryResultVideo

SetVideoWidth sets the `video_width` value of InlineQueryResultVideo.

type InlineQueryResultVoice

type InlineQueryResultVoice struct {
	InlineQueryResult
	VoiceURL            string                `json:"voice_url"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	VoiceDuration       *int                  `json:"voice_duration,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultVoice is a struct of InlineQueryResultVoice

func NewInlineQueryResultVoice

func NewInlineQueryResultVoice(
	voiceURL, title string,
) (newVoice InlineQueryResultVoice, generatedID *string)

NewInlineQueryResultVoice is a helper function for generating a new InlineQueryResultVoice.

https://core.telegram.org/bots/api#inlinequeryresultvoice

func (InlineQueryResultVoice) SetCaption added in v0.10.7

SetCaption sets the `caption` value of InlineQueryResultVoice.

func (InlineQueryResultVoice) SetCaptionEntities added in v0.10.7

func (r InlineQueryResultVoice) SetCaptionEntities(entities []MessageEntity) InlineQueryResultVoice

SetCaptionEntities sets the `caption_entities` value of InlineQueryResultVoice.

func (InlineQueryResultVoice) SetInputMessageContent added in v0.10.7

func (r InlineQueryResultVoice) SetInputMessageContent(content InputMessageContent) InlineQueryResultVoice

SetInputMessageContent sets the `input_message_content` value of InlineQueryResultVoice.

func (InlineQueryResultVoice) SetParseMode added in v0.10.7

func (r InlineQueryResultVoice) SetParseMode(parseMode ParseMode) InlineQueryResultVoice

SetParseMode sets the `parse_mode` value of InlineQueryResultVoice.

func (InlineQueryResultVoice) SetReplyMarkup added in v0.10.7

SetReplyMarkup sets the `reply_markup` value of InlineQueryResultVoice.

func (InlineQueryResultVoice) SetVoiceDuration added in v0.10.7

func (r InlineQueryResultVoice) SetVoiceDuration(duration int) InlineQueryResultVoice

SetVoiceDuration sets the `voice_duration` value of InlineQueryResultVoice.

type InlineQueryResultsButton

type InlineQueryResultsButton struct {
	Text           string      `json:"text"`
	WebApp         *WebAppInfo `json:"web_app,omitempty"`
	StartParameter *string     `json:"start_parameter,omitempty"`
}

InlineQueryResultsButton is a struct for inline query results button

https://core.telegram.org/bots/api#inlinequeryresultsbutton

func NewInlineQueryResultsButton added in v0.10.7

func NewInlineQueryResultsButton(text string) InlineQueryResultsButton

NewInlineQueryResultsButton returns a new InlineQueryResultsButton with given text.

https://core.telegram.org/bots/api#inlinequeryresultsbutton

func (InlineQueryResultsButton) SetStartParameter added in v0.10.7

func (b InlineQueryResultsButton) SetStartParameter(startParameter string) InlineQueryResultsButton

SetStartParameter sets the `start_parameter` value of InlineQueryResultsButton.

func (InlineQueryResultsButton) SetWebApp added in v0.10.7

SetWebApp sets the `web_app` value of InlineQueryResultsButton.

type InputChecklist added in v0.11.18

type InputChecklist struct {
	Title                    string               `json:"title"`
	ParseMode                *ParseMode           `json:"parse_mode,omitempty"`
	TitleEntities            []MessageEntity      `json:"title_entities,omitempty"`
	Tasks                    []InputChecklistTask `json:"tasks"`
	OthersCanAddTasks        *bool                `json:"others_can_add_tasks,omitempty"`
	OthersCanMarkTasksAsDone *bool                `json:"others_can_mark_tasks_as_done,omitempty"`
}

InputChecklist is a struct of an input checklist

https://core.telegram.org/bots/api#inputchecklist

type InputChecklistTask added in v0.11.18

type InputChecklistTask struct {
	ID           int64           `json:"id"`
	Text         string          `json:"text"`
	ParseMode    *ParseMode      `json:"parse_mode,omitempty"`
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
}

InputChecklistTask is a struct of an input checklist task

https://core.telegram.org/bots/api#inputchecklisttask

type InputContactMessageContent

type InputContactMessageContent struct {
	InputMessageContent

	PhoneNumber string  `json:"phone_number"`
	FirstName   string  `json:"first_name"`
	LastName    *string `json:"last_name,omitempty"`
	VCard       *string `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard
}

InputContactMessageContent is a struct of InputContactMessageContent

func NewInputContactMessageContent added in v0.10.7

func NewInputContactMessageContent(phoneNumber, firstName string) InputContactMessageContent

NewInputContactMessageContent returns a new InputContactMessageContent.

func (InputContactMessageContent) SetLastName added in v0.10.7

SetLastName sets the `last_name` value of InputContactMessageContent.

func (InputContactMessageContent) SetVCard added in v0.10.7

SetVCard sets the `vcard` value of InputContactMessageContent.

type InputFile

type InputFile struct {
	Filepath *string
	URL      *string
	Bytes    []byte
	FileID   *string
}

InputFile represents contents of a file to be uploaded.

NOTE: Can be generated with NewInputFileFromXXX() functions in types_helper.go

https://core.telegram.org/bots/api#inputfile

func NewInputFileFromBytes added in v0.10.7

func NewInputFileFromBytes(bytes []byte) InputFile

NewInputFileFromBytes generates an InputFile from given bytes array.

func NewInputFileFromFileID added in v0.10.7

func NewInputFileFromFileID(fileID string) InputFile

NewInputFileFromFileID generates an InputFile from given file id.

func NewInputFileFromFilepath added in v0.10.7

func NewInputFileFromFilepath(filepath string) InputFile

NewInputFileFromFilepath generates an InputFile from given filepath.

func NewInputFileFromURL added in v0.10.7

func NewInputFileFromURL(url string) InputFile

NewInputFileFromURL generates an InputFile from given url.

type InputInvoiceMessageContent

type InputInvoiceMessageContent struct {
	InputMessageContent

	Title                     string         `json:"title"`
	Description               string         `json:"description"`
	Payload                   string         `json:"payload"`
	ProviderToken             string         `json:"provider_token"`
	Currency                  string         `json:"currency"`
	Prices                    []LabeledPrice `json:"prices"`
	MaxTipAmount              *int           `json:"max_tip_amount,omitempty"`
	SuggestedTipAmounts       []int          `json:"suggested_tip_amounts,omitempty"`
	ProviderData              *string        `json:"provider_data,omitempty"`
	PhotoURL                  *string        `json:"photo_url,omitempty"`
	PhotoSize                 *int           `json:"photo_size,omitempty"`
	PhotoWidth                *int           `json:"photo_width,omitempty"`
	PhotoHeight               *int           `json:"photo_height,omitempty"`
	NeedName                  *bool          `json:"need_name,omitempty"`
	NeedPhoneNumber           *bool          `json:"need_phone_number,omitempty"`
	NeedEmail                 *bool          `json:"need_email,omitempty"`
	NeedShippingAddress       *bool          `json:"need_shipping_address,omitempty"`
	SendPhoneNumberToProvider *bool          `json:"send_phone_number_to_provider,omitempty"`
	SendEmailToProvider       *bool          `json:"send_email_to_provider,omitempty"`
	IsFlexible                *bool          `json:"is_flexible,omitempty"`
}

InputInvoiceMessageContent is a struct of InputInvoiceMessageContent

NOTE: - `ProviderToken`: Set "" for payments in Telegram Stars. - `Currency`: Set "XTR" for payments in Telegram Stars.

func NewInputInvoiceMessageContent added in v0.10.7

func NewInputInvoiceMessageContent(
	title, description, payload, providerToken, currency string,
	prices []LabeledPrice,
) InputInvoiceMessageContent

NewInputInvoiceMessageContent returns a new InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetIsFlexible added in v0.10.7

func (c InputInvoiceMessageContent) SetIsFlexible(isFlexible bool) InputInvoiceMessageContent

SetIsFlexible sets the `is_flexible` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetMaxTipAmount added in v0.10.7

func (c InputInvoiceMessageContent) SetMaxTipAmount(amount int) InputInvoiceMessageContent

SetMaxTipAmount sets the `max_tip_amount` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetNeedEmail added in v0.10.7

SetNeedEmail sets the `need_email` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetNeedName added in v0.10.7

SetNeedName sets the `need_name` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetNeedPhoneNumber added in v0.10.7

func (c InputInvoiceMessageContent) SetNeedPhoneNumber(needPhoneNumber bool) InputInvoiceMessageContent

SetNeedPhoneNumber sets the `need_phone_number` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetNeedShippingAddress added in v0.10.7

func (c InputInvoiceMessageContent) SetNeedShippingAddress(needShippingAddress bool) InputInvoiceMessageContent

SetNeedShippingAddress sets the `need_shipping_address` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetPhotoHeight added in v0.10.7

func (c InputInvoiceMessageContent) SetPhotoHeight(photoHeight int) InputInvoiceMessageContent

SetPhotoHeight sets the `photo_height` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetPhotoSize added in v0.10.7

func (c InputInvoiceMessageContent) SetPhotoSize(photoSize int) InputInvoiceMessageContent

SetPhotoSize sets the `photo_size` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetPhotoURL added in v0.10.7

SetPhotoURL sets the `photo_url` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetPhotoWidth added in v0.10.7

func (c InputInvoiceMessageContent) SetPhotoWidth(photoWidth int) InputInvoiceMessageContent

SetPhotoWidth sets the `photo_width` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetProviderData added in v0.10.7

func (c InputInvoiceMessageContent) SetProviderData(providerData string) InputInvoiceMessageContent

SetProviderData sets the `provider_data` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetSendEmailToProvider added in v0.10.7

func (c InputInvoiceMessageContent) SetSendEmailToProvider(sendEmailToProvider bool) InputInvoiceMessageContent

SetSendEmailToProvider sets the `send_email_to_provider` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetSendPhoneNumberToProvider added in v0.10.7

func (c InputInvoiceMessageContent) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) InputInvoiceMessageContent

SetSendPhoneNumberToProvider sets the `send_phone_number_to_provider` value of InputInvoiceMessageContent.

func (InputInvoiceMessageContent) SetSuggestedTipAmounts added in v0.10.7

func (c InputInvoiceMessageContent) SetSuggestedTipAmounts(amounts []int) InputInvoiceMessageContent

SetSuggestedTipAmounts sets the `suggested_tip_amounts` value of InputInvoiceMessageContent.

type InputLocationMessageContent

type InputLocationMessageContent struct {
	InputMessageContent

	Latitude             float32  `json:"latitude"`
	Longitude            float32  `json:"longitude"`
	HorizontalAccuracy   *float32 `json:"horizontal_accuracy,omitempty"`
	LivePeriod           *int     `json:"live_period,omitempty"`
	Heading              *int     `json:"heading,omitempty"`
	ProximityAlertRadius *int     `json:"proximity_alert_radius,omitempty"`
}

InputLocationMessageContent is a struct of InputLocationMessageContent

func NewInputLocationMessageContent added in v0.10.7

func NewInputLocationMessageContent(latitude, longitude float32) InputLocationMessageContent

NewInputLocationMessageContent returns a new InputLocationMessageContent.

func (InputLocationMessageContent) SetHeading added in v0.10.7

SetHeading sets the `heading` value of InputLocationMessageContent.

func (InputLocationMessageContent) SetHorizontalAccuracy added in v0.10.7

func (c InputLocationMessageContent) SetHorizontalAccuracy(horizontalAccuracy float32) InputLocationMessageContent

SetHorizontalAccuracy sets the `horizontal_accuracy` value of InputLocationMessageContent.

func (InputLocationMessageContent) SetLivePeriod added in v0.10.7

func (c InputLocationMessageContent) SetLivePeriod(livePeriod int) InputLocationMessageContent

SetLivePeriod sets the `live_period` value of InputLocationMessageContent.

func (InputLocationMessageContent) SetProximityAlertRadius added in v0.10.7

func (c InputLocationMessageContent) SetProximityAlertRadius(radius int) InputLocationMessageContent

SetProximityAlertRadius sets the `proximity_alert_radius` value of InputLocationMessageContent.

type InputMedia

type InputMedia any

InputMedia represents the content of a media message to be sent.

NOTE: Should be one of: InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaLivePhoto, InputMediaPhoto, or InputMediaVideo.

https://core.telegram.org/bots/api#inputmedia

type InputMediaAnimation

type InputMediaAnimation struct {
	Type                  InputMediaType  `json:"type"` // == InputMediaTypeAnimation
	Media                 string          `json:"media"`
	Thumbnail             *InputFile      `json:"thumbnail,omitempty"`
	Caption               *string         `json:"caption,omitempty"`
	ParseMode             *ParseMode      `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool           `json:"show_caption_above_media,omitempty"`
	Width                 *int            `json:"width,omitempty"`
	Height                *int            `json:"height,omitempty"`
	Duration              *int            `json:"duration,omitempty"`
	HasSpoiler            *bool           `json:"has_spoiler,omitempty"`
}

InputMediaAnimation is a struct of an animation

https://core.telegram.org/bots/api#inputmediaanimation

type InputMediaAudio

type InputMediaAudio struct {
	Type            InputMediaType  `json:"type"` // == InputMediaTypeAudio
	Media           string          `json:"media"`
	Thumbnail       *InputFile      `json:"thumbnail,omitempty"`
	Caption         *string         `json:"caption,omitempty"`
	ParseMode       *ParseMode      `json:"parse_mode,omitempty"`
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	Duration        *int            `json:"duration,omitempty"`
	Performer       *string         `json:"performer,omitempty"`
	Title           *string         `json:"title,omitempty"`
}

InputMediaAudio is a struct of an audio

https://core.telegram.org/bots/api#inputmediaaudio

type InputMediaDocument

type InputMediaDocument struct {
	Type                        InputMediaType  `json:"type"` // == InputMediaTypeDocument
	Media                       string          `json:"media"`
	Thumbnail                   *InputFile      `json:"thumbnail,omitempty"`
	Caption                     *string         `json:"caption,omitempty"`
	ParseMode                   *ParseMode      `json:"parse_mode,omitempty"`
	CaptionEntities             []MessageEntity `json:"caption_entities,omitempty"`
	DisableContentTypeDetection *bool           `json:"disable_content_type_detection,omitempty"`
}

InputMediaDocument is a struct of a document

https://core.telegram.org/bots/api#inputmediadocument

type InputMediaLink struct {
	Type InputMediaType `json:"type"` // == InputMediaTypeLink
	URL  string         `json:"url"`
}

InputMediaLink is a struct of an HTTP link to be sent.

https://core.telegram.org/bots/api#inputmedialink

type InputMediaLivePhoto added in v0.13.4

type InputMediaLivePhoto struct {
	Type                  InputMediaType  `json:"type"` // == InputMeidaTypeLivePhoto
	Media                 string          `json:"media"`
	Photo                 string          `json:"photo"`
	Caption               *string         `json:"caption,omitempty"`
	ParseMode             *ParseMode      `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool           `json:"show_caption_above_media,omitempty"`
	HasSpoiler            *bool           `json:"has_spoiler,omitempty"`
}

InputMediaLivePhoto is a struct of a live photo

https://core.telegram.org/bots/api#inputmedialivephoto

type InputMediaLocation added in v0.13.4

type InputMediaLocation struct {
	Type               InputMediaType `json:"type"` // == InputMediaTypeLocation
	Latitude           float64        `json:"latitude"`
	Longitude          float64        `json:"longitude"`
	HorizontalAccuracy *float64       `json:"horizontal_accuracy,omitempty"`
}

InputMediaLocation is a struct of a location

https://core.telegram.org/bots/api#inputmedialocation

type InputMediaPhoto

type InputMediaPhoto struct {
	Type                  InputMediaType  `json:"type"` // == InputMediaTypePhoto
	Media                 string          `json:"media"`
	Caption               *string         `json:"caption,omitempty"`
	ParseMode             *ParseMode      `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool           `json:"show_caption_above_media,omitempty"`
	HasSpoiler            *bool           `json:"has_spoiler,omitempty"`
}

InputMediaPhoto is a struct of a photo

https://core.telegram.org/bots/api#inputmediaphoto

type InputMediaSticker added in v0.13.4

type InputMediaSticker struct {
	Type  InputMediaType `json:"type"` // == InputMediaTypeSticker
	Media string         `json:"media"`
	Emoji *string        `json:"emoji,omitempty"`
}

InputMediaSticker is a struct of a sticker

https://core.telegram.org/bots/api#inputmediasticker

type InputMediaType

type InputMediaType string

InputMediaType is a type of InputMedia

const (
	InputMediaTypeAnimation InputMediaType = "animation"
	InputMediaTypeDocument  InputMediaType = "document"
	InputMediaTypeAudio     InputMediaType = "audio"
	InputMediaTypeLink      InputMediaType = "link"
	InputMediaTypeLivePhoto InputMediaType = "live_photo"
	InputMediaTypeLocation  InputMediaType = "location"
	InputMediaTypePhoto     InputMediaType = "photo"
	InputMediaTypeSticker   InputMediaType = "sticker"
	InputMediaTypeVenue     InputMediaType = "venue"
	InputMediaTypeVideo     InputMediaType = "video"
)

InputMediaType strings

type InputMediaVenue added in v0.13.4

type InputMediaVenue struct {
	Type            InputMediaType `json:"type"` // == InputMediaTypeVenue
	Latitude        float64        `json:"latitude"`
	Longitude       float64        `json:"longitude"`
	Title           string         `json:"title"`
	Address         string         `json:"address"`
	FoursquareID    *string        `json:"foursquare_id,omitempty"`
	FoursquareType  *string        `json:"foursquare_type,omitempty"`
	GooglePlaceID   *string        `json:"google_place_id,omitempty"`
	GooglePlaceType *string        `json:"google_place_type,omitempty"`
}

InputMediaVenue is a struct of a venue

https://core.telegram.org/bots/api#inputmediavenue

type InputMediaVideo

type InputMediaVideo struct {
	Type                  InputMediaType  `json:"type"` // == InputMediaTypeVideo
	Media                 string          `json:"media"`
	Thumbnail             *InputFile      `json:"thumbnail,omitempty"`
	Cover                 *string         `json:"cover,omitempty"`
	StartTimestamp        *int            `json:"start_timestamp,omitempty"`
	Caption               *string         `json:"caption,omitempty"`
	ParseMode             *ParseMode      `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia *bool           `json:"show_caption_above_media,omitempty"`
	Width                 *int            `json:"width,omitempty"`
	Height                *int            `json:"height,omitempty"`
	Duration              *int            `json:"duration,omitempty"`
	SupportsStreaming     *bool           `json:"supports_streaming,omitempty"`
	HasSpoiler            *bool           `json:"has_spoiler,omitempty"`
}

InputMediaVideo is a struct of a video

https://core.telegram.org/bots/api#inputmediavideo

type InputMessageContent

type InputMessageContent any

InputMessageContent is a generic type of input message content types

(can be one of `InputTextMessageContent`, `InputRichMessageContent`, `InputLocationMessageContent`, `InputVenueMessageContent`, `InputContactMessageContent`, or `InputInvoiceMessageContent`)

NOTE: Can be generated with NewInput*MessageContent() function in types_helper.go

https://core.telegram.org/bots/api#inputmessagecontent

type InputPaidMedia added in v0.11.3

type InputPaidMedia any

InputPaidMedia can be one of `InputPaidMediaPhoto` or `InputPaidMediaVideo`

https://core.telegram.org/bots/api#inputpaidmedia

type InputPaidMediaLivePhoto added in v0.13.4

type InputPaidMediaLivePhoto struct {
	Type  string `json:"type"` // == "live_photo"
	Media string `json:"media"`
	Photo string `json:"photo"`
}

InputPaidMediaLivePhoto struct

https://core.telegram.org/bots/api#inputpaidmedialivephoto

type InputPaidMediaPhoto added in v0.11.3

type InputPaidMediaPhoto struct {
	Type  string `json:"type"` // == "photo"
	Media string `json:"media"`
}

InputPaidMediaPhoto struct

https://core.telegram.org/bots/api#inputpaidmediaphoto

type InputPaidMediaVideo added in v0.11.3

type InputPaidMediaVideo struct {
	Type              string  `json:"type"` // == "video"
	Media             string  `json:"media"`
	Thumbnail         any     `json:"thumbnail,omitempty"` // `InputFile` or string
	Cover             *string `json:"cover,omitempty"`
	StartTimestamp    *int    `json:"start_timestamp,omitempty"`
	Width             *int    `json:"width,omitempty"`
	Height            *int    `json:"height,omitempty"`
	Duration          *int    `json:"duration,omitempty"`
	SupportsStreaming *bool   `json:"supports_streaming,omitempty"`
}

InputPaidMediaVideo struct

https://core.telegram.org/bots/api#inputpaidmediavideo

type InputPollMedia added in v0.13.4

type InputPollMedia any

InputPollMedia represents the content of a poll description or a quiz explanation to be sent.

NOTE: Should be one of: InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaLivePhoto, InputMediaLocation, InputMediaPhoto, InputMediaVenue, or InputMediaVideo.

https://core.telegram.org/bots/api#inputpollmedia

type InputPollOption added in v0.10.8

type InputPollOption struct {
	Text          string               `json:"text"` // 1~100 chars
	TextParseMode ParseMode            `json:"text_parse_mode,omitempty"`
	TextEntities  []MessageEntity      `json:"text_entities,omitempty"`
	Media         InputPollOptionMedia `json:"media,omitempty"`
}

InputPollOption is a struct of an input poll option

https://core.telegram.org/bots/api#inputpolloption

type InputPollOptionMedia added in v0.13.4

type InputPollOptionMedia any

InputPollOptionMedia represents the content of a poll option to be sent.

NOTE: Should be one of: InputMediaAnimation, InputMediaLink, InputMediaLivePhoto, InputMediaLocation, InputMediaPhoto, InputMediaSticker, InputMediaVenue, or InputMediaVideo.

https://core.telegram.org/bots/api#inputpolloptionmedia

type InputProfilePhoto added in v0.11.17

type InputProfilePhoto struct {
	Type InputProfilePhotoType `json:"type"`

	// when Type == InputProfilePhotoStatic
	//
	// https://core.telegram.org/bots/api#inputprofilephotostatic
	Photo *string `json:"photo,omitempty"`

	// when Type == InputProfilePhotoAnimated
	//
	// https://core.telegram.org/bots/api#inputprofilephotoanimated
	Animation          *string  `json:"animation,omitempty"`
	MainFrameTimestamp *float32 `json:"main_frame_timestamp,omitempty"`

	// actual data for file upload
	Filepath *string `json:"-"`
	Bytes    []byte  `json:"-"`
}

InputProfilePhoto describes a profile photo to set.

https://core.telegram.org/bots/api#inputprofilephoto

func NewInputProfilePhotoFromBytes added in v0.12.2

func NewInputProfilePhotoFromBytes(
	photoType InputProfilePhotoType,
	bytes []byte,
) InputProfilePhoto

NewInputProfilePhotoFromBytes generates an InputProfilePhoto from given bytes array.

func NewInputProfilePhotoFromFilepath added in v0.12.2

func NewInputProfilePhotoFromFilepath(
	photoType InputProfilePhotoType,
	filepath string,
) InputProfilePhoto

NewInputProfilePhotoFromFilepath generates an InputProfilePhoto from given filepath.

type InputProfilePhotoType added in v0.12.2

type InputProfilePhotoType string
const (
	InputProfilePhotoStatic   InputProfilePhotoType = "static"
	InputProfilePhotoAnimated InputProfilePhotoType = "animated"
)

type InputRichMessage added in v0.13.5

type InputRichMessage struct {
	HTML                *string `json:"html,omitempty"`
	Markdown            *string `json:"markdown,omitempty"`
	IsRTL               *bool   `json:"is_rtl,omitempty"`
	SkipEntityDetection *bool   `json:"skip_entity_detection,omitempty"`
}

InputRichMessage is a struct which describes a rich message to be sent. Exactly one of the fields `html` or `markdown` must be used.

https://core.telegram.org/bots/api#inputrichmessage

type InputRichMessageContent added in v0.13.5

type InputRichMessageContent struct {
	InputMessageContent

	RichMessage InputRichMessage `json:"rich_message"`
}

InputRichMessageContent is a struct of InputRichMessageContent

https://core.telegram.org/bots/api#inputrichmessagecontent

type InputSticker

type InputSticker struct {
	Sticker      any           `json:"sticker"` // InputFile or `file_id`
	Format       StickerFormat `json:"format"`  // "static" for .webp or .png, "animated" for .tgs, "video" for .webm
	EmojiList    []string      `json:"emoji_list"`
	MaskPosition *MaskPosition `json:"mask_position,omitempty"`
	Keywords     []string      `json:"keywords,omitempty"`
}

InputSticker is a struct for a sticker

NOTE: Can be generated with NewInputSticker() function in types_helper.go

https://core.telegram.org/bots/api#inputsticker

func NewInputSticker added in v0.10.7

func NewInputSticker(
	sticker any,
	format StickerFormat,
	emojiList []string,
) InputSticker

NewInputSticker returns a new InputSticker.

func (InputSticker) SetKeywords added in v0.10.7

func (s InputSticker) SetKeywords(keywords []string) InputSticker

SetKeywords sets the `keywords` value of InputSticker.

func (InputSticker) SetMaskPosition added in v0.10.7

func (s InputSticker) SetMaskPosition(maskPosition MaskPosition) InputSticker

SetMaskPosition sets the `mask_position` value of InputSticker.

type InputStoryContent added in v0.11.17

type InputStoryContent struct {
	Type string `json:"type"`

	// Type == "photo"
	// https://core.telegram.org/bots/api#inputstorycontentphoto
	Photo *string `json:"photo,omitempty"`

	// Type == "video"
	// https://core.telegram.org/bots/api#inputstorycontentvideo
	Video               *string  `json:"video,omitempty"`
	Duration            *float32 `json:"duration,omitempty"`
	CoverFrameTimestamp *float32 `json:"cover_frame_timestamp,omitempty"`
	IsAnimation         *bool    `json:"is_animation,omitempty"`
}

InputStoryContent describes the content of a story to post.

https://core.telegram.org/bots/api#inputstorycontent

type InputTextMessageContent

type InputTextMessageContent struct {
	InputMessageContent

	MessageText        string              `json:"message_text"`
	ParseMode          *ParseMode          `json:"parse_mode,omitempty"`
	CaptionEntities    []MessageEntity     `json:"caption_entities,omitempty"`
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
}

InputTextMessageContent is a struct of InputTextMessageContent

func NewInputTextMessageContent added in v0.10.7

func NewInputTextMessageContent(text string) InputTextMessageContent

NewInputTextMessageContent returns a new InputTextMessageContent with given text.

func (InputTextMessageContent) SetCaptionEntities added in v0.10.7

func (c InputTextMessageContent) SetCaptionEntities(entities []MessageEntity) InputTextMessageContent

SetCaptionEntities sets the `caption_entities` value of InputTextMessageContent.

func (InputTextMessageContent) SetLinkPreviewOptions added in v0.10.7

func (c InputTextMessageContent) SetLinkPreviewOptions(options LinkPreviewOptions) InputTextMessageContent

SetLinkPreviewOptions sets the `link_preview_options` value of InputTextMessageContent.

func (InputTextMessageContent) SetParseMode added in v0.10.7

func (c InputTextMessageContent) SetParseMode(parseMode ParseMode) InputTextMessageContent

SetParseMode sets the `parse_mode` value of InputTextMessageContent.

type InputVenueMessageContent

type InputVenueMessageContent struct {
	InputMessageContent

	Latitude        float32 `json:"latitude"`
	Longitude       float32 `json:"longitude"`
	Title           string  `json:"title"`
	Address         string  `json:"address"`
	FoursquareID    *string `json:"foursquare_id,omitempty"`
	FoursquareType  *string `json:"foursquare_type,omitempty"`
	GooglePlaceID   *string `json:"google_place_id,omitempty"`
	GooglePlaceType *string `json:"google_place_type,omitempty"`
}

InputVenueMessageContent is a struct of InputVenueMessageContent

func NewInputVenueMessageContent added in v0.10.7

func NewInputVenueMessageContent(
	latitude, longitude float32,
	title, address string,
) InputVenueMessageContent

NewInputVenueMessageContent returns a new InputVenueMessageContent.

func (InputVenueMessageContent) SetFoursquareID added in v0.10.7

func (c InputVenueMessageContent) SetFoursquareID(foursquareID string) InputVenueMessageContent

SetFoursquareID sets the `foursquare_id` value of InputVenueMessageContent.

func (InputVenueMessageContent) SetFoursquareType added in v0.10.7

func (c InputVenueMessageContent) SetFoursquareType(foursquareType string) InputVenueMessageContent

SetFoursquareType sets the `foursquare_type` value of InputVenueMessageContent.

func (InputVenueMessageContent) SetGooglePlaceID added in v0.10.7

func (c InputVenueMessageContent) SetGooglePlaceID(googlePlaceID string) InputVenueMessageContent

SetGooglePlaceID sets the `google_place_id` value of InputVenueMessageContent.

func (InputVenueMessageContent) SetGooglePlaceType added in v0.10.7

func (c InputVenueMessageContent) SetGooglePlaceType(googlePlaceType string) InputVenueMessageContent

SetGooglePlaceType sets the `google_place_type` value of InputVenueMessageContent.

type Invoice

type Invoice struct {
	Title          string `json:"title"`
	Description    string `json:"description"`
	StartParameter string `json:"start_parameter"`
	Currency       string `json:"currency"`     // https://core.telegram.org/bots/payments#supported-currencies
	TotalAmount    int    `json:"total_amount"` // https://core.telegram.org/bots/payments/currencies.json
}

Invoice is a struct of Invoice

https://core.telegram.org/bots/api#invoice

type KeyboardButton

type KeyboardButton struct {
	Text              string                           `json:"text"`
	IconCustomEmojiID *string                          `json:"icon_custom_emoji_id,omitempty"`
	Style             *KeyboardStyle                   `json:"style,omitempty"`
	RequestUsers      *KeyboardButtonRequestUsers      `json:"request_users,omitempty"`
	RequestChat       *KeyboardButtonRequestChat       `json:"request_chat,omitempty"`
	RequestManagedBot *KeyboardButtonRequestManagedBot `json:"request_managed_bot,omitempty"`
	RequestContact    *bool                            `json:"request_contact,omitempty"`
	RequestLocation   *bool                            `json:"request_location,omitempty"`
	RequestPoll       *KeyboardButtonPollType          `json:"request_poll,omitempty"`
	WebApp            *WebAppInfo                      `json:"web_app,omitempty"`
}

KeyboardButton is a struct of a keyboard button

NOTE: Can be generated with NewKeyboardButton() function in types_helper.go

https://core.telegram.org/bots/api#keyboardbutton

func NewKeyboardButton added in v0.10.7

func NewKeyboardButton(text string) KeyboardButton

NewKeyboardButton returns a new KeyboardButton.

func NewKeyboardButtons

func NewKeyboardButtons(texts ...string) []KeyboardButton

NewKeyboardButtons is a helper function for generating an array of KeyboardButtons

func (KeyboardButton) SetIconCustomEmojiID added in v0.12.2

func (b KeyboardButton) SetIconCustomEmojiID(iconCustomEmojiID string) KeyboardButton

SetIconCustomEmojiID sets the `icon_custom_emoji_id` value of KeyboardButton.

func (KeyboardButton) SetRequestChat added in v0.10.7

func (b KeyboardButton) SetRequestChat(requestChat KeyboardButtonRequestChat) KeyboardButton

SetRequestChat sets the `request_chat` value of KeyboardButton.

func (KeyboardButton) SetRequestContact added in v0.10.7

func (b KeyboardButton) SetRequestContact(requestContact bool) KeyboardButton

SetRequestContact sets the `request_contact` value of KeyboardButton.

func (KeyboardButton) SetRequestLocation added in v0.10.7

func (b KeyboardButton) SetRequestLocation(requestLocation bool) KeyboardButton

SetRequestLocation sets the `request_location` value of KeyboardButton.

func (KeyboardButton) SetRequestPoll added in v0.10.7

func (b KeyboardButton) SetRequestPoll(requestPoll KeyboardButtonPollType) KeyboardButton

SetRequestPoll sets the `request_poll` value of KeyboardButton.

func (KeyboardButton) SetRequestUsers added in v0.10.7

func (b KeyboardButton) SetRequestUsers(requestUsers KeyboardButtonRequestUsers) KeyboardButton

SetRequestUsers sets the `request_users` value of KeyboardButton.

func (KeyboardButton) SetStyle added in v0.12.2

func (b KeyboardButton) SetStyle(style KeyboardStyle) KeyboardButton

SetStyle sets the `style` value of KeyboardButton.

func (KeyboardButton) SetWebApp added in v0.10.7

func (b KeyboardButton) SetWebApp(webApp WebAppInfo) KeyboardButton

SetWebApp sets the `web_app` value of KeyboardButton.

type KeyboardButtonPollType

type KeyboardButtonPollType struct {
	Type *string `json:"type,omitempty"` // "quiz", "regular", or anything
}

KeyboardButtonPollType is a struct for KeyboardButtonPollType

NOTE: Can be generated with NewKeyboardButtonPollType() function in types_helper.go

https://core.telegram.org/bots/api#keyboardbuttonpolltype

func NewKeyboardButtonPollType added in v0.10.7

func NewKeyboardButtonPollType(typ string) KeyboardButtonPollType

NewKeyboardButtonPollType returns a new KeyboardButtonPollType.

type KeyboardButtonRequestChat

type KeyboardButtonRequestChat struct {
	RequestID               int64                    `json:"request_id"`
	ChatIsChannel           bool                     `json:"chat_is_channel"`
	ChatIsForum             *bool                    `json:"chat_is_forum,omitempty"`
	ChatHasUsername         *bool                    `json:"chat_has_username,omitempty"`
	ChatIsCreated           *bool                    `json:"chat_is_created,omitempty"`
	UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"`
	BotAdministratorRights  *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"`
	BotIsMember             *bool                    `json:"bot_is_member,omitempty"`
	RequestTitle            *bool                    `json:"request_title,omitempty"`
	RequestUsername         *bool                    `json:"request_username,omitempty"`
	RequestPhoto            *bool                    `json:"request_photo,omitempty"`
}

KeyboardButtonRequestChat is a struct for `request_chat` in KeyboardButton

NOTE: Can be generated with NewKeyboardButtonRequestChat() function in types_helper.go

https://core.telegram.org/bots/api#keyboardbuttonrequestchat

func NewKeyboardButtonRequestChat added in v0.10.7

func NewKeyboardButtonRequestChat(
	requestID int64,
	isChannel bool,
) KeyboardButtonRequestChat

NewKeyboardButtonRequestChat returns a new KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetBotAdministratorRights added in v0.10.7

func (c KeyboardButtonRequestChat) SetBotAdministratorRights(botAdminRights ChatAdministratorRights) KeyboardButtonRequestChat

SetBotAdministratorRights sets the `bot_administrator_rights` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetBotIsMember added in v0.10.7

func (c KeyboardButtonRequestChat) SetBotIsMember(isMember bool) KeyboardButtonRequestChat

SetBotIsMember sets the `bot_is_member` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetChatHasUsername added in v0.10.7

func (c KeyboardButtonRequestChat) SetChatHasUsername(hasUsername bool) KeyboardButtonRequestChat

SetChatHasUsername sets the `chat_has_username` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetChatIsCreated added in v0.10.7

func (c KeyboardButtonRequestChat) SetChatIsCreated(isCreated bool) KeyboardButtonRequestChat

SetChatIsCreated sets the `chat_is_created` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetChatIsForum added in v0.10.7

func (c KeyboardButtonRequestChat) SetChatIsForum(isForum bool) KeyboardButtonRequestChat

SetChatIsForum sets the `chat_is_forum` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetRequestPhoto added in v0.10.7

func (c KeyboardButtonRequestChat) SetRequestPhoto(requestPhoto bool) KeyboardButtonRequestChat

SetRequestPhoto sets the `request_photo` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetRequestTitle added in v0.10.7

func (c KeyboardButtonRequestChat) SetRequestTitle(requestTitle bool) KeyboardButtonRequestChat

SetRequestTitle sets the `request_title` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetRequestUsername added in v0.10.7

func (c KeyboardButtonRequestChat) SetRequestUsername(requestUsername bool) KeyboardButtonRequestChat

SetRequestUsername sets the `request_username` value of KeyboardButtonRequestChat.

func (KeyboardButtonRequestChat) SetUserAdministratorRights added in v0.10.7

func (c KeyboardButtonRequestChat) SetUserAdministratorRights(userAdminRights ChatAdministratorRights) KeyboardButtonRequestChat

SetUserAdministratorRights sets the `user_administrator_rights` value of KeyboardButtonRequestChat.

type KeyboardButtonRequestManagedBot added in v0.13.3

type KeyboardButtonRequestManagedBot struct {
	RequestID         int64   `json:"request_id"`
	SuggestedName     *string `json:"suggested_name,omitempty"`
	SuggestedUsername *string `json:"suggested_username,omitempty"`
}

KeyboardButtonRequestManagedBot is a struct for `request_managed_bot` in KeyboardButton

https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot

func NewKeyboardButtonRequestManagedBot added in v0.13.3

func NewKeyboardButtonRequestManagedBot(
	requestID int64,
) KeyboardButtonRequestManagedBot

NewKeyboardButtonRequestManagedBot returns a new KeyboardButtonRequestManagedBot.

func (KeyboardButtonRequestManagedBot) SetSuggestedName added in v0.13.3

SetSuggestedName sets the `suggested_name` value of KeyboardButtonRequestManagedBot.

func (KeyboardButtonRequestManagedBot) SetSuggestedUsername added in v0.13.3

func (m KeyboardButtonRequestManagedBot) SetSuggestedUsername(suggestedUsername string) KeyboardButtonRequestManagedBot

SetSuggestedUsername sets the `suggested_username` value of KeyboardButtonRequestManagedBot.

type KeyboardButtonRequestUsers

type KeyboardButtonRequestUsers struct {
	RequestID       int64 `json:"request_id"`
	UserIsBot       *bool `json:"user_is_bot,omitempty"`
	UserIsPremium   *bool `json:"user_is_premium,omitempty"`
	MaxQuantity     *int  `json:"max_quantity,omitempty"`
	RequestName     *bool `json:"request_name,omitempty"`
	RequestUsername *bool `json:"request_username,omitempty"`
	RequestPhoto    *bool `json:"request_photo,omitempty"`
}

KeyboardButtonRequestUsers is a struct for `request_users` in KeyboardButton

NOTE: Can be generated with NewKeyboardButtonRequestUsers() function in types_helper.go

https://core.telegram.org/bots/api#keyboardbuttonrequestusers

func NewKeyboardButtonRequestUsers added in v0.10.7

func NewKeyboardButtonRequestUsers(requestID int64) KeyboardButtonRequestUsers

NewKeyboardButtonRequestUsers returns a new KeyboardButtonRequestUsers.

func (KeyboardButtonRequestUsers) SetMaxQuantity added in v0.10.7

func (u KeyboardButtonRequestUsers) SetMaxQuantity(maxQuantity int) KeyboardButtonRequestUsers

SetMaxQuantity sets the `max_quantity` value of KeyboardButtonRequestUsers.

func (KeyboardButtonRequestUsers) SetRequestName added in v0.10.7

func (u KeyboardButtonRequestUsers) SetRequestName(requestName bool) KeyboardButtonRequestUsers

SetRequestName sets the `request_name` value of KeyboardButtonRequestUsers.

func (KeyboardButtonRequestUsers) SetRequestPhoto added in v0.10.7

func (u KeyboardButtonRequestUsers) SetRequestPhoto(requestPhoto bool) KeyboardButtonRequestUsers

SetRequestPhoto sets the `request_photo` value of KeyboardButtonRequestUsers.

func (KeyboardButtonRequestUsers) SetRequestUsername added in v0.10.7

func (u KeyboardButtonRequestUsers) SetRequestUsername(requestUsername bool) KeyboardButtonRequestUsers

SetRequestUsername sets the `request_username` value of KeyboardButtonRequestUsers.

func (KeyboardButtonRequestUsers) SetUserIsBot added in v0.10.7

SetUserIsBot sets the `user_is_bot` value of KeyboardButtonRequestUsers.

func (KeyboardButtonRequestUsers) SetUserIsPremium added in v0.10.7

func (u KeyboardButtonRequestUsers) SetUserIsPremium(userIsPremium bool) KeyboardButtonRequestUsers

SetUserIsPremium sets the `user_is_premium` value of KeyboardButtonRequestUsers.

type KeyboardStyle added in v0.12.2

type KeyboardStyle string
const (
	KeyboardStyleDanger  KeyboardStyle = "danger"  // red
	KeyboardStyleSuccess KeyboardStyle = "success" // green
	KeyboardStylePrimary KeyboardStyle = "primary" // blue
)

type LabeledPrice

type LabeledPrice struct {
	Label  string `json:"label"`
	Amount int    `json:"amount"`
}

LabeledPrice is a struct of labeled prices

https://core.telegram.org/bots/api#labeledprice

type Link struct {
	URL string `json:"url"`
}

Link is a struct which represents an HTTP link.

https://core.telegram.org/bots/api#link

type LinkPreviewOptions

type LinkPreviewOptions struct {
	IsDisabled       *bool   `json:"is_disabled,omitempty"`
	URL              *string `json:"url,omitempty"`
	PreferSmallMedia *bool   `json:"prefer_small_media,omitempty"`
	PreferLargeMedia *bool   `json:"prefer_large_media,omitempty"`
	ShowAboveText    *bool   `json:"show_above_text,omitempty"`
}

LinkPreviewOptions is a struct for link preview

NOTE: Can be generated with NewLinkPreviewOptions() function in types_helper.go

https://core.telegram.org/bots/api#linkpreviewoptions

func NewLinkPreviewOptions added in v0.10.7

func NewLinkPreviewOptions() LinkPreviewOptions

NewLinkPreviewOptions returns a new LinkPreviewOptions.

func (LinkPreviewOptions) SetIsDisabled added in v0.10.7

func (o LinkPreviewOptions) SetIsDisabled(disabled bool) LinkPreviewOptions

SetIsDisabled sets the `is_disabled` value of LinkPreviewOptions.

func (LinkPreviewOptions) SetPreferLargeMedia added in v0.10.7

func (o LinkPreviewOptions) SetPreferLargeMedia(preferLargeMedia bool) LinkPreviewOptions

SetPreferLargeMedia sets the `prefer_large_media` value of LinkPreviewOptions.

func (LinkPreviewOptions) SetPreferSmallMedia added in v0.10.7

func (o LinkPreviewOptions) SetPreferSmallMedia(preferSmallMedia bool) LinkPreviewOptions

SetPreferSmallMedia sets the `prefer_small_media` value of LinkPreviewOptions.

func (LinkPreviewOptions) SetShowAboveText added in v0.10.7

func (o LinkPreviewOptions) SetShowAboveText(showAboveText bool) LinkPreviewOptions

SetShowAboveText sets the `show_above_text` value of LinkPreviewOptions.

func (LinkPreviewOptions) SetURL added in v0.10.7

SetURL sets the `url` value of LinkPreviewOptions.

type LivePhoto added in v0.13.4

type LivePhoto struct {
	Photo        []PhotoSize `json:"photo,omitempty"`
	FileID       string      `json:"file_id"`
	FileUniqueID string      `json:"file_unique_id"`
	Width        int         `json:"width"`
	Height       int         `json:"height"`
	Duration     int         `json:"duration"`
	MimeType     *string     `json:"mime_type,omitempty"`
	FileSize     *int64      `json:"file_size,omitempty"`
}

LivePhoto is a struct for a live photo

https://core.telegram.org/bots/api#livephoto

type Location

type Location struct {
	Longitude            float32 `json:"longitude"`
	Latitude             float32 `json:"latitude"`
	HorizontalAccuracy   float32 `json:"horizontal_accuracy,omitempty"`
	LivePeriod           *int    `json:"live_period,omitempty"`
	Heading              *int    `json:"heading,omitempty"`
	ProximityAlertRadius *int    `json:"proximity_alert_radius,omitempty"`
}

Location is a struct for a location

https://core.telegram.org/bots/api#location

type LocationAddress added in v0.11.17

type LocationAddress struct {
	CountryCode string  `json:"country_code"`
	State       *string `json:"state,omitempty"`
	City        *string `json:"city,omitempty"`
	Street      *string `json:"street,omitempty"`
}

LocationAddress describes the physical address of a location.

https://core.telegram.org/bots/api#locationaddress

type LoginURL

type LoginURL struct {
	URL                string  `json:"url"`
	ForwardText        *string `json:"forward_text,omitempty"`
	BotUsername        *string `json:"bot_username,omitempty"`
	RequestWriteAccess *bool   `json:"request_write_access,omitempty"`
}

LoginURL is a struct for LoginURL

NOTE: Can be generated with NewLoginURL() function in types_helper.go

https://core.telegram.org/bots/api#loginurl

func NewLoginURL added in v0.10.7

func NewLoginURL(url string) LoginURL

NewLoginURL returns a new LoginURL.

func (LoginURL) SetBotUsername added in v0.10.7

func (u LoginURL) SetBotUsername(username string) LoginURL

SetBotUsername sets the `bot_username` value of LoginURL.

func (LoginURL) SetForwardText added in v0.10.7

func (u LoginURL) SetForwardText(text string) LoginURL

SetForwardText sets the `forward_text` value of LoginURL.

func (LoginURL) SetRequestWriteAccess added in v0.10.7

func (u LoginURL) SetRequestWriteAccess(request bool) LoginURL

SetRequestWriteAccess sets the `request_write_access` value of LoginURL.

type ManagedBotCreated added in v0.13.3

type ManagedBotCreated struct {
	Bot User `json:"bot"`
}

ManagedBotCreated contains information about the bot that was created to be managed by the current bot.

https://core.telegram.org/bots/api#managedbotcreated

type ManagedBotUpdated added in v0.13.3

type ManagedBotUpdated struct {
	User User `json:"user"`
	Bot  User `json:"bot"`
}

ManagedBotUpdated contains information about the creation or token update of a bot that is managed by the current bot.

https://core.telegram.org/bots/api#managedbotupdated

type MaskPosition

type MaskPosition struct {
	Point  MaskPositionPoint `json:"point"`
	XShift float32           `json:"x_shift"`
	YShift float32           `json:"y_shift"`
	Scale  float32           `json:"scale"`
}

MaskPosition is a struct for a mask position

NOTE: Can be generated with NewMaskPosition() function in types_helper.go

https://core.telegram.org/bots/api#maskposition

func NewMaskPosition added in v0.10.7

func NewMaskPosition(
	point MaskPositionPoint,
	xShift, yShift, scale float32,
) MaskPosition

NewMaskPosition returns a new MaskPosition.

type MaskPositionPoint

type MaskPositionPoint string

MaskPositionPoint is a point in MaskPosition

https://core.telegram.org/bots/api#maskposition

const (
	MaskPositionForehead MaskPositionPoint = "forehead"
	MaskPositionEyes     MaskPositionPoint = "eyes"
	MaskPositionMouth    MaskPositionPoint = "mouth"
	MaskPositionChin     MaskPositionPoint = "chin"
)

MaskPosition points

type MaybeInaccessibleMessage

type MaybeInaccessibleMessage Message

MaybeInaccessibleMessage is a struct of a message that can be one of `Message` or `InaccessibleMessage`

https://core.telegram.org/bots/api#maybeinaccessiblemessage

func (*MaybeInaccessibleMessage) AsMessage

AsMessage returns its value as `Message` or `InaccessibleMessage`

func (*MaybeInaccessibleMessage) IsInaccessible

func (m *MaybeInaccessibleMessage) IsInaccessible() bool

IsInaccessible returns true if it is inaccessible

type MenuButton any

MenuButton is a generic type of the bot's menu buttons

https://core.telegram.org/bots/api#menubutton

type MenuButtonCommands struct {
	Type string `json:"type"` // = "commands"
}

MenuButtonCommands is a struct for a menu button which opens the bot's commands list

https://core.telegram.org/bots/api#menubuttoncommands

type MenuButtonDefault struct {
	Type string `json:"type"` // = "default"
}

MenuButtonDefault is a struct for a menu button with no specific value

https://core.telegram.org/bots/api#menubuttondefault

type MenuButtonWebApp struct {
	Type   string     `json:"type"` // = "web_app"
	Text   string     `json:"text"`
	WebApp WebAppInfo `json:"web_app"`
}

MenuButtonWebApp is a struct for a menu button which launches a web app

https://core.telegram.org/bots/api#menubuttonwebapp

type Message

type Message struct {
	MessageID                     int64                          `json:"message_id"`
	MessageThreadID               *int64                         `json:"message_thread_id,omitempty"`
	DirectMessagesTopic           *DirectMessagesTopic           `json:"direct_messages_topic,omitempty"`
	From                          *User                          `json:"from,omitempty"`
	SenderChat                    *Chat                          `json:"sender_chat,omitempty"`
	SenderBoostCount              *int                           `json:"sender_boost_count,omitempty"`
	SenderBusinessBot             *User                          `json:"sender_business_bot,omitempty"`
	SenderTag                     *string                        `json:"sender_tag,omitempty"`
	Date                          int                            `json:"date"`
	GuestQueryID                  *string                        `json:"guest_query_id,omitempty"`
	BusinessConnectionID          *string                        `json:"business_connection_id,omitempty"`
	Chat                          Chat                           `json:"chat"`
	ForwardOrigin                 *MessageOrigin                 `json:"forward_origin,omitempty"`
	IsTopicMessage                *bool                          `json:"is_topic_message,omitempty"`
	IsAutomaticForward            *bool                          `json:"is_automatic_forward,omitempty"`
	ReplyToMessage                *Message                       `json:"reply_to_message,omitempty"`
	ExternalReply                 *ExternalReplyInfo             `json:"external_reply,omitempty"`
	Quote                         *TextQuote                     `json:"quote,omitempty"`
	ReplyToStory                  *Story                         `json:"reply_to_story,omitempty"`
	ReplyToChecklistTaskID        *int64                         `json:"reply_to_checklist_task_id,omitempty"`
	ReplyToPollOptionID           *string                        `json:"reply_to_poll_option_id,omitempty"`
	ViaBot                        *User                          `json:"via_bot,omitempty"`
	GuestBotCallerUser            *User                          `json:"guest_bot_caller_user,omitempty"`
	GuestBotCallerChat            *Chat                          `json:"guest_bot_caller_chat,omitempty"`
	EditDate                      *int                           `json:"edit_date,omitempty"`
	HasProtectedContent           *bool                          `json:"has_protected_content,omitempty"`
	IsFromOffline                 *bool                          `json:"is_from_offline,omitempty"`
	IsPaidPost                    *bool                          `json:"is_paid_post,omitempty"`
	MediaGroupID                  *string                        `json:"media_group_id,omitempty"`
	AuthorSignature               *string                        `json:"author_signature,omitempty"`
	PaidStarCount                 *int                           `json:"paid_star_count,omitempty"`
	Text                          *string                        `json:"text,omitempty"`
	Entities                      []MessageEntity                `json:"entities,omitempty"`
	LinkPreviewOptions            *LinkPreviewOptions            `json:"link_preview_options,omitempty"`
	SuggestedPostInfo             *SuggestedPostInfo             `json:"suggested_post_info,omitempty"`
	EffectID                      *string                        `json:"effect_id,omitempty"`
	RichMessage                   *RichMessage                   `json:"rich_message,omitempty"`
	Animation                     *Animation                     `json:"animation,omitempty"`
	Audio                         *Audio                         `json:"audio,omitempty"`
	Document                      *Document                      `json:"document,omitempty"`
	LivePhoto                     *LivePhoto                     `json:"live_photo,omitempty"`
	PaidMedia                     *PaidMediaInfo                 `json:"paid_media,omitempty"`
	Photo                         []PhotoSize                    `json:"photo,omitempty"`
	Sticker                       *Sticker                       `json:"sticker,omitempty"`
	Story                         *Story                         `json:"story,omitempty"`
	Video                         *Video                         `json:"video,omitempty"`
	VideoNote                     *VideoNote                     `json:"video_note,omitempty"`
	Voice                         *Voice                         `json:"voice,omitempty"`
	Caption                       *string                        `json:"caption,omitempty"`
	CaptionEntities               []MessageEntity                `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia         *bool                          `json:"show_caption_above_media,omitempty"`
	HasMediaSpoiler               *bool                          `json:"has_media_spoiler,omitempty"`
	Checklist                     *Checklist                     `json:"checklist,omitempty"`
	Contact                       *Contact                       `json:"contact,omitempty"`
	Dice                          *Dice                          `json:"dice,omitempty"`
	Game                          *Game                          `json:"game,omitempty"`
	Poll                          *Poll                          `json:"poll,omitempty"`
	Venue                         *Venue                         `json:"venue,omitempty"`
	Location                      *Location                      `json:"location,omitempty"`
	NewChatMembers                []User                         `json:"new_chat_members,omitempty"`
	LeftChatMember                *User                          `json:"left_chat_member,omitempty"`
	ChatOwnerLeft                 *ChatOwnerLeft                 `json:"chat_owner_left,omitempty"`
	ChatOwnerChanged              *ChatOwnerChanged              `json:"chat_owner_changed,omitempty"`
	NewChatTitle                  *string                        `json:"new_chat_title,omitempty"`
	NewChatPhoto                  []PhotoSize                    `json:"new_chat_photo,omitempty"`
	DeleteChatPhoto               *bool                          `json:"delete_chat_photo,omitempty"`
	GroupChatCreated              *bool                          `json:"group_chat_created,omitempty"`
	SupergroupChatCreated         *bool                          `json:"supergroup_chat_created,omitempty"`
	ChannelChatCreated            *bool                          `json:"channel_chat_created,omitempty"`
	MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"`
	MigrateToChatID               *int64                         `json:"migrate_to_chat_id,omitempty"`
	MigrateFromChatID             *int64                         `json:"migrate_from_chat_id,omitempty"`
	PinnedMessage                 *MaybeInaccessibleMessage      `json:"pinned_message,omitempty"`
	Invoice                       *Invoice                       `json:"invoice,omitempty"`
	SuccessfulPayment             *SuccessfulPayment             `json:"successful_payment,omitempty"`
	RefundedPayment               *RefundedPayment               `json:"refunded_payment,omitempty"`
	UsersShared                   *UsersShared                   `json:"users_shared,omitempty"`
	ChatShared                    *ChatShared                    `json:"chat_shared,omitempty"`
	Gift                          *GiftInfo                      `json:"gift,omitempty"`
	UniqueGift                    *UniqueGiftInfo                `json:"unique_gift,omitempty"`
	GiftUpgradeSent               *GiftInfo                      `json:"gift_upgrade_sent,omitempty"`
	ConnectedWebsite              *string                        `json:"connected_website,omitempty"`
	WriteAccessAllowed            *WriteAccessAllowed            `json:"write_access_allowed,omitempty"`
	// PassportData          *PassportData         `json:"passport_data,omitempty"` // NOT IMPLEMENTED: https://core.telegram.org/bots/api#passportdata
	ProximityAlertTriggered      *ProximityAlertTriggered      `json:"proximity_alert_triggered,omitempty"`
	BoostAdded                   *ChatBoostAdded               `json:"boost_added,omitempty"`
	ChatBackgroundSet            *ChatBackground               `json:"chat_background_set,omitempty"`
	ChecklistTasksDone           *ChecklistTasksDone           `json:"checklist_tasks_done,omitempty"`
	ChecklistTasksAdded          *ChecklistTasksAdded          `json:"checklist_tasks_added,omitempty"`
	DirectMessagePriceChanged    *DirectMessagePriceChanged    `json:"direct_message_price_changed,omitempty"`
	ForumTopicCreated            *ForumTopicCreated            `json:"forum_topic_created,omitempty"`
	ForumTopicEdited             *ForumTopicEdited             `json:"forum_topic_edited,omitempty"`
	ForumTopicClosed             *ForumTopicClosed             `json:"forum_topic_closed,omitempty"`
	ForumTopicReopened           *ForumTopicReopened           `json:"forum_topic_reopened,omitempty"`
	GeneralForumTopicHidden      *GeneralForumTopicHidden      `json:"general_forum_topic_hidden,omitempty"`
	GeneralForumTopicUnhidden    *GeneralForumTopicUnhidden    `json:"general_forum_topic_unhidden,omitempty"`
	GiveawayCreated              *GiveawayCreated              `json:"giveaway_created,omitempty"`
	Giveaway                     *Giveaway                     `json:"giveaway,omitempty"`
	GiveawayWinners              *GiveawayWinners              `json:"giveaway_winners,omitempty"`
	GiveawayCompleted            *GiveawayCompleted            `json:"giveaway_completed,omitempty"`
	ManagedBotCreated            *ManagedBotCreated            `json:"managed_bot_created,omitempty"`
	PaidMessagePriceChanged      *PaidMessagePriceChanged      `json:"paid_message_price_changed,omitempty"`
	PollOptionAdded              *PollOptionAdded              `json:"poll_option_added,omitempty"`
	PollOptionDeleted            *PollOptionDeleted            `json:"poll_option_deleted,omitempty"`
	SuggestedPostApproved        *SuggestedPostApproved        `json:"suggested_post_approved,omitempty"`
	SuggestedPostApprovalFailed  *SuggestedPostApprovalFailed  `json:"suggested_post_approval_failed,omitempty"`
	SuggestedPostDeclined        *SuggestedPostDeclined        `json:"suggested_post_declined,omitempty"`
	SuggestedPostPaid            *SuggestedPostPaid            `json:"suggested_post_paid,omitempty"`
	SuggestedPostRefunded        *SuggestedPostRefunded        `json:"suggested_post_refunded,omitempty"`
	VideoChatScheduled           *VideoChatScheduled           `json:"video_chat_scheduled,omitempty"`
	VideoChatStarted             *VideoChatStarted             `json:"video_chat_started,omitempty"`
	VideoChatEnded               *VideoChatEnded               `json:"video_chat_ended,omitempty"`
	VideoChatParticipantsInvited *VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"`
	WebAppData                   *WebAppData                   `json:"web_app_data,omitempty"`
	ReplyMarkup                  *InlineKeyboardMarkup         `json:"reply_markup,omitempty"`
}

Message is a struct of a message

https://core.telegram.org/bots/api#message

func (*Message) HasAnimation

func (m *Message) HasAnimation() bool

HasAnimation checks if Message has Animation.

func (*Message) HasAudio

func (m *Message) HasAudio() bool

HasAudio checks if Message has Audio.

func (*Message) HasBoostAdded added in v0.10.9

func (m *Message) HasBoostAdded() bool

HasBoostAdded checks if Message has BoostAdded.

func (*Message) HasCaption

func (m *Message) HasCaption() bool

HasCaption checks if Message has Caption.

func (*Message) HasCaptionEntities added in v0.10.9

func (m *Message) HasCaptionEntities() bool

HasCaptionEntities checks if Message has CaptionEntities

func (*Message) HasChatBackgroundSet added in v0.10.9

func (m *Message) HasChatBackgroundSet() bool

HasChatBackgroundSet checks if Message has ChatBackgroundSet.

func (*Message) HasChatShared added in v0.10.9

func (m *Message) HasChatShared() bool

HasChatShared checks if Message has ChatShared.

func (*Message) HasConnectedWebsite added in v0.10.9

func (m *Message) HasConnectedWebsite() bool

HasConnectedWebsite checks if Message has ConnectedWebsite.

func (*Message) HasContact

func (m *Message) HasContact() bool

HasContact checks if Message has Contact.

func (*Message) HasDice added in v0.10.9

func (m *Message) HasDice() bool

HasDice checks if Message has Dice.

func (*Message) HasDocument

func (m *Message) HasDocument() bool

HasDocument checks if Message has Document.

func (*Message) HasEditDate added in v0.10.9

func (m *Message) HasEditDate() bool

HasEditDate checks if Message has EditDate.

func (*Message) HasForumTopicClosed added in v0.10.9

func (m *Message) HasForumTopicClosed() bool

HasForumTopicClosed checks if Message has ForumTopicClosed.

func (*Message) HasForumTopicCreated added in v0.10.9

func (m *Message) HasForumTopicCreated() bool

HasForumTopicCreated checks if Message has ForumTopicCreated.

func (*Message) HasForumTopicEdited added in v0.10.9

func (m *Message) HasForumTopicEdited() bool

HasForumTopicEdited checks if Message has ForumTopicEdited.

func (*Message) HasForumTopicReopened added in v0.10.9

func (m *Message) HasForumTopicReopened() bool

HasForumTopicReopened checks if Message has ForumTopicReopened.

func (*Message) HasForwardFrom

func (m *Message) HasForwardFrom() bool

HasForwardFrom checks if Message has Forward.

func (*Message) HasForwardFromChat

func (m *Message) HasForwardFromChat() bool

HasForwardFromChat checks if Message has Forward from chat.

func (*Message) HasGame

func (m *Message) HasGame() bool

HasGame checks if Message has Game.

func (*Message) HasGeneralForumTopicHidden added in v0.10.9

func (m *Message) HasGeneralForumTopicHidden() bool

HasGeneralForumTopicHidden checks if Message has GeneralForumTopicHidden.

func (*Message) HasGeneralForumTopicUnhidden added in v0.10.9

func (m *Message) HasGeneralForumTopicUnhidden() bool

HasGeneralForumTopicUnhidden checks if Message has GeneralForumTopicUnhidden.

func (*Message) HasGiveaway added in v0.10.9

func (m *Message) HasGiveaway() bool

HasGiveaway checks if Message has Giveaway.

func (*Message) HasGiveawayCompleted added in v0.10.9

func (m *Message) HasGiveawayCompleted() bool

HasGiveawayCompleted checks if Message has GiveawayCompleted.

func (*Message) HasGiveawayCreated added in v0.10.9

func (m *Message) HasGiveawayCreated() bool

HasGiveawayCreated checks if Message has GiveawayCreated.

func (*Message) HasGiveawayWinners added in v0.10.9

func (m *Message) HasGiveawayWinners() bool

HasGiveawayWinners checks if Message has GiveawayWinners.

func (*Message) HasInvoice added in v0.10.9

func (m *Message) HasInvoice() bool

HasInvoice checks if Message has Invoice.

func (*Message) HasLeftChatMember

func (m *Message) HasLeftChatMember() bool

HasLeftChatMember checks if Message has LeftChatParticipant.

func (*Message) HasLocation

func (m *Message) HasLocation() bool

HasLocation checks if Message has Location.

func (*Message) HasMessageAutoDeleteTimerChanged added in v0.10.9

func (m *Message) HasMessageAutoDeleteTimerChanged() bool

HasMessageAutoDeleteTimerChanged checks if Message has MessageAutoDeleteTimerChanged.

func (*Message) HasMessageEntities

func (m *Message) HasMessageEntities() bool

HasMessageEntities checks if Message has MessageEntities

func (*Message) HasNewChatMembers

func (m *Message) HasNewChatMembers() bool

HasNewChatMembers checks if Message has NewChatParticipant.

func (*Message) HasNewChatPhoto

func (m *Message) HasNewChatPhoto() bool

HasNewChatPhoto checks if Message has NewChatPhoto.

func (*Message) HasNewChatTitle

func (m *Message) HasNewChatTitle() bool

HasNewChatTitle checks if Message has NewChatTitle.

func (*Message) HasPhoto

func (m *Message) HasPhoto() bool

HasPhoto checks if Message has Photo.

func (*Message) HasPinnedMessage

func (m *Message) HasPinnedMessage() bool

HasPinnedMessage checks if Message has PinnedMessage.

func (*Message) HasPoll

func (m *Message) HasPoll() bool

HasPoll checks if Message has Poll.

func (*Message) HasProximityAlertTriggered added in v0.10.9

func (m *Message) HasProximityAlertTriggered() bool

HasProximityAlertTriggered checks if Message has ProximityAlertTriggered.

func (*Message) HasQuote added in v0.10.9

func (m *Message) HasQuote() bool

HasQuote checks if Message has Quote.

func (*Message) HasReplyMarkup added in v0.10.9

func (m *Message) HasReplyMarkup() bool

HasReplyMarkup checks if Message has ReplyMarkup.

func (*Message) HasReplyToMessage added in v0.10.9

func (m *Message) HasReplyToMessage() bool

HasReplyToMessage checks if Message has ReplyToMessage.

func (*Message) HasReplyToStory added in v0.10.9

func (m *Message) HasReplyToStory() bool

HasReplyToStory checks if Message has ReplyToStory.

func (*Message) HasSticker

func (m *Message) HasSticker() bool

HasSticker checks if Message has Sticker.

func (*Message) HasStory added in v0.10.9

func (m *Message) HasStory() bool

HasStory checks if Message has Story.

func (*Message) HasSuccessfulPayment added in v0.10.9

func (m *Message) HasSuccessfulPayment() bool

HasSuccessfulPayment checks if Message has SuccessfulPayment.

func (*Message) HasText

func (m *Message) HasText() bool

HasText checks if Message has Text.

func (*Message) HasUsersShared added in v0.10.9

func (m *Message) HasUsersShared() bool

HasUsersShared checks if Message has UsersShared.

func (*Message) HasVenue

func (m *Message) HasVenue() bool

HasVenue checks if Message has Venue.

func (*Message) HasVideo

func (m *Message) HasVideo() bool

HasVideo checks if Message has Video.

func (*Message) HasVideoChatEnded added in v0.10.9

func (m *Message) HasVideoChatEnded() bool

HasVideoChatEnded checks if Message has VideoChatEnded.

func (*Message) HasVideoChatParticipantsInvited added in v0.10.9

func (m *Message) HasVideoChatParticipantsInvited() bool

HasVideoChatParticipantsInvited checks if Message has VideoChatParticipantsInvited.

func (*Message) HasVideoChatScheduled added in v0.10.9

func (m *Message) HasVideoChatScheduled() bool

HasVideoChatScheduled checks if Message has VideoChatScheduled.

func (*Message) HasVideoChatStarted added in v0.10.9

func (m *Message) HasVideoChatStarted() bool

HasVideoChatStarted checks if Message has VideoChatStarted.

func (*Message) HasVideoNote added in v0.10.9

func (m *Message) HasVideoNote() bool

HasVideoNote checks if Message has VideoNote.

func (*Message) HasVoice

func (m *Message) HasVoice() bool

HasVoice checks if Message has Voice.

func (*Message) HasWebAppData added in v0.10.9

func (m *Message) HasWebAppData() bool

HasWebAppData checks if Message has WebAppData.

func (*Message) HasWriteAccessAllowed added in v0.10.9

func (m *Message) HasWriteAccessAllowed() bool

HasWriteAccessAllowed checks if Message has WriteAccessAllowed.

func (*Message) IsBot added in v0.10.9

func (m *Message) IsBot() bool

IsBot checks if Message is from bot.

func (*Message) LargestPhoto

func (m *Message) LargestPhoto() PhotoSize

LargestPhoto returns a photo with the largest file size.

type MessageAutoDeleteTimerChanged

type MessageAutoDeleteTimerChanged struct {
	MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}

MessageAutoDeleteTimerChanged is service message: message auto delete timer changed

https://core.telegram.org/bots/api#messageautodeletetimerchanged

type MessageEntity

type MessageEntity struct {
	Type           MessageEntityType `json:"type"`
	Offset         int               `json:"offset"`
	Length         int               `json:"length"`
	URL            *string           `json:"url,omitempty"`              // when Type == MessageEntityTypeTextLink
	User           *User             `json:"user,omitempty"`             // when Type == MessageEntityTypeTextMention
	Language       *string           `json:"language,omitempty"`         // when Type == MessageEntityTypePre
	CustomEmojiID  *string           `json:"custom_emoji_id,omitempty"`  // when Type == MessageEntityTypeCustomEmoji
	UnixTime       *int              `json:"unix_time,omitempty"`        // when Type == MessageEntityTypeDateTime
	DateTimeFormat *string           `json:"date_time_format,omitempty"` // when Type == MessageEntityTypeDateTime
}

MessageEntity is a struct of a message entity

NOTE: Can be generated with NewMessageEntity() function in types_helper.go

https://core.telegram.org/bots/api#messageentity

func NewMessageEntity added in v0.10.7

func NewMessageEntity(typ MessageEntityType, offset, length int) MessageEntity

NewMessageEntity returns a new MessageEntity.

func (MessageEntity) SetCustomEmojiID added in v0.10.7

func (m MessageEntity) SetCustomEmojiID(customEmojiID string) MessageEntity

SetCustomEmojiID sets the `custom_emoji_id` value of MessageEntity.

func (MessageEntity) SetLanguage added in v0.10.7

func (m MessageEntity) SetLanguage(language string) MessageEntity

SetLanguage sets the `language` value of MessageEntity.

func (MessageEntity) SetURL added in v0.10.7

func (m MessageEntity) SetURL(url string) MessageEntity

SetURL sets the `url` value of MessageEntity.

func (MessageEntity) SetUser added in v0.10.7

func (m MessageEntity) SetUser(user User) MessageEntity

SetUser sets the `user` value of MessageEntity.

type MessageEntityType

type MessageEntityType string

MessageEntityType is a type of MessageEntity

https://core.telegram.org/bots/api#messageentity

const (
	MessageEntityTypeMention       MessageEntityType = "mention"
	MessageEntityTypeHashTag       MessageEntityType = "hashtag"
	MessageEntityTypeCashTag       MessageEntityType = "cashtag"
	MessageEntityTypeBotCommand    MessageEntityType = "bot_command"
	MessageEntityTypeURL           MessageEntityType = "url"
	MessageEntityTypeEmail         MessageEntityType = "email"
	MessageEntityTypePhoneNumber   MessageEntityType = "phone_number"
	MessageEntityTypeBold          MessageEntityType = "bold"
	MessageEntityTypeItalic        MessageEntityType = "italic"
	MessageEntityTypeUnderline     MessageEntityType = "underline"
	MessageEntityTypeStrikethrough MessageEntityType = "strikethrough"
	MessageEntityTypeSpoiler       MessageEntityType = "spoiler"
	MessageEntityTypeBlockquote    MessageEntityType = "blockquote"
	MessageEntityTypeCode          MessageEntityType = "code"
	MessageEntityTypePre           MessageEntityType = "pre"
	MessageEntityTypeTextLink      MessageEntityType = "text_link"
	MessageEntityTypeTextMention   MessageEntityType = "text_mention"
	MessageEntityTypeCustomEmoji   MessageEntityType = "custom_emoji"
	MessageEntityTypeDateTime      MessageEntityType = "date_time"
)

MessageEntityType strings

type MessageID

type MessageID struct {
	MessageID int64 `json:"message_id"`
}

MessageID is a struct of message id

https://core.telegram.org/bots/api#messageid

type MessageOrigin

type MessageOrigin struct {
	Type string `json:"type"`
	Date int    `json:"date"`

	// https://core.telegram.org/bots/api#messageoriginuser
	SenderUser *User `json:"sender_user,omitempty"`

	// https://core.telegram.org/bots/api#messageoriginhiddenuser
	SenderUserName *string `json:"sender_user_name,omitempty"`

	// https://core.telegram.org/bots/api#messageoriginchat
	SenderChat      *Chat   `json:"sender_chat,omitempty"`
	AuthorSignature *string `json:"author_signature,omitempty"`

	// https://core.telegram.org/bots/api#messageoriginchannel
	Chat      *Chat  `json:"chat,omitempty"`
	MessageID *int64 `json:"message_id,omitempty"`
}

MessageOrigin struct for describing the origin of a message

NOTE: This is a flat union discriminated by `Type`. When the API adds a new message origin type, add any new fields to this struct (grouped by `type` in the field comments below).

https://core.telegram.org/bots/api#messageorigin

type MessageReactionCountUpdated

type MessageReactionCountUpdated struct {
	Chat      Chat            `json:"chat"`
	MessageID int64           `json:"message_id"`
	Date      int             `json:"date"`
	Reactions []ReactionCount `json:"reactions"`
}

MessageReactionCountUpdated is a struct for changes with anonymous reactions on a message

https://core.telegram.org/bots/api#messagereactioncountupdated

type MessageReactionUpdated

type MessageReactionUpdated struct {
	Chat        Chat           `json:"chat"`
	MessageID   int64          `json:"message_id"`
	User        *User          `json:"user,omitempty"`
	ActorChat   *Chat          `json:"actor_chat,omitempty"`
	Date        int            `json:"date"`
	OldReaction []ReactionType `json:"old_reaction"`
	NewReaction []ReactionType `json:"new_reaction"`
}

MessageReactionUpdated is a struct for a change of a reaction on a message

https://core.telegram.org/bots/api#messagereactionupdated

type MethodOptions

type MethodOptions map[string]any

MethodOptions is a type for methods' options parameter.

type OptionsAddStickerToSet

type OptionsAddStickerToSet MethodOptions

OptionsAddStickerToSet struct for AddStickerToSet()

options include: nothing for now

https://core.telegram.org/bots/api#addstickertoset

type OptionsAnswerCallbackQuery

type OptionsAnswerCallbackQuery MethodOptions

OptionsAnswerCallbackQuery struct for AnswerCallbackQuery().

options include: `text`, `show_alert`, `url`, and `cache_time`.

https://core.telegram.org/bots/api#answercallbackquery

func (OptionsAnswerCallbackQuery) SetCacheTime

func (o OptionsAnswerCallbackQuery) SetCacheTime(cacheTime int) OptionsAnswerCallbackQuery

SetCacheTime sets the `cache_time` value of OptionsAnswerCallbackQuery.

func (OptionsAnswerCallbackQuery) SetShowAlert

func (OptionsAnswerCallbackQuery) SetText

SetText sets the `text` value of OptionsAnswerCallbackQuery.

func (OptionsAnswerCallbackQuery) SetURL

SetURL sets the `url` value of OptionsAnswerCallbackQuery.

type OptionsAnswerInlineQuery

type OptionsAnswerInlineQuery MethodOptions

OptionsAnswerInlineQuery struct for AnswerInlineQuery().

options include: `cache_time`, `is_personal`, `next_offset`, `switch_pm_text`, and `switch_pm_parameter`.

https://core.telegram.org/bots/api#answerinlinequery

func (OptionsAnswerInlineQuery) SetButton

SetButton sets the `button` value of OptionsAnswerInlineQuery.

func (OptionsAnswerInlineQuery) SetCacheTime

func (o OptionsAnswerInlineQuery) SetCacheTime(cacheTime int) OptionsAnswerInlineQuery

SetCacheTime sets the `cache_time` value of OptionsAnswerInlineQuery.

func (OptionsAnswerInlineQuery) SetIsPersonal

func (o OptionsAnswerInlineQuery) SetIsPersonal(isPersonal bool) OptionsAnswerInlineQuery

SetIsPersonal sets the `is_personal` value of OptionsAnswerInlineQuery.

func (OptionsAnswerInlineQuery) SetNextOffset

func (o OptionsAnswerInlineQuery) SetNextOffset(nextOffset string) OptionsAnswerInlineQuery

SetNextOffset sets the `next_offset` value of OptionsAnswerInlineQuery.

type OptionsApproveSuggestedPost added in v0.11.19

type OptionsApproveSuggestedPost MethodOptions

OptionsApproveSuggestedPost struct for ApproveSuggestedPost().

options include: `send_date`.

https://core.telegram.org/bots/api#approvesuggestedpost

func (OptionsApproveSuggestedPost) SetSendDate added in v0.11.19

SetSendDate sets the `send_date` value of OptionsApproveSuggestedPost.

type OptionsBanChatMember

type OptionsBanChatMember MethodOptions

OptionsBanChatMember struct for BanChatMember().

options include: `until_date` and `revoke_messages`.

https://core.telegram.org/bots/api#banchatmember

func (OptionsBanChatMember) SetRevokeMessages

func (o OptionsBanChatMember) SetRevokeMessages(revokeMessages bool) OptionsBanChatMember

SetRevokeMessages sets the `revoke_messages` value of OptionsBanChatMember.

func (OptionsBanChatMember) SetUntilDate

func (o OptionsBanChatMember) SetUntilDate(untilDate int) OptionsBanChatMember

SetUntilDate sets the `until_date` value of OptionsBanChatMember.

type OptionsCopyMessage

type OptionsCopyMessage MethodOptions

OptionsCopyMessage struct for CopyMessage().

options include: `message_thread_id`, `direct_messages_topic_id`, `video_start_timestamp`, `caption`, `parse_mode`, `caption_entities`, `show_caption_above_media`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`

https://core.telegram.org/bots/api#copymessage

func (OptionsCopyMessage) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsCopyMessage) SetAllowPaidBroadcast(allow bool) OptionsCopyMessage

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetCaption

func (o OptionsCopyMessage) SetCaption(caption string) OptionsCopyMessage

SetCaption sets the `caption` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetCaptionEntities

func (o OptionsCopyMessage) SetCaptionEntities(entities []MessageEntity) OptionsCopyMessage

SetCaptionEntities sets the `caption_entities` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsCopyMessage) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsCopyMessage

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetDisableNotification

func (o OptionsCopyMessage) SetDisableNotification(disable bool) OptionsCopyMessage

SetDisableNotification sets the `disable_notification` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetMessageEffectID added in v0.12.1

func (o OptionsCopyMessage) SetMessageEffectID(messageEffectID string) OptionsCopyMessage

SetMessageEffectID sets the `message_effect_id` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetMessageThreadID

func (o OptionsCopyMessage) SetMessageThreadID(messageThreadID int64) OptionsCopyMessage

SetMessageThreadID sets the `message_thread_id` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetParseMode

func (o OptionsCopyMessage) SetParseMode(parseMode ParseMode) OptionsCopyMessage

SetParseMode sets the `parse_mode` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetProtectContent

func (o OptionsCopyMessage) SetProtectContent(protect bool) OptionsCopyMessage

SetProtectContent sets the `protect_content` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetReplyMarkup

func (o OptionsCopyMessage) SetReplyMarkup(replyMarkup any) OptionsCopyMessage

SetReplyMarkup sets the reply_markup value of OptionsCopyMessage.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsCopyMessage) SetReplyParameters

func (o OptionsCopyMessage) SetReplyParameters(replyParameters ReplyParameters) OptionsCopyMessage

SetReplyParameters sets the `reply_parameters` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetShowCaptionAboveMedia added in v0.11.1

func (o OptionsCopyMessage) SetShowCaptionAboveMedia(showCaptionAboveMedia bool) OptionsCopyMessage

SetShowCaptionAboveMedia sets the `show_caption_above_media` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetSuggestedPostParameters added in v0.11.19

func (o OptionsCopyMessage) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsCopyMessage

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsCopyMessage.

func (OptionsCopyMessage) SetVideoStartTimestamp added in v0.11.14

func (o OptionsCopyMessage) SetVideoStartTimestamp(videoStartTimestamp int) OptionsCopyMessage

SetVideoStartTimestamp sets the `video_start_timestamp` value of OptionsCopyMessage.

type OptionsCopyMessages

type OptionsCopyMessages MethodOptions

OptionsCopyMessages struct for CopyMessages().

options include: `message_thread_id`, `direct_messages_topic_id`, `disable_notification`, `protect_content`, and `remove_caption`

https://core.telegram.org/bots/api#copymessages

func (OptionsCopyMessages) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsCopyMessages) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsCopyMessages

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsCopyMessages.

func (OptionsCopyMessages) SetDisableNotification

func (o OptionsCopyMessages) SetDisableNotification(disable bool) OptionsCopyMessages

SetDisableNotification sets the `disable_notification` value of OptionsCopyMessages.

func (OptionsCopyMessages) SetMessageThreadID

func (o OptionsCopyMessages) SetMessageThreadID(messageThreadID int64) OptionsCopyMessages

SetMessageThreadID sets the `message_thread_id` value of OptionsCopyMessages.

func (OptionsCopyMessages) SetProtectContent

func (o OptionsCopyMessages) SetProtectContent(protect bool) OptionsCopyMessages

SetProtectContent sets the `protect_content` value of OptionsCopyMessages.

func (OptionsCopyMessages) SetRemoveCaption

func (o OptionsCopyMessages) SetRemoveCaption(removeCaption bool) OptionsCopyMessages

SetRemoveCaption sets the `remove_caption` value of OptionsCopyMessages.

type OptionsCreateChatInviteLink MethodOptions

OptionsCreateChatInviteLink struct for CreateChatInviteLink

options include: `name`, `expire_date`, `member_limit`, and `creates_join_request`.

https://core.telegram.org/bots/api#createchatinvitelink

func (OptionsCreateChatInviteLink) SetCreatesJoinRequest

func (o OptionsCreateChatInviteLink) SetCreatesJoinRequest(createsJoinRequest bool) OptionsCreateChatInviteLink

SetCreatesJoinRequest sets the `creates_join_request` value of OptionsCreateChatInviteLink.

func (OptionsCreateChatInviteLink) SetExpireDate

func (o OptionsCreateChatInviteLink) SetExpireDate(expireDate int) OptionsCreateChatInviteLink

SetExpireDate sets the `expire_date` value of OptionsCreateChatInviteLink.

func (OptionsCreateChatInviteLink) SetMemberLimit

func (o OptionsCreateChatInviteLink) SetMemberLimit(memberLimit int) OptionsCreateChatInviteLink

SetMemberLimit sets the `member_limit` value of OptionsCreateChatInviteLink.

func (OptionsCreateChatInviteLink) SetName

SetName sets the `name` value of OptionsCreateChatInviteLink.

type OptionsCreateChatSubscriptionInviteLink MethodOptions

OptionsCreateChatSubscriptionInviteLink struct for CreateChatSubscriptionInviteLink

options include: `name`.

https://core.telegram.org/bots/api#createchatsubscriptioninvitelink

func (OptionsCreateChatSubscriptionInviteLink) SetName added in v0.11.6

SetName sets the `name` value of OptionsCreateChatSubscriptionInviteLink.

type OptionsCreateForumTopic

type OptionsCreateForumTopic MethodOptions

OptionsCreateForumTopic struct for CreateForumTopic().

https://core.telegram.org/bots/api#createforumtopic

func (OptionsCreateForumTopic) SetIconColor

func (o OptionsCreateForumTopic) SetIconColor(iconColor int) OptionsCreateForumTopic

SetIconColor sets the `icon_color` value of OptionsCreateForumTopic.

func (OptionsCreateForumTopic) SetIconCustomEmojiID

func (o OptionsCreateForumTopic) SetIconCustomEmojiID(iconCustomEmojiID string) OptionsCreateForumTopic

SetIconCustomEmojiID sets the `icon_custom_emoji_id` value of OptionsCreateForumTopic.

type OptionsCreateInvoiceLink MethodOptions

OptionsCreateInvoiceLink struct for CreateInvoiceLink().

options include: `business_connection_id`, `provider_token`, `subscription_period`, `max_tip_amount`, `suggested_tip_amounts`, `provider_data`, `photo_url`, `photo_size`, `photo_width`, `photo_height`, `need_name`, `need_phone_number`, `need_email`, `need_shipping_address`, `send_phone_number_to_provider`, `send_email_to_provider`, and `is_flexible`.

https://core.telegram.org/bots/api#createinvoicelink

func (OptionsCreateInvoiceLink) SetBusinessConnectionID added in v0.11.9

func (o OptionsCreateInvoiceLink) SetBusinessConnectionID(businessConnectionID string) OptionsCreateInvoiceLink

SetBusinessConnectionID sets the `business_connection_id` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetIsFlexible

func (o OptionsCreateInvoiceLink) SetIsFlexible(isFlexible bool) OptionsCreateInvoiceLink

SetIsFlexible sets the `is_flexible` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetMaxTipAmount

func (o OptionsCreateInvoiceLink) SetMaxTipAmount(maxTipAmount int) OptionsCreateInvoiceLink

SetMaxTipAmount sets the `max_tip_amount` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetNeedEmail

func (o OptionsCreateInvoiceLink) SetNeedEmail(needEmail bool) OptionsCreateInvoiceLink

SetNeedEmail sets the `need_email` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetNeedName

func (o OptionsCreateInvoiceLink) SetNeedName(needName bool) OptionsCreateInvoiceLink

SetNeedName sets the `need_name` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetNeedPhoneNumber

func (o OptionsCreateInvoiceLink) SetNeedPhoneNumber(needPhoneNumber bool) OptionsCreateInvoiceLink

SetNeedPhoneNumber sets the `need_phone_number` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetNeedShippingAddress

func (o OptionsCreateInvoiceLink) SetNeedShippingAddress(needShippingAddr bool) OptionsCreateInvoiceLink

SetNeedShippingAddress sets the `need_shipping_address` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetPhotoHeight

func (o OptionsCreateInvoiceLink) SetPhotoHeight(photoHeight int) OptionsCreateInvoiceLink

SetPhotoHeight sets the `photo_height` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetPhotoSize

func (o OptionsCreateInvoiceLink) SetPhotoSize(photoSize int) OptionsCreateInvoiceLink

SetPhotoSize sets the `photo_size` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetPhotoURL

SetPhotoURL sets the `photo_url` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetPhotoWidth

func (o OptionsCreateInvoiceLink) SetPhotoWidth(photoWidth int) OptionsCreateInvoiceLink

SetPhotoWidth sets the `photoWidth` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetProviderData

func (o OptionsCreateInvoiceLink) SetProviderData(providerData string) OptionsCreateInvoiceLink

SetProviderData sets the `provider_data` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetProviderToken added in v0.11.10

func (o OptionsCreateInvoiceLink) SetProviderToken(providerToken string) OptionsCreateInvoiceLink

SetProviderToken sets the `provider_token` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetSendEmailToProvider

func (o OptionsCreateInvoiceLink) SetSendEmailToProvider(sendEmailToProvider bool) OptionsCreateInvoiceLink

SetSendEmailToProvider sets the `send_email_to_provider` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetSendPhoneNumberToProvider

func (o OptionsCreateInvoiceLink) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) OptionsCreateInvoiceLink

SetSendPhoneNumberToProvider sets the `send_phone_number_to_provider` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetSubscriptionPeriod added in v0.11.9

func (o OptionsCreateInvoiceLink) SetSubscriptionPeriod(subscriptionPeriod int) OptionsCreateInvoiceLink

SetSubscriptionPeriod sets the `subscription_period` value of OptionsCreateInvoiceLink.

func (OptionsCreateInvoiceLink) SetSuggestedTipAmounts

func (o OptionsCreateInvoiceLink) SetSuggestedTipAmounts(suggestedTipAmounts []int) OptionsCreateInvoiceLink

SetSuggestedTipAmounts sets the `suggested_tip_amounts` value of OptionsCreateInvoiceLink.

type OptionsCreateNewStickerSet

type OptionsCreateNewStickerSet MethodOptions

OptionsCreateNewStickerSet struct for CreateNewStickerSet().

options include: `sticker_type`, and `needs_repainting`.

https://core.telegram.org/bots/api#createnewstickerset

func (OptionsCreateNewStickerSet) SetNeedsRepainting

func (o OptionsCreateNewStickerSet) SetNeedsRepainting(needsRepainting bool) OptionsCreateNewStickerSet

SetNeedsRepainting sets the `needs_repainting` value of OptionsCreateNewStickerSet.

func (OptionsCreateNewStickerSet) SetStickerType

SetStickerType sets the `sticker_type` value of OptionsCreateNewStickerSet.

type OptionsDeclineSuggestedPost added in v0.11.19

type OptionsDeclineSuggestedPost MethodOptions

OptionsDeclineSuggestedPost struct for DeclineSuggestedPost().

options include: `send_date`.

https://core.telegram.org/bots/api#declinesuggestedpost

func (OptionsDeclineSuggestedPost) SetSendDate added in v0.11.19

SetSendDate sets the `send_date` value of OptionsApproveSuggestedPost.

type OptionsDeleteAllMessageReactions added in v0.13.4

type OptionsDeleteAllMessageReactions MethodOptions

OptionsDeleteAllMessageReactions struct for DeleteAllMessageReactions()

options include: `user_id`, or `actor_chat_id`.

https://core.telegram.org/bots/api#deleteallmessagereactions

func (OptionsDeleteAllMessageReactions) SetActorChatID added in v0.13.4

SetActorChatID sets the `actor_chat_id` value of OptionsDeleteAllMessageReactions.

func (OptionsDeleteAllMessageReactions) SetUserID added in v0.13.4

SetUserID sets the `user_id` value of OptionsDeleteAllMessageReactions.

type OptionsDeleteMessageReaction added in v0.13.4

type OptionsDeleteMessageReaction MethodOptions

OptionsDeleteMessageReaction struct for DeleteMessageReaction()

options include: `user_id`, or `actor_chat_id`.

https://core.telegram.org/bots/api#deletemessagereaction

func (OptionsDeleteMessageReaction) SetActorChatID added in v0.13.4

func (o OptionsDeleteMessageReaction) SetActorChatID(actorChatID int64) OptionsDeleteMessageReaction

SetActorChatID sets the `actor_chat_id` value of OptionsDeleteMessageReaction.

func (OptionsDeleteMessageReaction) SetUserID added in v0.13.4

SetUserID sets the `user_id` value of OptionsDeleteMessageReaction.

type OptionsDeleteMyCommands

type OptionsDeleteMyCommands MethodOptions

OptionsDeleteMyCommands struct for DeleteMyCommands().

options include: `scope`, and `language_code`.

https://core.telegram.org/bots/api#deletemycommands

func (OptionsDeleteMyCommands) SetLanguageCode

func (o OptionsDeleteMyCommands) SetLanguageCode(languageCode string) OptionsDeleteMyCommands

SetLanguageCode sets the `language_code` value of OptionsDeleteMyCommands.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

func (OptionsDeleteMyCommands) SetScope

SetScope sets the `scope` value of OptionsDeleteMyCommands.

`scope` can be one of: BotCommandScopeDefault, BotCommandScopeAllPrivateChats, BotCommandScopeAllGroupChats, BotCommandScopeAllChatAdministrators, BotCommandScopeChat, BotCommandScopeChatAdministrators, or BotCommandScopeChatMember.

type OptionsEditChatSubscriptionInviteLink MethodOptions

OptionsEditChatSubscriptionInviteLink struct for EditChatSubscriptionInviteLink

https://core.telegram.org/bots/api#editchatsubscriptioninvitelink

func (OptionsEditChatSubscriptionInviteLink) SetName added in v0.11.6

SetName sets the `name` value of OptionsEditChatSubscriptionInviteLink.

type OptionsEditForumTopic

type OptionsEditForumTopic MethodOptions

OptionsEditForumTopic struct for EditForumTopic().

https://core.telegram.org/bots/api#editforumtopic

func (OptionsEditForumTopic) SetIconCustomEmojiID

func (o OptionsEditForumTopic) SetIconCustomEmojiID(iconCustomEmojiID string) OptionsEditForumTopic

SetIconCustomEmojiID sets the `icon_custom_emoji_id` value of OptionsEditForumTopic.

func (OptionsEditForumTopic) SetName

SetName sets the `name` value of OptionsEditForumTopic.

type OptionsEditMessageCaption

type OptionsEditMessageCaption MethodOptions

OptionsEditMessageCaption struct for EditMessageCaption().

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

other options: `business_connection_id`, `caption`, `parse_mode`, `caption_entities`, `show_caption_above_media`, or `reply_markup`

https://core.telegram.org/bots/api#editmessagecaption

func (OptionsEditMessageCaption) SetBusinessConnectionID added in v0.11.2

func (o OptionsEditMessageCaption) SetBusinessConnectionID(businessConnectionID string) OptionsEditMessageCaption

SetBusinessConnectionID sets the `business_connection_id` value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetCaption

SetCaption sets the `caption` value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetCaptionEntities

func (o OptionsEditMessageCaption) SetCaptionEntities(entities []MessageEntity) OptionsEditMessageCaption

SetCaptionEntities sets the `caption_entities` value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetIDs

SetIDs sets the `chat_id` and `message_id` values of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetInlineMessageID

func (o OptionsEditMessageCaption) SetInlineMessageID(inlineMessageID string) OptionsEditMessageCaption

SetInlineMessageID sets the `inline_message_id` value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetParseMode

SetParseMode sets the `parse_mode` value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetReplyMarkup

SetReplyMarkup sets the `reply_markup` value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetShowCaptionAboveMedia added in v0.11.1

func (o OptionsEditMessageCaption) SetShowCaptionAboveMedia(showCaptionAboveMedia bool) OptionsEditMessageCaption

SetShowCaptionAboveMedia sets the `show_caption_above_media` value of OptionsEditMessageCaption.

type OptionsEditMessageChecklist added in v0.11.18

type OptionsEditMessageChecklist MethodOptions

OptionsEditMessageChecklist struct for EditMessageChecklist()

options include: `reply_markup`.

https://core.telegram.org/bots/api#editmessagechecklist

func (OptionsEditMessageChecklist) SetReplyMarkup added in v0.11.18

SetReplyMarkup sets the `reply_markup` value of OptionsEditMessageChecklist.

type OptionsEditMessageLiveLocation

type OptionsEditMessageLiveLocation MethodOptions

OptionsEditMessageLiveLocation struct for EditMessageLiveLocation()

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

other options: `business_connection_id`, `live_period`, `horizontal_accuracy`, `heading`, `proximity_alert_radius`, `reply_markup`

https://core.telegram.org/bots/api#editmessagelivelocation

func (OptionsEditMessageLiveLocation) SetBusinessConnectionID added in v0.11.2

func (o OptionsEditMessageLiveLocation) SetBusinessConnectionID(businessConnectionID string) OptionsEditMessageLiveLocation

SetBusinessConnectionID sets the `business_connection_id` value of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetHeading

SetHeading sets the `heading` value of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetHorizontalAccuracy

func (o OptionsEditMessageLiveLocation) SetHorizontalAccuracy(horizontalAccuracy float32) OptionsEditMessageLiveLocation

SetHorizontalAccuracy sets the `horizontal_accuracy` value of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetIDs

SetIDs sets the `chat_id` and `message_id` values of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetInlineMessageID

func (o OptionsEditMessageLiveLocation) SetInlineMessageID(inlineMessageID string) OptionsEditMessageLiveLocation

SetInlineMessageID sets the `inline_message_id` value of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetLivePeriod added in v0.10.8

SetLivePeriod sets the `live_period` value of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetProximityAlertRadius

func (o OptionsEditMessageLiveLocation) SetProximityAlertRadius(proximityAlertRadius int) OptionsEditMessageLiveLocation

SetProximityAlertRadius sets the `proximity_alert_radius` value of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetReplyMarkup

SetReplyMarkup sets the `reply_markup` value of OptionsEditMessageLiveLocation.

type OptionsEditMessageMedia

type OptionsEditMessageMedia MethodOptions

OptionsEditMessageMedia struct for EditMessageMedia()

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

other options: `business_connection_id`, and `reply_markup`

https://core.telegram.org/bots/api#editmessagemedia

func (OptionsEditMessageMedia) SetBusinessConnectionID added in v0.11.2

func (o OptionsEditMessageMedia) SetBusinessConnectionID(businessConnectionID string) OptionsEditMessageMedia

SetBusinessConnectionID sets the `business_connection_id` value of OptionsEditMessageMedia.

func (OptionsEditMessageMedia) SetIDs

func (o OptionsEditMessageMedia) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageMedia

SetIDs sets the `chat_id` and `message_id` values of OptionsEditMessageMedia.

func (OptionsEditMessageMedia) SetInlineMessageID

func (o OptionsEditMessageMedia) SetInlineMessageID(inlineMessageID string) OptionsEditMessageMedia

SetInlineMessageID sets the `inline_message_id` value of OptionsEditMessageMedia.

func (OptionsEditMessageMedia) SetReplyMarkup

SetReplyMarkup sets the `reply_markup` value of OptionsEditMessageMedia.

type OptionsEditMessageReplyMarkup

type OptionsEditMessageReplyMarkup MethodOptions

OptionsEditMessageReplyMarkup struct for EditMessageReplyMarkup()

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

other options: `business_connection_id`, `reply_markup`

https://core.telegram.org/bots/api#editmessagereplymarkup

func (OptionsEditMessageReplyMarkup) SetBusinessConnectionID added in v0.11.2

func (o OptionsEditMessageReplyMarkup) SetBusinessConnectionID(businessConnectionID string) OptionsEditMessageReplyMarkup

SetBusinessConnectionID sets the `business_connection_id` value of OptionsEditMessageReplyMarkup.

func (OptionsEditMessageReplyMarkup) SetIDs

SetIDs sets the `chat_id` and `message_id` values of OptionsEditMessageReplyMarkup.

func (OptionsEditMessageReplyMarkup) SetInlineMessageID

func (o OptionsEditMessageReplyMarkup) SetInlineMessageID(inlineMessageID string) OptionsEditMessageReplyMarkup

SetInlineMessageID sets the `inline_message_id` value of OptionsEditMessageReplyMarkup.

func (OptionsEditMessageReplyMarkup) SetReplyMarkup

SetReplyMarkup sets the `reply_markup` value of OptionsEditMessageReplyMarkup.

type OptionsEditMessageText

type OptionsEditMessageText MethodOptions

OptionsEditMessageText struct for EditMessageText().

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

other options: `business_connection_id`, `parse_mode`, `entities`, `link_preview_options`, `rich_message`, and `reply_markup`

https://core.telegram.org/bots/api#editmessagetext

func (OptionsEditMessageText) SetBusinessConnectionID added in v0.11.2

func (o OptionsEditMessageText) SetBusinessConnectionID(businessConnectionID string) OptionsEditMessageText

SetBusinessConnectionID sets the `business_connection_id` value of OptionsEditMessageText.

func (OptionsEditMessageText) SetEntities

SetEntities sets the `entities` value of OptionsEditMessageText.

func (OptionsEditMessageText) SetIDs

func (o OptionsEditMessageText) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageText

SetIDs sets the `chat_id` and `message_id` values of OptionsEditMessageText.

func (OptionsEditMessageText) SetInlineMessageID

func (o OptionsEditMessageText) SetInlineMessageID(inlineMessageID string) OptionsEditMessageText

SetInlineMessageID sets the `inline_message_id` value of OptionsEditMessageText.

func (OptionsEditMessageText) SetLinkPreviewOptions

func (o OptionsEditMessageText) SetLinkPreviewOptions(linkPreviewOptions LinkPreviewOptions) OptionsEditMessageText

SetLinkPreviewOptions sets the `link_preview_options` value of OptionsEditMessageText.

func (OptionsEditMessageText) SetParseMode

func (o OptionsEditMessageText) SetParseMode(parseMode ParseMode) OptionsEditMessageText

SetParseMode sets the `parse_mode` value of OptionsEditMessageText.

func (OptionsEditMessageText) SetReplyMarkup

SetReplyMarkup sets the `reply_markup` value of OptionsEditMessageText.

func (OptionsEditMessageText) SetRichMessage added in v0.13.5

func (o OptionsEditMessageText) SetRichMessage(richMessage InputRichMessage) OptionsEditMessageText

SetRichMessage sets the `rich_message` value of OptionsEditMessageText.

type OptionsEditStory added in v0.11.17

type OptionsEditStory MethodOptions

OptionsEditStory struct for EditStory().

options include: `caption`, `parse_mode`, `caption_entities`, and `areas`.

https://core.telegram.org/bots/api#editstory

func (OptionsEditStory) SetAreas added in v0.11.17

func (o OptionsEditStory) SetAreas(areas []StoryArea) OptionsEditStory

SetAreas sets the `areas` value of OptionsEditStory.

func (OptionsEditStory) SetCaption added in v0.11.17

func (o OptionsEditStory) SetCaption(caption string) OptionsEditStory

SetCaption sets the `caption` value of OptionsEditStory.

func (OptionsEditStory) SetCaptionEntities added in v0.11.17

func (o OptionsEditStory) SetCaptionEntities(captionEntities []MessageEntity) OptionsEditStory

SetCaptionEntities sets the `caption_entities` value of OptionsEditStory.

func (OptionsEditStory) SetParseMode added in v0.11.17

func (o OptionsEditStory) SetParseMode(parseMode ParseMode) OptionsEditStory

SetParseMode sets the `parse_mode` value of OptionsEditStory.

type OptionsForwardMessage

type OptionsForwardMessage MethodOptions

OptionsForwardMessage struct for ForwardMessage().

options include: `message_thread_id`, `direct_messages_topic_id`, `video_start_timestamp`, `disable_notification`, `protect_content`, `message_effect_id`, and `suggested_post_parameters`.

https://core.telegram.org/bots/api#forwardmessage

func (OptionsForwardMessage) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsForwardMessage) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsForwardMessage

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsForwardMessage.

func (OptionsForwardMessage) SetDisableNotification

func (o OptionsForwardMessage) SetDisableNotification(disable bool) OptionsForwardMessage

SetDisableNotification sets the `disable_notification` value of OptionsForwardMessage.

func (OptionsForwardMessage) SetMessageEffectID added in v0.12.1

func (o OptionsForwardMessage) SetMessageEffectID(messageEffectID string) OptionsForwardMessage

SetMessageEffectID sets the `message_effect_id` value of OptionsForwardMessage.

func (OptionsForwardMessage) SetMessageThreadID

func (o OptionsForwardMessage) SetMessageThreadID(messageThreadID int64) OptionsForwardMessage

SetMessageThreadID sets the `message_thread_id` value of OptionsForwardMessage.

func (OptionsForwardMessage) SetProtectContent

func (o OptionsForwardMessage) SetProtectContent(protect bool) OptionsForwardMessage

SetProtectContent sets the `protect_content` value of OptionsForwardMessage.

func (OptionsForwardMessage) SetSuggestedPostParameters added in v0.11.19

func (o OptionsForwardMessage) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsForwardMessage

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsForwardMessage.

func (OptionsForwardMessage) SetVideoStartTimestamp added in v0.11.14

func (o OptionsForwardMessage) SetVideoStartTimestamp(videoStartTimestamp int) OptionsForwardMessage

SetVideoStartTimestamp sets the `video_start_timestamp` value of OptionsForwardMessage.

type OptionsForwardMessages added in v0.11.19

type OptionsForwardMessages MethodOptions

OptionsForwardMessages struct for ForwardMessages().

options include: `message_thread_id`, `direct_messages_topic_id`, `disable_notification` and `protect_content`.

https://core.telegram.org/bots/api#forwardmessages

func (OptionsForwardMessages) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsForwardMessages) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsForwardMessages

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsForwardMessages.

func (OptionsForwardMessages) SetDisableNotification added in v0.11.19

func (o OptionsForwardMessages) SetDisableNotification(disable bool) OptionsForwardMessages

SetDisableNotification sets the `disable_notification` value of OptionsForwardMessages.

func (OptionsForwardMessages) SetMessageThreadID added in v0.11.19

func (o OptionsForwardMessages) SetMessageThreadID(messageThreadID int64) OptionsForwardMessages

SetMessageThreadID sets the `message_thread_id` value of OptionsForwardMessages.

func (OptionsForwardMessages) SetProtectContent added in v0.11.19

func (o OptionsForwardMessages) SetProtectContent(protect bool) OptionsForwardMessages

SetProtectContent sets the `protect_content` value of OptionsForwardMessages.

type OptionsGetBusinessAccountGifts added in v0.11.17

type OptionsGetBusinessAccountGifts MethodOptions

OptionsGetBusinessAccountGifts struct for GetBusinessAccountGifts().

options include: `exclude_unsaved`, `exclude_saved`, `exclude_unlimited`, `exclude_limited_upgradable`, `exclude_limited_non_upgradable`, `exclude_unique`, `exclude_from_blockchain`, `sort_by_price`, `offset`, and `limit`.

https://core.telegram.org/bots/api#getbusinessaccountgifts

func (OptionsGetBusinessAccountGifts) SetExcludeFromBlockchain added in v0.12.1

func (o OptionsGetBusinessAccountGifts) SetExcludeFromBlockchain(excludeFromBlockchain bool) OptionsGetBusinessAccountGifts

SetExcludeFromBlockchain sets the `exclude_from_blockchain` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetExcludeLimitedNonUpgradable added in v0.12.1

func (o OptionsGetBusinessAccountGifts) SetExcludeLimitedNonUpgradable(excludeLimitedNonUpgradable bool) OptionsGetBusinessAccountGifts

SetExcludeLimitedNonUpgradable sets the `exclude_limited_non_upgradable` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetExcludeLimitedUpgradable added in v0.12.1

func (o OptionsGetBusinessAccountGifts) SetExcludeLimitedUpgradable(excludeLimitedUpgradable bool) OptionsGetBusinessAccountGifts

SetExcludeLimitedUpgradable sets the `exclude_limited_upgradable` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetExcludeSaved added in v0.11.17

func (o OptionsGetBusinessAccountGifts) SetExcludeSaved(excludeSaved bool) OptionsGetBusinessAccountGifts

SetExcludeSaved sets the `exclude_saved` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetExcludeUnique added in v0.11.17

func (o OptionsGetBusinessAccountGifts) SetExcludeUnique(excludeUnique bool) OptionsGetBusinessAccountGifts

SetExcludeUnique sets the `exclude_unique` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetExcludeUnlimited added in v0.11.17

func (o OptionsGetBusinessAccountGifts) SetExcludeUnlimited(excludeUnlimited bool) OptionsGetBusinessAccountGifts

SetExcludeUnlimited sets the `exclude_unlimited` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetExcludeUnsaved added in v0.11.17

func (o OptionsGetBusinessAccountGifts) SetExcludeUnsaved(excludeUnsaved bool) OptionsGetBusinessAccountGifts

SetExcludeUnsaved sets the `exclude_unsaved` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetLimit added in v0.11.17

SetLimit sets the `limit` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetOffset added in v0.11.17

SetOffset sets the `offset` value of OptionsGetBusinessAccountGifts.

func (OptionsGetBusinessAccountGifts) SetSortByPrice added in v0.11.17

SetSortByPrice sets the `sort_by_price` value of OptionsGetBusinessAccountGifts.

type OptionsGetChatAdministrators added in v0.13.4

type OptionsGetChatAdministrators MethodOptions

OptionsGetChatAdministrators struct for GetChatAdministrators

options include: `return_bots`.

https://core.telegram.org/bots/api#getchatadministrators

func (OptionsGetChatAdministrators) SetReturnBots added in v0.13.4

SetReturnBots sets the `return_bots` value of OptionsGetChatAdministrators.

type OptionsGetChatGifts added in v0.12.1

type OptionsGetChatGifts MethodOptions

func (OptionsGetChatGifts) SetExcludeFromBlockchain added in v0.12.1

func (o OptionsGetChatGifts) SetExcludeFromBlockchain(excludeFromBlockchain bool) OptionsGetChatGifts

SetExcludeFromBlockchain sets the `exclude_from_blockchain` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetExcludeLimitedNonUpgradable added in v0.12.1

func (o OptionsGetChatGifts) SetExcludeLimitedNonUpgradable(excludeLimitedNonUpgradable bool) OptionsGetChatGifts

SetExcludeLimitedNonUpgradable sets the `exclude_limited_non_upgradable` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetExcludeLimitedUpgradable added in v0.12.1

func (o OptionsGetChatGifts) SetExcludeLimitedUpgradable(excludeLimitedUpgradable bool) OptionsGetChatGifts

SetExcludeLimitedUpgradable sets the `exclude_limited_upgradable` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetExcludeSaved added in v0.12.1

func (o OptionsGetChatGifts) SetExcludeSaved(excludeSaved bool) OptionsGetChatGifts

SetExcludeSaved sets the `exclude_saved` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetExcludeUnique added in v0.12.1

func (o OptionsGetChatGifts) SetExcludeUnique(excludeUnique bool) OptionsGetChatGifts

SetExcludeUnique sets the `exclude_unique` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetExcludeUnlimited added in v0.12.1

func (o OptionsGetChatGifts) SetExcludeUnlimited(excludeUnlimited bool) OptionsGetChatGifts

SetExcludeUnlimited sets the `exclude_unlimited` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetExcludeUnsaved added in v0.12.1

func (o OptionsGetChatGifts) SetExcludeUnsaved(excludeUnsaved bool) OptionsGetChatGifts

SetExcludeUnsaved sets the `exclude_unsaved` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetLimit added in v0.12.1

func (o OptionsGetChatGifts) SetLimit(limit int) OptionsGetChatGifts

SetLimit sets the `limit` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetOffset added in v0.12.1

func (o OptionsGetChatGifts) SetOffset(offset string) OptionsGetChatGifts

SetOffset sets the `offset` value of OptionsGetChatGifts.

func (OptionsGetChatGifts) SetSortByPrice added in v0.12.1

func (o OptionsGetChatGifts) SetSortByPrice(sortByPrice bool) OptionsGetChatGifts

SetSortByPrice sets the `sort_by_price` value of OptionsGetChatGifts.

type OptionsGetChatMenuButton

type OptionsGetChatMenuButton MethodOptions

OptionsGetChatMenuButton struct for GetChatMenuButton().

options include: `chat_id`.

https://core.telegram.org/bots/api#getchatmenubutton

func (OptionsGetChatMenuButton) SetChatID

SetChatID sets the `chat_id` value of OptionsGetChatMenuButton.

type OptionsGetGameHighScores

type OptionsGetGameHighScores MethodOptions

OptionsGetGameHighScores struct for GetGameHighScores().

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

https://core.telegram.org/bots/api#getgamehighscores

func (OptionsGetGameHighScores) SetIDs

func (o OptionsGetGameHighScores) SetIDs(chatID ChatID, messageID int64) OptionsGetGameHighScores

SetIDs sets the `chat_id` and `message_id` values of OptionsGetGameHighScores.

func (OptionsGetGameHighScores) SetInlineMessageID

func (o OptionsGetGameHighScores) SetInlineMessageID(inlineMessageID string) OptionsGetGameHighScores

SetInlineMessageID sets the `inline_message_id` value of OptionsGetGameHighScores.

type OptionsGetMyCommands

type OptionsGetMyCommands MethodOptions

OptionsGetMyCommands struct for GetMyCommands().

options include: `scope`, and `language_code`.

https://core.telegram.org/bots/api#getmycommands

func (OptionsGetMyCommands) SetLanguageCode

func (o OptionsGetMyCommands) SetLanguageCode(languageCode string) OptionsGetMyCommands

SetLanguageCode sets the `language_code` value of OptionsGetMyCommands.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

func (OptionsGetMyCommands) SetScope

func (o OptionsGetMyCommands) SetScope(scope any) OptionsGetMyCommands

SetScope sets the `scope` value of OptionsGetMyCommands.

`scope` can be one of: BotCommandScopeDefault, BotCommandScopeAllPrivateChats, BotCommandScopeAllGroupChats, BotCommandScopeAllChatAdministrators, BotCommandScopeChat, BotCommandScopeChatAdministrators, or BotCommandScopeChatMember.

type OptionsGetMyDefaultAdministratorRights

type OptionsGetMyDefaultAdministratorRights MethodOptions

OptionsGetMyDefaultAdministratorRights struct for GetMyDefaultAdministratorRights().

options include: `for_channels`.

https://core.telegram.org/bots/api#getmydefaultadministratorrights

func (OptionsGetMyDefaultAdministratorRights) SetForChannels

SetForChannels sets the `for_channels` value of OptionsGetMyDefaultAdministratorRights.

type OptionsGetMyDescription

type OptionsGetMyDescription MethodOptions

OptionsGetMyDescription struct for GetMyDescription().

options include: `language_code`.

https://core.telegram.org/bots/api#getmydescription

func (OptionsGetMyDescription) SetLanguageCode

func (o OptionsGetMyDescription) SetLanguageCode(languageCode string) OptionsGetMyDescription

SetLanguageCode sets the `language_code` value of OptionsGetMyDescription.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

type OptionsGetMyName

type OptionsGetMyName MethodOptions

OptionsGetMyName struct for GetMyName().

options include: `language_code`.

https://core.telegram.org/bots/api#getmyname

func (OptionsGetMyName) SetLanguageCode

func (o OptionsGetMyName) SetLanguageCode(languageCode string) OptionsGetMyName

SetLanguageCode sets the `language_code` value of OptionsGetMyName.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

type OptionsGetMyShortDescription

type OptionsGetMyShortDescription MethodOptions

OptionsGetMyShortDescription struct for GetMyShortDescription().

options include: `language_code`.

https://core.telegram.org/bots/api#getmyshortdescription

func (OptionsGetMyShortDescription) SetLanguageCode

func (o OptionsGetMyShortDescription) SetLanguageCode(languageCode string) OptionsGetMyShortDescription

SetLanguageCode sets the `language_code` value of OptionsGetMyShortDescription.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

type OptionsGetStarTransactions added in v0.11.2

type OptionsGetStarTransactions MethodOptions

OptionsGetStarTransactions struct for GetStarTransactions().

options include: `offset`, and `limit`.

https://core.telegram.org/bots/api#getstartransactions

func (OptionsGetStarTransactions) SetLimit added in v0.11.2

SetLimit sets the `limit` value of OptionsGetStarTransactions.

Accepted `limit` value is 1-100. (default: 100)

func (OptionsGetStarTransactions) SetOffset added in v0.11.2

SetOffset sets the `offset` value of OptionsGetStarTransactions.

type OptionsGetUpdates

type OptionsGetUpdates MethodOptions

OptionsGetUpdates struct for GetUpdates().

options include: `offset`, `limit`, `timeout`, and `allowed_updates`.

https://core.telegram.org/bots/api#getupdates

func (OptionsGetUpdates) SetAllowedUpdates

func (o OptionsGetUpdates) SetAllowedUpdates(allowedUpdates []AllowedUpdate) OptionsGetUpdates

SetAllowedUpdates sets the `allowed_updates` value of OptionsGetUpdates.

func (OptionsGetUpdates) SetLimit

func (o OptionsGetUpdates) SetLimit(limit int) OptionsGetUpdates

SetLimit sets the `limit` value of OptionsGetUpdates.

func (OptionsGetUpdates) SetOffset

func (o OptionsGetUpdates) SetOffset(offset int64) OptionsGetUpdates

SetOffset sets the `offset` value of OptionsGetUpdates.

func (OptionsGetUpdates) SetTimeout

func (o OptionsGetUpdates) SetTimeout(timeout int) OptionsGetUpdates

SetTimeout sets the `timeout` value of OptionsGetUpdates.

type OptionsGetUserGifts added in v0.12.1

type OptionsGetUserGifts MethodOptions

OptionsGetUserGifts struct for GetUserGifts().

options include: `exclude_unlimited`, `exclude_limited_upgradable`, `exclude_limited_non_upgradable`, `exclude_from_blockchain`, `exclude_unique`, `sort_by_price`, `offset`, and `limit`.

https://core.telegram.org/bots/api#getusergifts

func (OptionsGetUserGifts) SetExcludeFromBlockchain added in v0.12.1

func (o OptionsGetUserGifts) SetExcludeFromBlockchain(excludeFromBlockchain bool) OptionsGetUserGifts

SetExcludeFromBlockchain sets the `exclude_from_blockchain` value of OptionsGetUserGifts.

func (OptionsGetUserGifts) SetExcludeLimitedNonUpgradable added in v0.12.1

func (o OptionsGetUserGifts) SetExcludeLimitedNonUpgradable(excludeLimitedNonUpgradable bool) OptionsGetUserGifts

SetExcludeLimitedNonUpgradable sets the `exclude_limited_non_upgradable` value of OptionsGetUserGifts.

func (OptionsGetUserGifts) SetExcludeLimitedUpgradable added in v0.12.1

func (o OptionsGetUserGifts) SetExcludeLimitedUpgradable(excludeLimitedUpgradable bool) OptionsGetUserGifts

SetExcludeLimitedUpgradable sets the `exclude_limited_upgradable` value of OptionsGetUserGifts.

func (OptionsGetUserGifts) SetExcludeUnique added in v0.12.1

func (o OptionsGetUserGifts) SetExcludeUnique(excludeUnique bool) OptionsGetUserGifts

SetExcludeUnique sets the `exclude_unique` value of OptionsGetUserGifts.

func (OptionsGetUserGifts) SetExcludeUnlimited added in v0.12.1

func (o OptionsGetUserGifts) SetExcludeUnlimited(excludeUnlimited bool) OptionsGetUserGifts

SetExcludeUnlimited sets the `exclude_unlimited` value of OptionsGetUserGifts.

func (OptionsGetUserGifts) SetLimit added in v0.12.1

func (o OptionsGetUserGifts) SetLimit(limit int) OptionsGetUserGifts

SetLimit sets the `limit` value of OptionsGetUserGifts.

func (OptionsGetUserGifts) SetOffset added in v0.12.1

func (o OptionsGetUserGifts) SetOffset(offset string) OptionsGetUserGifts

SetOffset sets the `offset` value of OptionsGetUserGifts.

func (OptionsGetUserGifts) SetSortByPrice added in v0.12.1

func (o OptionsGetUserGifts) SetSortByPrice(sortByPrice bool) OptionsGetUserGifts

SetSortByPrice sets the `sort_by_price` value of OptionsGetUserGifts.

type OptionsGetUserProfileAudios added in v0.12.2

type OptionsGetUserProfileAudios MethodOptions

OptionsGetUserProfileAudios struct for GetUserProfileAudios().

options include: `offset` and `limit`.

https://core.telegram.org/bots/api#getuserprofileaudios

func (OptionsGetUserProfileAudios) SetLimit added in v0.12.2

SetLimit sets the `limit` value of OptionsGetUserProfileAudios.

func (OptionsGetUserProfileAudios) SetOffset added in v0.12.2

SetOffset sets the `offset` value of OptionsGetUserProfileAudios.

type OptionsGetUserProfilePhotos

type OptionsGetUserProfilePhotos MethodOptions

OptionsGetUserProfilePhotos struct for GetUserProfilePhotos().

options include: `offset` and `limit`.

https://core.telegram.org/bots/api#getuserprofilephotos

func (OptionsGetUserProfilePhotos) SetLimit

SetLimit sets the `limit` value of OptionsGetUserProfilePhotos.

func (OptionsGetUserProfilePhotos) SetOffset

SetOffset sets the `offset` value of OptionsGetUserProfilePhotos.

type OptionsGiftPremiumSubscription added in v0.11.17

type OptionsGiftPremiumSubscription MethodOptions

OptionsGiftPremiumSubscription struct for GiftPremiumSubscription().

options include: `text`, `text_parse_mode`, and `text_entities`.

https://core.telegram.org/bots/api#giftpremiumsubscription

func (OptionsGiftPremiumSubscription) SetText added in v0.11.17

SetText sets the `text` value of OptionsGiftPremiumSubscription.

func (OptionsGiftPremiumSubscription) SetTextEntities added in v0.11.17

SetTextEntities sets the `text_entities` value of OptionsGiftPremiumSubscription.

func (OptionsGiftPremiumSubscription) SetTextParseMode added in v0.11.17

SetTextParseMode sets the `text_parse_mode` value of OptionsGiftPremiumSubscription.

type OptionsPinChatMessage

type OptionsPinChatMessage MethodOptions

OptionsPinChatMessage struct for PinChatMessage

options include: `business_connection_id`, and `disable_notification`.

https://core.telegram.org/bots/api#pinchatmessage

func (OptionsPinChatMessage) SetBusinessConnectionID added in v0.11.5

func (o OptionsPinChatMessage) SetBusinessConnectionID(businessConnectionID string) OptionsPinChatMessage

SetBusinessConnectionID sets the `business_connection_id` value of OptionsPinChatMessage.

func (OptionsPinChatMessage) SetDisableNotification

func (o OptionsPinChatMessage) SetDisableNotification(disable bool) OptionsPinChatMessage

SetDisableNotification sets the `disable_notification` value of OptionsPinChatMessage.

type OptionsPostStory added in v0.11.17

type OptionsPostStory MethodOptions

OptionsPostStory struct for PostStory().

options include: `caption`, `parse_mode`, `caption_entities`, `areas`, `post_to_chat_page`, and `protect_content`.

https://core.telegram.org/bots/api#poststory

func (OptionsPostStory) SetAreas added in v0.11.17

func (o OptionsPostStory) SetAreas(areas []StoryArea) OptionsPostStory

SetAreas sets the `areas` value of OptionsPostStory.

func (OptionsPostStory) SetCaption added in v0.11.17

func (o OptionsPostStory) SetCaption(caption string) OptionsPostStory

SetCaption sets the `caption` value of OptionsPostStory.

func (OptionsPostStory) SetCaptionEntities added in v0.11.17

func (o OptionsPostStory) SetCaptionEntities(captionEntities []MessageEntity) OptionsPostStory

SetCaptionEntities sets the `caption_entities` value of OptionsPostStory.

func (OptionsPostStory) SetParseMode added in v0.11.17

func (o OptionsPostStory) SetParseMode(parseMode ParseMode) OptionsPostStory

SetParseMode sets the `parse_mode` value of OptionsPostStory.

func (OptionsPostStory) SetPostToChatPage added in v0.11.17

func (o OptionsPostStory) SetPostToChatPage(postToChatPage bool) OptionsPostStory

SetPostToChatPage sets the `post_to_chat_page` value of OptionsPostStory.

func (OptionsPostStory) SetProtectContent added in v0.11.17

func (o OptionsPostStory) SetProtectContent(protectContent bool) OptionsPostStory

SetProtectContent sets the `protect_content` value of OptionsPostStory.

type OptionsPromoteChatMember

type OptionsPromoteChatMember MethodOptions

OptionsPromoteChatMember struct for PromoteChatMember().

options include: `is_anonymous`, `can_manage_chat`, `can_post_messages`, `can_edit_messages`, `can_delete_messages`, `can_manage_video_chats`, `can_restrict_members`, `can_promote_members`, `can_change_info`, `can_invite_users`, `can_pin_messages`, `can_manage_topics`, `can_manage_direct_messages`, and `can_manage_tags`.

https://core.telegram.org/bots/api#promotechatmember

func (OptionsPromoteChatMember) SetCanChangeInfo

func (o OptionsPromoteChatMember) SetCanChangeInfo(can bool) OptionsPromoteChatMember

SetCanChangeInfo sets the `can_change_info` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanDeleteMessages

func (o OptionsPromoteChatMember) SetCanDeleteMessages(can bool) OptionsPromoteChatMember

SetCanDeleteMessages sets the `can_delete_messages` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanDeleteStories

func (o OptionsPromoteChatMember) SetCanDeleteStories(can bool) OptionsPromoteChatMember

SetCanDeleteStories sets the `can_delete_stories` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanEditMessages

func (o OptionsPromoteChatMember) SetCanEditMessages(can bool) OptionsPromoteChatMember

SetCanEditMessages sets the `can_edit_messages` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanEditStories

func (o OptionsPromoteChatMember) SetCanEditStories(can bool) OptionsPromoteChatMember

SetCanEditStories sets the `can_edit_stories` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanInviteUsers

func (o OptionsPromoteChatMember) SetCanInviteUsers(can bool) OptionsPromoteChatMember

SetCanInviteUsers sets the `can_invite_users` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanManageChat

func (o OptionsPromoteChatMember) SetCanManageChat(can bool) OptionsPromoteChatMember

SetCanManageChat sets the `can_manage_chat` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanManageDirectMessages added in v0.11.19

func (o OptionsPromoteChatMember) SetCanManageDirectMessages(can bool) OptionsPromoteChatMember

SetCanManageDirectMessages sets the `can_manage_direct_messages` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanManageTags added in v0.13.1

func (o OptionsPromoteChatMember) SetCanManageTags(can bool) OptionsPromoteChatMember

SetCanManageTags sets the `can_manage_tags` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanManageTopics

func (o OptionsPromoteChatMember) SetCanManageTopics(can bool) OptionsPromoteChatMember

SetCanManageTopics sets the `can_manage_topics` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanManageVideoChats

func (o OptionsPromoteChatMember) SetCanManageVideoChats(can bool) OptionsPromoteChatMember

SetCanManageVideoChats sets the `can_manage_video_chats` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanPinMessages

func (o OptionsPromoteChatMember) SetCanPinMessages(can bool) OptionsPromoteChatMember

SetCanPinMessages sets the `can_pin_messages` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanPostMessages

func (o OptionsPromoteChatMember) SetCanPostMessages(can bool) OptionsPromoteChatMember

SetCanPostMessages sets the `can_post_messages` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanPostStories

func (o OptionsPromoteChatMember) SetCanPostStories(can bool) OptionsPromoteChatMember

SetCanPostStories sets the `can_post_stories` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanPromoteMembers

func (o OptionsPromoteChatMember) SetCanPromoteMembers(can bool) OptionsPromoteChatMember

SetCanPromoteMembers sets the `can_promote_members` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanRestrictMembers

func (o OptionsPromoteChatMember) SetCanRestrictMembers(can bool) OptionsPromoteChatMember

SetCanRestrictMembers sets the `can_restrict_members` value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetIsAnonymous

func (o OptionsPromoteChatMember) SetIsAnonymous(anonymous bool) OptionsPromoteChatMember

SetIsAnonymous sets the `is_anonymous` value of OptionsPromoteChatMember.

type OptionsRemoveBusinessAccountProfilePhoto added in v0.11.17

type OptionsRemoveBusinessAccountProfilePhoto MethodOptions

OptionsRemoveBusinessAccountProfilePhoto struct for RemoveBusinessAccountProfilePhoto().

options include: `is_public`.

https://core.telegram.org/bots/api#removebusinessaccountprofilephoto

func (OptionsRemoveBusinessAccountProfilePhoto) SetIsPublic added in v0.11.17

SetIsPublic sets the `is_public` value of OptionsRemoveBusinessAccountProfilePhoto.

type OptionsRepostStory added in v0.12.1

type OptionsRepostStory MethodOptions

OptionsRepostStory struct for RepostStory().

options include: `post_to_chat_page`, and `protect_content`.

https://core.telegram.org/bots/api#repoststory

func (OptionsRepostStory) SetPostToChatPage added in v0.12.1

func (o OptionsRepostStory) SetPostToChatPage(postToChatPage bool) OptionsRepostStory

SetPostToChatPage sets the `post_to_chat_page` value of OptionsRepostStory.

func (OptionsRepostStory) SetProtectContent added in v0.12.1

func (o OptionsRepostStory) SetProtectContent(protectContent bool) OptionsRepostStory

SetProtectContent sets the `protect_content` value of OptionsRepostStory.

type OptionsRestrictChatMember

type OptionsRestrictChatMember MethodOptions

OptionsRestrictChatMember struct for RestrictChatMember().

options include: `use_independent_chat_permissions`, and `until_date`

https://core.telegram.org/bots/api#restrictchatmember

func (OptionsRestrictChatMember) SetUntilDate

SetUntilDate sets the `until_date` value of OptionsRestrictChatMember.

func (OptionsRestrictChatMember) SetUserIndependentChatPermissions

func (o OptionsRestrictChatMember) SetUserIndependentChatPermissions(val bool) OptionsRestrictChatMember

SetUserIndependentChatPermissions sets the `use_independent_chat_permissions` value of OptionsRestrictChatMember.

type OptionsSavePreparedInlineMessage added in v0.11.9

type OptionsSavePreparedInlineMessage MethodOptions

OptionsSavePreparedInlineMessage struct for SavePreparedInlineMessage().

https://core.telegram.org/bots/api#savepreparedinlinemessage

func (OptionsSavePreparedInlineMessage) SetAllowBotChats added in v0.11.9

SetAllowBotChats sets the `allow_bot_chats` value of OptionsSavePreparedInlineMessage.

func (OptionsSavePreparedInlineMessage) SetAllowChannelChats added in v0.11.9

func (o OptionsSavePreparedInlineMessage) SetAllowChannelChats(allowChannelChats bool) OptionsSavePreparedInlineMessage

SetAllowChannelChats sets the `allow_channel_chats` value of OptionsSavePreparedInlineMessage.

func (OptionsSavePreparedInlineMessage) SetAllowGroupChats added in v0.11.9

func (o OptionsSavePreparedInlineMessage) SetAllowGroupChats(allowGroupChats bool) OptionsSavePreparedInlineMessage

SetAllowGroupChats sets the `allow_group_chats` value of OptionsSavePreparedInlineMessage.

func (OptionsSavePreparedInlineMessage) SetAllowUserChats added in v0.11.9

func (o OptionsSavePreparedInlineMessage) SetAllowUserChats(allowUserChats bool) OptionsSavePreparedInlineMessage

SetAllowUserChats sets the `allow_user_chats` value of OptionsSavePreparedInlineMessage.

type OptionsSendAnimation

type OptionsSendAnimation MethodOptions

OptionsSendAnimation struct for SendAnimation().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `duration`, `width`, `height`, `thumbnail`, `caption`, `parse_mode`, `caption_entities`, `show_caption_above_media`, `has_spoiler`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendanimation

func (OptionsSendAnimation) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendAnimation) SetAllowPaidBroadcast(allow bool) OptionsSendAnimation

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendAnimation) SetBusinessConnectionID(businessConnectionID string) OptionsSendAnimation

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetCaption

func (o OptionsSendAnimation) SetCaption(caption string) OptionsSendAnimation

SetCaption sets the `caption` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetCaptionEntities

func (o OptionsSendAnimation) SetCaptionEntities(entities []MessageEntity) OptionsSendAnimation

SetCaptionEntities sets the `caption_entities` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendAnimation) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendAnimation

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetDisableNotification

func (o OptionsSendAnimation) SetDisableNotification(disable bool) OptionsSendAnimation

SetDisableNotification sets the `disable_notification` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetDuration

func (o OptionsSendAnimation) SetDuration(duration int) OptionsSendAnimation

SetDuration sets the `duration` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetHasSpoiler added in v0.11.18

func (o OptionsSendAnimation) SetHasSpoiler(hasSpoiler bool) OptionsSendAnimation

SetHasSpoiler sets the `has_spoiler` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetHeight

func (o OptionsSendAnimation) SetHeight(height int) OptionsSendAnimation

SetHeight sets the `height` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetMessageEffectID added in v0.11.1

func (o OptionsSendAnimation) SetMessageEffectID(messageEffectID string) OptionsSendAnimation

SetMessageEffectID sets the `message_effect_id` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetMessageThreadID

func (o OptionsSendAnimation) SetMessageThreadID(messageThreadID int64) OptionsSendAnimation

SetMessageThreadID sets the `message_thread_id` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetParseMode

func (o OptionsSendAnimation) SetParseMode(parseMode ParseMode) OptionsSendAnimation

SetParseMode sets the `parse_mode` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetProtectContent

func (o OptionsSendAnimation) SetProtectContent(protect bool) OptionsSendAnimation

SetProtectContent sets the `protect_content` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetReplyMarkup

func (o OptionsSendAnimation) SetReplyMarkup(replyMarkup any) OptionsSendAnimation

SetReplyMarkup sets the `reply_markup` value of OptionsSendAnimation.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendAnimation) SetReplyParameters

func (o OptionsSendAnimation) SetReplyParameters(replyParameters ReplyParameters) OptionsSendAnimation

SetReplyParameters sets the `reply_parameters` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetShowCaptionAboveMedia added in v0.11.1

func (o OptionsSendAnimation) SetShowCaptionAboveMedia(showCaptionAboveMedia bool) OptionsSendAnimation

SetShowCaptionAboveMedia sets the `show_caption_above_media` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendAnimation) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendAnimation

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendAnimation.

func (OptionsSendAnimation) SetThumbnail

func (o OptionsSendAnimation) SetThumbnail(thumbnail any) OptionsSendAnimation

SetThumbnail sets the `thumbnail` value of OptionsSendAnimation.

`thumbnail` can be one of InputFile or string.

func (OptionsSendAnimation) SetWidth

func (o OptionsSendAnimation) SetWidth(width int) OptionsSendAnimation

SetWidth sets the `width` value of OptionsSendAnimation.

type OptionsSendAudio

type OptionsSendAudio MethodOptions

OptionsSendAudio struct for SendAudio().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `caption`, `parse_mode`, `caption_entities`, `duration`, `performer`, `title`, `thumbnail`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendaudio

func (OptionsSendAudio) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendAudio) SetAllowPaidBroadcast(allow bool) OptionsSendAudio

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendAudio.

func (OptionsSendAudio) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendAudio) SetBusinessConnectionID(businessConnectionID string) OptionsSendAudio

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendAudio.

func (OptionsSendAudio) SetCaption

func (o OptionsSendAudio) SetCaption(caption string) OptionsSendAudio

SetCaption sets the `caption` value of OptionsSendAudio.

func (OptionsSendAudio) SetCaptionEntities

func (o OptionsSendAudio) SetCaptionEntities(entities []MessageEntity) OptionsSendAudio

SetCaptionEntities sets the `caption_entities` value of OptionsSendAudio.

func (OptionsSendAudio) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendAudio) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendAudio

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendAudio.

func (OptionsSendAudio) SetDisableNotification

func (o OptionsSendAudio) SetDisableNotification(disable bool) OptionsSendAudio

SetDisableNotification sets the `disable_notification` value of OptionsSendAudio.

func (OptionsSendAudio) SetDuration

func (o OptionsSendAudio) SetDuration(duration int) OptionsSendAudio

SetDuration sets the `duration` value of OptionsSendAudio.

func (OptionsSendAudio) SetMessageEffectID added in v0.11.1

func (o OptionsSendAudio) SetMessageEffectID(messageEffectID string) OptionsSendAudio

SetMessageEffectID sets the `message_effect_id` value of OptionsSendAudio.

func (OptionsSendAudio) SetMessageThreadID

func (o OptionsSendAudio) SetMessageThreadID(messageThreadID int64) OptionsSendAudio

SetMessageThreadID sets the `message_thread_id` value of OptionsSendAudio.

func (OptionsSendAudio) SetParseMode

func (o OptionsSendAudio) SetParseMode(parseMode ParseMode) OptionsSendAudio

SetParseMode sets the `parse_mode` value of OptionsSendAudio.

func (OptionsSendAudio) SetPerformer

func (o OptionsSendAudio) SetPerformer(performer string) OptionsSendAudio

SetPerformer sets the `performer` value of OptionsSendAudio.

func (OptionsSendAudio) SetProtectContent

func (o OptionsSendAudio) SetProtectContent(protect bool) OptionsSendAudio

SetProtectContent sets the `protect_content` value of OptionsSendAudio.

func (OptionsSendAudio) SetReplyMarkup

func (o OptionsSendAudio) SetReplyMarkup(replyMarkup any) OptionsSendAudio

SetReplyMarkup sets the `reply_markup` value of OptionsSendAudio.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendAudio) SetReplyParameters

func (o OptionsSendAudio) SetReplyParameters(replyParameters ReplyParameters) OptionsSendAudio

SetReplyParameters sets the `reply_parameters` value of OptionsSendAudio.

func (OptionsSendAudio) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendAudio) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendAudio

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendAudio.

func (OptionsSendAudio) SetThumbnail

func (o OptionsSendAudio) SetThumbnail(thumbnail any) OptionsSendAudio

SetThumbnail sets the `thumbnail` value of OptionsSendAudio.

`thumbnail` can be one of InputFile or string.

func (OptionsSendAudio) SetTitle

func (o OptionsSendAudio) SetTitle(title string) OptionsSendAudio

SetTitle sets the `title` value of OptionsSendAudio.

type OptionsSendChatAction

type OptionsSendChatAction MethodOptions

OptionsSendChatAction struct for SendChatAction().

options include: `business_connection_id`, and `message_thread_id`.

https://core.telegram.org/bots/api#sendchataction

func (OptionsSendChatAction) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendChatAction) SetBusinessConnectionID(businessConnectionID string) OptionsSendChatAction

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendChatAction.

func (OptionsSendChatAction) SetMessageThreadID

func (o OptionsSendChatAction) SetMessageThreadID(messageThreadID int64) OptionsSendChatAction

SetMessageThreadID sets the `message_thread_id` value of OptionsSendChatAction.

type OptionsSendChecklist added in v0.11.18

type OptionsSendChecklist MethodOptions

OptionsSendChecklist struct for SendChecklist().

options include: `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendchecklist

func (OptionsSendChecklist) SetDisableNotification added in v0.11.18

func (o OptionsSendChecklist) SetDisableNotification(disable bool) OptionsSendChecklist

SetDisableNotification sets the `disable_notification` value of OptionsSendChecklist.

func (OptionsSendChecklist) SetMessageEffectID added in v0.11.18

func (o OptionsSendChecklist) SetMessageEffectID(messageEffectID string) OptionsSendChecklist

SetMessageEffectID sets the `message_effect_id` value of OptionsSendChecklist.

func (OptionsSendChecklist) SetProtectContent added in v0.11.18

func (o OptionsSendChecklist) SetProtectContent(protect bool) OptionsSendChecklist

SetProtectContent sets the `protect_content` value of OptionsSendChecklist.

func (OptionsSendChecklist) SetReplyMarkup added in v0.11.18

func (o OptionsSendChecklist) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsSendChecklist

SetReplyMarkup sets the `reply_markup` value of OptionsSendChecklist.

func (OptionsSendChecklist) SetReplyParameters added in v0.11.18

func (o OptionsSendChecklist) SetReplyParameters(replyParameters ReplyParameters) OptionsSendChecklist

SetReplyParameters sets the `reply_parameters` value of OptionsSendChecklist.

type OptionsSendContact

type OptionsSendContact MethodOptions

OptionsSendContact struct for SendContact().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `last_name`, `vcard`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendcontact

func (OptionsSendContact) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendContact) SetAllowPaidBroadcast(allow bool) OptionsSendContact

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendContact.

func (OptionsSendContact) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendContact) SetBusinessConnectionID(businessConnectionID string) OptionsSendContact

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendContact.

func (OptionsSendContact) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendContact) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendContact

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendContact.

func (OptionsSendContact) SetDisableNotification

func (o OptionsSendContact) SetDisableNotification(disable bool) OptionsSendContact

SetDisableNotification sets the `disable_notification` value of OptionsSendContact.

func (OptionsSendContact) SetLastName

func (o OptionsSendContact) SetLastName(lastName string) OptionsSendContact

SetLastName sets the `last_name` value of OptionsSendContact.

func (OptionsSendContact) SetMessageEffectID added in v0.11.1

func (o OptionsSendContact) SetMessageEffectID(messageEffectID string) OptionsSendContact

SetMessageEffectID sets the `message_effect_id` value of OptionsSendContact.

func (OptionsSendContact) SetMessageThreadID

func (o OptionsSendContact) SetMessageThreadID(messageThreadID int64) OptionsSendContact

SetMessageThreadID sets the `message_thread_id` value of OptionsSendContact.

func (OptionsSendContact) SetProtectContent

func (o OptionsSendContact) SetProtectContent(protect bool) OptionsSendContact

SetProtectContent sets the `protect_content` value of OptionsSendContact.

func (OptionsSendContact) SetReplyMarkup

func (o OptionsSendContact) SetReplyMarkup(replyMarkup any) OptionsSendContact

SetReplyMarkup sets the `reply_markup` value of OptionsSendContact.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendContact) SetReplyParameters

func (o OptionsSendContact) SetReplyParameters(replyParameters ReplyParameters) OptionsSendContact

SetReplyParameters sets the `reply_parameters` value of OptionsSendContact.

func (OptionsSendContact) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendContact) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendContact

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendContact.

func (OptionsSendContact) SetVCard

func (o OptionsSendContact) SetVCard(vCard string) OptionsSendContact

SetVCard sets the `vcard` value of OptionsSendContact.

type OptionsSendDice

type OptionsSendDice MethodOptions

OptionsSendDice struct for SendDice().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `emoji`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#senddice

func (OptionsSendDice) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendDice) SetAllowPaidBroadcast(allow bool) OptionsSendDice

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendDice.

func (OptionsSendDice) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendDice) SetBusinessConnectionID(businessConnectionID string) OptionsSendDice

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendDice.

func (OptionsSendDice) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendDice) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendDice

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendDice.

func (OptionsSendDice) SetDisableNotification

func (o OptionsSendDice) SetDisableNotification(disable bool) OptionsSendDice

SetDisableNotification sets the `disable_notification` value of OptionsSendDice.

func (OptionsSendDice) SetEmoji

func (o OptionsSendDice) SetEmoji(emoji string) OptionsSendDice

SetEmoji sets the `emoji` value of OptionsSendDice.

`emoji` can be one of: 🎲 (1~6), 🎯 (1~6), 🎳 (1~6), 🏀 (1~5), ⚽ (1~5), or 🎰 (1~64); default: 🎲

func (OptionsSendDice) SetMessageEffectID added in v0.11.1

func (o OptionsSendDice) SetMessageEffectID(messageEffectID string) OptionsSendDice

SetMessageEffectID sets the `message_effect_id` value of OptionsSendDice.

func (OptionsSendDice) SetMessageThreadID

func (o OptionsSendDice) SetMessageThreadID(messageThreadID int64) OptionsSendDice

SetMessageThreadID sets the `message_thread_id` value of OptionsSendDice.

func (OptionsSendDice) SetProtectContent

func (o OptionsSendDice) SetProtectContent(protect bool) OptionsSendDice

SetProtectContent sets the `protect_content` value of OptionsSendDice.

func (OptionsSendDice) SetReplyMarkup

func (o OptionsSendDice) SetReplyMarkup(replyMarkup any) OptionsSendDice

SetReplyMarkup sets the `reply_markup` value of OptionsSendDice.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendDice) SetReplyParameters

func (o OptionsSendDice) SetReplyParameters(replyParameters ReplyParameters) OptionsSendDice

SetReplyParameters sets the `reply_parameters` value of OptionsSendDice.

func (OptionsSendDice) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendDice) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendDice

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendDice.

type OptionsSendDocument

type OptionsSendDocument MethodOptions

OptionsSendDocument struct for SendDocument().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `thumbnail`, `caption`, `parse_mode`, `caption_entities`, `disable_content_type_detection`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#senddocument

func (OptionsSendDocument) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendDocument) SetAllowPaidBroadcast(allow bool) OptionsSendDocument

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendDocument.

func (OptionsSendDocument) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendDocument) SetBusinessConnectionID(businessConnectionID string) OptionsSendDocument

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendDocument.

func (OptionsSendDocument) SetCaption

func (o OptionsSendDocument) SetCaption(caption string) OptionsSendDocument

SetCaption sets the `caption` value of OptionsSendDocument.

func (OptionsSendDocument) SetCaptionEntities

func (o OptionsSendDocument) SetCaptionEntities(entities []MessageEntity) OptionsSendDocument

SetCaptionEntities sets the `caption_entities` value of OptionsSendDocument.

func (OptionsSendDocument) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendDocument) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendDocument

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendDocument.

func (OptionsSendDocument) SetDisableContentTypeDetection

func (o OptionsSendDocument) SetDisableContentTypeDetection(disable bool) OptionsSendDocument

SetDisableContentTypeDetection sets the `disable_content_type_detection` value of OptionsSendDocument.

func (OptionsSendDocument) SetDisableNotification

func (o OptionsSendDocument) SetDisableNotification(disable bool) OptionsSendDocument

SetDisableNotification sets the `disable_notification` value of OptionsSendDocument.

func (OptionsSendDocument) SetMessageEffectID added in v0.11.1

func (o OptionsSendDocument) SetMessageEffectID(messageEffectID string) OptionsSendDocument

SetMessageEffectID sets the `message_effect_id` value of OptionsSendDocument.

func (OptionsSendDocument) SetMessageThreadID

func (o OptionsSendDocument) SetMessageThreadID(messageThreadID int64) OptionsSendDocument

SetMessageThreadID sets the `message_thread_id` value of OptionsSendDocument.

func (OptionsSendDocument) SetParseMode

func (o OptionsSendDocument) SetParseMode(parseMode ParseMode) OptionsSendDocument

SetParseMode sets the `parse_mode` value of OptionsSendDocument.

func (OptionsSendDocument) SetProtectContent

func (o OptionsSendDocument) SetProtectContent(protect bool) OptionsSendDocument

SetProtectContent sets the `protect_content` value of OptionsSendDocument.

func (OptionsSendDocument) SetReplyMarkup

func (o OptionsSendDocument) SetReplyMarkup(replyMarkup any) OptionsSendDocument

SetReplyMarkup sets the reply_markup value of OptionsSendDocument.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendDocument) SetReplyParameters

func (o OptionsSendDocument) SetReplyParameters(replyParameters ReplyParameters) OptionsSendDocument

SetReplyParameters sets the `reply_parameters` value of OptionsSendDocument.

func (OptionsSendDocument) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendDocument) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendDocument

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendDocument.

func (OptionsSendDocument) SetThumbnail

func (o OptionsSendDocument) SetThumbnail(thumbnail any) OptionsSendDocument

SetThumbnail sets the thumbnail value of OptionsSendDocument.

`thumbnail` can be one of InputFile or string.

type OptionsSendGame

type OptionsSendGame MethodOptions

OptionsSendGame struct for SendGame()

options include: `business_connection_id`, `message_thread_id`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendgame

func (OptionsSendGame) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendGame) SetAllowPaidBroadcast(allow bool) OptionsSendGame

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendGame.

func (OptionsSendGame) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendGame) SetBusinessConnectionID(businessConnectionID string) OptionsSendGame

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendGame.

func (OptionsSendGame) SetDisableNotification

func (o OptionsSendGame) SetDisableNotification(disable bool) OptionsSendGame

SetDisableNotification sets the `disable_notification` value of OptionsSendGame.

func (OptionsSendGame) SetMessageEffectID added in v0.11.1

func (o OptionsSendGame) SetMessageEffectID(messageEffectID string) OptionsSendGame

SetMessageEffectID sets the `message_effect_id` value of OptionsSendGame.

func (OptionsSendGame) SetMessageThreadID

func (o OptionsSendGame) SetMessageThreadID(messageThreadID int64) OptionsSendGame

SetMessageThreadID sets the `message_thread_id` value of OptionsSendGame.

func (OptionsSendGame) SetProtectContent

func (o OptionsSendGame) SetProtectContent(protect bool) OptionsSendGame

SetProtectContent sets the `protect_content` value of OptionsSendGame.

func (OptionsSendGame) SetReplyMarkup

func (o OptionsSendGame) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsSendGame

SetReplyMarkup sets the `reply_markup` value of OptionsSendGame.

func (OptionsSendGame) SetReplyParameters

func (o OptionsSendGame) SetReplyParameters(replyParameters ReplyParameters) OptionsSendGame

SetReplyParameters sets the `reply_parameters` value of OptionsSendGame.

type OptionsSendGift added in v0.11.9

type OptionsSendGift MethodOptions

OptionsSendGift struct for SendGift().

options include: `user_id`, `chat_id`, `pay_for_upgrade`, `text`, `text_parse_mode`, and `text_entities`.

https://core.telegram.org/bots/api#sendgift

func (OptionsSendGift) SetChatID added in v0.11.14

func (o OptionsSendGift) SetChatID(chatID ChatID) OptionsSendGift

SetChatID sets the `chat_id` value of OptionsSendGift.

func (OptionsSendGift) SetPayForUpgrade added in v0.11.12

func (o OptionsSendGift) SetPayForUpgrade(payForUpgrade bool) OptionsSendGift

SetPayForUpgrade sets the `pay_for_upgrade` value of OptionsSendGift.

func (OptionsSendGift) SetText added in v0.11.9

func (o OptionsSendGift) SetText(text string) OptionsSendGift

SetText sets the `text` value of OptionsSendGift.

func (OptionsSendGift) SetTextEntities added in v0.11.9

func (o OptionsSendGift) SetTextEntities(textEntities []MessageEntity) OptionsSendGift

SetTextEntities sets the `text_entities` value of OptionsSendGift.

func (OptionsSendGift) SetTextParseMode added in v0.11.9

func (o OptionsSendGift) SetTextParseMode(textParseMode string) OptionsSendGift

SetTextParseMode sets the `text_parse_mode` value of OptionsSendGift.

func (OptionsSendGift) SetUserID added in v0.11.14

func (o OptionsSendGift) SetUserID(userID int64) OptionsSendGift

SetUserID sets the `user_id` value of OptionsSendGift.

type OptionsSendInvoice

type OptionsSendInvoice MethodOptions

OptionsSendInvoice struct for SendInvoice().

options include: `message_thread_id`, `direct_messages_topic_id`, `max_tip_amount`, `suggested_tip_amounts`, `start_parameter`, `provider_data`, `photo_url`, `photo_size`, `photo_width`, `photo_height`, `need_name`, `need_phone_number`, `need_email`, `need_shipping_address`, `send_phone_number_to_provider`, `send_email_to_provider`, `is_flexible`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendinvoice

func (OptionsSendInvoice) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendInvoice) SetAllowPaidBroadcast(allow bool) OptionsSendInvoice

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendInvoice) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendInvoice

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetDisableNotification

func (o OptionsSendInvoice) SetDisableNotification(disable bool) OptionsSendInvoice

SetDisableNotification sets the `disable_notification` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetIsFlexible

func (o OptionsSendInvoice) SetIsFlexible(isFlexible bool) OptionsSendInvoice

SetIsFlexible sets the `is_flexible` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetMaxTipAmount

func (o OptionsSendInvoice) SetMaxTipAmount(maxTipAmount int) OptionsSendInvoice

SetMaxTipAmount sets the `max_tip_amount` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetMessageEffectID added in v0.11.1

func (o OptionsSendInvoice) SetMessageEffectID(messageEffectID string) OptionsSendInvoice

SetMessageEffectID sets the `message_effect_id` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetMessageThreadID

func (o OptionsSendInvoice) SetMessageThreadID(messageThreadID int64) OptionsSendInvoice

SetMessageThreadID sets the `message_thread_id` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedEmail

func (o OptionsSendInvoice) SetNeedEmail(needEmail bool) OptionsSendInvoice

SetNeedEmail sets the `need_email` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedName

func (o OptionsSendInvoice) SetNeedName(needName bool) OptionsSendInvoice

SetNeedName sets the `need_name` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedPhoneNumber

func (o OptionsSendInvoice) SetNeedPhoneNumber(needPhoneNumber bool) OptionsSendInvoice

SetNeedPhoneNumber sets the `need_phone_number` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedShippingAddress

func (o OptionsSendInvoice) SetNeedShippingAddress(needShippingAddr bool) OptionsSendInvoice

SetNeedShippingAddress sets the `need_shipping_address` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoHeight

func (o OptionsSendInvoice) SetPhotoHeight(photoHeight int) OptionsSendInvoice

SetPhotoHeight sets the `photo_height` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoSize

func (o OptionsSendInvoice) SetPhotoSize(photoSize int) OptionsSendInvoice

SetPhotoSize sets the `photo_size` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoURL

func (o OptionsSendInvoice) SetPhotoURL(photoURL string) OptionsSendInvoice

SetPhotoURL sets the `photo_url` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoWidth

func (o OptionsSendInvoice) SetPhotoWidth(photoWidth int) OptionsSendInvoice

SetPhotoWidth sets the `photoWidth` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetProtectContent

func (o OptionsSendInvoice) SetProtectContent(protect bool) OptionsSendInvoice

SetProtectContent sets the `protect_content` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetProviderData

func (o OptionsSendInvoice) SetProviderData(providerData string) OptionsSendInvoice

SetProviderData sets the `provider_data` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetReplyMarkup

func (o OptionsSendInvoice) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsSendInvoice

SetReplyMarkup sets the `reply_markup` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetReplyParameters

func (o OptionsSendInvoice) SetReplyParameters(replyParameters ReplyParameters) OptionsSendInvoice

SetReplyParameters sets the `reply_parameters` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetSendEmailToProvider

func (o OptionsSendInvoice) SetSendEmailToProvider(sendEmailToProvider bool) OptionsSendInvoice

SetSendEmailToProvider sets the `send_email_to_provider` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetSendPhoneNumberToProvider

func (o OptionsSendInvoice) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) OptionsSendInvoice

SetSendPhoneNumberToProvider sets the `send_phone_number_to_provider` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetStartParameter

func (o OptionsSendInvoice) SetStartParameter(startParameter string) OptionsSendInvoice

SetStartParameter sets the `start_parameter` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendInvoice) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendInvoice

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendInvoice.

func (OptionsSendInvoice) SetSuggestedTipAmounts

func (o OptionsSendInvoice) SetSuggestedTipAmounts(suggestedTipAmounts []int) OptionsSendInvoice

SetSuggestedTipAmounts sets the `suggested_tip_amounts` value of OptionsSendInvoice.

type OptionsSendLivePhoto added in v0.13.4

type OptionsSendLivePhoto MethodOptions

OptionsSendLivePhoto struct for SendLivePhoto().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `caption`, `parse_mode`, `caption_entities`, `show_caption_above_media`, `has_spoiler`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendlivephoto

func (OptionsSendLivePhoto) SetAllowPaidBroadcast added in v0.13.4

func (o OptionsSendLivePhoto) SetAllowPaidBroadcast(allow bool) OptionsSendLivePhoto

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetBusinessConnectionID added in v0.13.4

func (o OptionsSendLivePhoto) SetBusinessConnectionID(businessConnectionID string) OptionsSendLivePhoto

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetCaption added in v0.13.4

func (o OptionsSendLivePhoto) SetCaption(caption string) OptionsSendLivePhoto

SetCaption sets the `caption` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetCaptionEntities added in v0.13.4

func (o OptionsSendLivePhoto) SetCaptionEntities(entities []MessageEntity) OptionsSendLivePhoto

SetCaptionEntities sets the `caption_entities` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetDirectMessagesTopicID added in v0.13.4

func (o OptionsSendLivePhoto) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendLivePhoto

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetDisableNotification added in v0.13.4

func (o OptionsSendLivePhoto) SetDisableNotification(disable bool) OptionsSendLivePhoto

SetDisableNotification sets the `disable_notification` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetHasSpoiler added in v0.13.4

func (o OptionsSendLivePhoto) SetHasSpoiler(hasSpoiler bool) OptionsSendLivePhoto

SetHasSpoiler sets the `has_spoiler` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetMessageEffectID added in v0.13.4

func (o OptionsSendLivePhoto) SetMessageEffectID(messageEffectID string) OptionsSendLivePhoto

SetMessageEffectID sets the `message_effect_id` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetMessageThreadID added in v0.13.4

func (o OptionsSendLivePhoto) SetMessageThreadID(messageThreadID int64) OptionsSendLivePhoto

SetMessageThreadID sets the `message_thread_id` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetParseMode added in v0.13.4

func (o OptionsSendLivePhoto) SetParseMode(parseMode ParseMode) OptionsSendLivePhoto

SetParseMode sets the `parse_mode` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetProtectContent added in v0.13.4

func (o OptionsSendLivePhoto) SetProtectContent(protect bool) OptionsSendLivePhoto

SetProtectContent sets the `protect_content` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetReplyMarkup added in v0.13.4

func (o OptionsSendLivePhoto) SetReplyMarkup(replyMarkup any) OptionsSendLivePhoto

SetReplyMarkup sets the `reply_markup` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetReplyParameters added in v0.13.4

func (o OptionsSendLivePhoto) SetReplyParameters(replyParameters ReplyParameters) OptionsSendLivePhoto

SetReplyParameters sets the `reply_parameters` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetShowCaptionAboveMedia added in v0.13.4

func (o OptionsSendLivePhoto) SetShowCaptionAboveMedia(showCaptionAboveMedia bool) OptionsSendLivePhoto

SetShowCaptionAboveMedia sets the `show_caption_above_media` value of OptionsSendLivePhoto.

func (OptionsSendLivePhoto) SetSuggestedPostParameters added in v0.13.4

func (o OptionsSendLivePhoto) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendLivePhoto

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendLivePhoto.

type OptionsSendLocation

type OptionsSendLocation MethodOptions

OptionsSendLocation struct for SendLocation()

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `horizontal_accuracy`, `live_period`, `heading`, `proximity_alert_radius`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendlocation

func (OptionsSendLocation) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendLocation) SetAllowPaidBroadcast(allow bool) OptionsSendLocation

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendLocation.

func (OptionsSendLocation) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendLocation) SetBusinessConnectionID(businessConnectionID string) OptionsSendLocation

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendLocation.

func (OptionsSendLocation) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendLocation) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendLocation

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendLocation.

func (OptionsSendLocation) SetDisableNotification

func (o OptionsSendLocation) SetDisableNotification(disable bool) OptionsSendLocation

SetDisableNotification sets the `disable_notification` value of OptionsSendLocation.

func (OptionsSendLocation) SetHeading

func (o OptionsSendLocation) SetHeading(heading int) OptionsSendLocation

SetHeading sets the `heading` value of OptionsSendLocation.

func (OptionsSendLocation) SetHorizontalAccuracy

func (o OptionsSendLocation) SetHorizontalAccuracy(horizontalAccuracy float32) OptionsSendLocation

SetHorizontalAccuracy sets the `horizontal_accuracy` value of OptionsSendLocation.

func (OptionsSendLocation) SetLivePeriod

func (o OptionsSendLocation) SetLivePeriod(livePeriod int) OptionsSendLocation

SetLivePeriod sets the `live_period` value of OptionsSendLocation.

func (OptionsSendLocation) SetMessageEffectID added in v0.11.1

func (o OptionsSendLocation) SetMessageEffectID(messageEffectID string) OptionsSendLocation

SetMessageEffectID sets the `message_effect_id` value of OptionsSendLocation.

func (OptionsSendLocation) SetMessageThreadID

func (o OptionsSendLocation) SetMessageThreadID(messageThreadID int64) OptionsSendLocation

SetMessageThreadID sets the `message_thread_id` value of OptionsSendLocation.

func (OptionsSendLocation) SetProtectContent

func (o OptionsSendLocation) SetProtectContent(protect bool) OptionsSendLocation

SetProtectContent sets the `protect_content` value of OptionsSendLocation.

func (OptionsSendLocation) SetProximityAlertRadius

func (o OptionsSendLocation) SetProximityAlertRadius(proximityAlertRadius int) OptionsSendLocation

SetProximityAlertRadius sets the `proximity_alert_radius` value of OptionsSendLocation.

func (OptionsSendLocation) SetReplyMarkup

func (o OptionsSendLocation) SetReplyMarkup(replyMarkup any) OptionsSendLocation

SetReplyMarkup sets the `reply_markup` value of OptionsSendLocation.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendLocation) SetReplyParameters

func (o OptionsSendLocation) SetReplyParameters(replyParameters ReplyParameters) OptionsSendLocation

SetReplyParameters sets the `reply_parameters` value of OptionsSendLocation.

func (OptionsSendLocation) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendLocation) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendLocation

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendLocation.

type OptionsSendMediaGroup

type OptionsSendMediaGroup MethodOptions

OptionsSendMediaGroup struct for SendMediaGroup().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, and `reply_parameters`.

https://core.telegram.org/bots/api#sendmediagroup

func (OptionsSendMediaGroup) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendMediaGroup) SetAllowPaidBroadcast(allow bool) OptionsSendMediaGroup

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendMediaGroup) SetBusinessConnectionID(businessConnectionID string) OptionsSendMediaGroup

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendMediaGroup) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendMediaGroup

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetDisableNotification

func (o OptionsSendMediaGroup) SetDisableNotification(disable bool) OptionsSendMediaGroup

SetDisableNotification sets the `disable_notification` value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetMessageEffectID added in v0.11.1

func (o OptionsSendMediaGroup) SetMessageEffectID(messageEffectID string) OptionsSendMediaGroup

SetMessageEffectID sets the `message_effect_id` value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetMessageThreadID

func (o OptionsSendMediaGroup) SetMessageThreadID(messageThreadID int64) OptionsSendMediaGroup

SetMessageThreadID sets the `message_thread_id` value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetProtectContent

func (o OptionsSendMediaGroup) SetProtectContent(protect bool) OptionsSendMediaGroup

SetProtectContent sets the `protect_content` value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetReplyParameters

func (o OptionsSendMediaGroup) SetReplyParameters(replyParameters ReplyParameters) OptionsSendMediaGroup

SetReplyParameters sets the `reply_parameters` value of OptionsSendMediaGroup.

type OptionsSendMessage

type OptionsSendMessage MethodOptions

OptionsSendMessage struct for SendMessage().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `parse_mode`, `entities`, `link_preview_options`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendmessage

func (OptionsSendMessage) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendMessage) SetAllowPaidBroadcast(allow bool) OptionsSendMessage

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendMessage.

func (OptionsSendMessage) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendMessage) SetBusinessConnectionID(businessConnectionID string) OptionsSendMessage

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendMessage.

func (OptionsSendMessage) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendMessage) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendMessage

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendMessage.

func (OptionsSendMessage) SetDisableNotification

func (o OptionsSendMessage) SetDisableNotification(disable bool) OptionsSendMessage

SetDisableNotification sets the `disable_notification` value of OptionsSendMessage.

func (OptionsSendMessage) SetEntities

func (o OptionsSendMessage) SetEntities(entities []MessageEntity) OptionsSendMessage

SetEntities sets the `entities` value of OptionsSendMessage.

func (OptionsSendMessage) SetLinkPreviewOptions

func (o OptionsSendMessage) SetLinkPreviewOptions(linkPreviewOptions LinkPreviewOptions) OptionsSendMessage

SetLinkPreviewOptions sets the `link_preview_options` value of OptionsSendMessage.

func (OptionsSendMessage) SetMessageEffectID added in v0.11.1

func (o OptionsSendMessage) SetMessageEffectID(messageEffectID string) OptionsSendMessage

SetMessageEffectID sets the `message_effect_id` value of OptionsSendMessage.

func (OptionsSendMessage) SetMessageThreadID

func (o OptionsSendMessage) SetMessageThreadID(messageThreadID int64) OptionsSendMessage

SetMessageThreadID sets the `message_thread_id` value of OptionsSendMessage.

func (OptionsSendMessage) SetParseMode

func (o OptionsSendMessage) SetParseMode(parseMode ParseMode) OptionsSendMessage

SetParseMode sets the `parse_mode` value of OptionsSendMessage.

func (OptionsSendMessage) SetProtectContent

func (o OptionsSendMessage) SetProtectContent(protect bool) OptionsSendMessage

SetProtectContent sets the `protect_content` value of OptionsSendMessage.

func (OptionsSendMessage) SetReplyMarkup

func (o OptionsSendMessage) SetReplyMarkup(replyMarkup any) OptionsSendMessage

SetReplyMarkup sets the `reply_markup` value of OptionsSendMessage.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendMessage) SetReplyParameters

func (o OptionsSendMessage) SetReplyParameters(replyParameters ReplyParameters) OptionsSendMessage

SetReplyParameters sets the `reply_parameters` value of OptionsSendMessage.

func (OptionsSendMessage) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendMessage) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendMessage

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendMessage.

type OptionsSendMessageDraft added in v0.12.1

type OptionsSendMessageDraft MethodOptions

OptionsSendMessageDraft struct for SendMessageDraft().

options include: `message_thread_id`, `parse_mode`, and `entities`.

https://core.telegram.org/bots/api#sendmessagedraft

func (OptionsSendMessageDraft) SetEntities added in v0.12.1

SetEntities sets the `entities` value of OptionsSendMessageDraft.

func (OptionsSendMessageDraft) SetMessageThreadID added in v0.12.1

func (o OptionsSendMessageDraft) SetMessageThreadID(messageThreadID int64) OptionsSendMessageDraft

SetMessageThreadID sets the `message_thread_id` value of OptionsSendMessageDraft.

func (OptionsSendMessageDraft) SetParseMode added in v0.12.1

func (o OptionsSendMessageDraft) SetParseMode(parseMode ParseMode) OptionsSendMessageDraft

SetParseMode sets the `parse_mode` value of OptionsSendMessageDraft.

type OptionsSendPaidMedia added in v0.11.3

type OptionsSendPaidMedia MethodOptions

OptionsSendPaidMedia struct for SendPaideMedia().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `payload`, `caption`, `parse_mode`, `caption_entities`, `show_caption_above_media`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendpaidmedia

func (OptionsSendPaidMedia) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendPaidMedia) SetAllowPaidBroadcast(allow bool) OptionsSendPaidMedia

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetBusinessConnectionID added in v0.11.6

func (o OptionsSendPaidMedia) SetBusinessConnectionID(businessConnectionID string) OptionsSendPaidMedia

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetCaption added in v0.11.3

func (o OptionsSendPaidMedia) SetCaption(caption string) OptionsSendPaidMedia

SetCaption sets the `caption` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetCaptionEntities added in v0.11.3

func (o OptionsSendPaidMedia) SetCaptionEntities(captionEntities []MessageEntity) OptionsSendPaidMedia

SetCaptionEntities sets the `caption_entities` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendPaidMedia) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendPaidMedia

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetDisableNotification added in v0.11.3

func (o OptionsSendPaidMedia) SetDisableNotification(disableNotification bool) OptionsSendPaidMedia

SetDisableNotification sets the `disable_notification` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetMessageThreadID added in v0.11.19

func (o OptionsSendPaidMedia) SetMessageThreadID(messageThreadID int64) OptionsSendPaidMedia

SetMessageThreadID sets the `message_thread_id` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetParseMode added in v0.11.3

func (o OptionsSendPaidMedia) SetParseMode(parseMode ParseMode) OptionsSendPaidMedia

SetParseMode sets the `parse_mode` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetPayload added in v0.11.7

func (o OptionsSendPaidMedia) SetPayload(payload string) OptionsSendPaidMedia

SetPayload sets the `payload` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetProtectContent added in v0.11.3

func (o OptionsSendPaidMedia) SetProtectContent(protectContent bool) OptionsSendPaidMedia

SetProtectContent sets the `protect_content` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetReplyMarkup added in v0.11.3

func (o OptionsSendPaidMedia) SetReplyMarkup(replyMarkup any) OptionsSendPaidMedia

SetReplyMarkup sets the `reply_markup` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetReplyParameters added in v0.11.3

func (o OptionsSendPaidMedia) SetReplyParameters(replyParameters ReplyParameters) OptionsSendPaidMedia

SetReplyParameters sets the `reply_parameters` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetShowCaptionAboveMedia added in v0.11.3

func (o OptionsSendPaidMedia) SetShowCaptionAboveMedia(showCaptionAboveMedia bool) OptionsSendPaidMedia

SetShowCaptionAboveMedia sets the `show_caption_above_media` value of OptionsSendPaidMedia.

func (OptionsSendPaidMedia) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendPaidMedia) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendPaidMedia

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendPaidMedia.

type OptionsSendPhoto

type OptionsSendPhoto MethodOptions

OptionsSendPhoto struct for SendPhoto().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `caption`, `parse_mode`, `caption_entities`, `show_caption_above_media`, `has_spoiler`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendphoto

func (OptionsSendPhoto) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendPhoto) SetAllowPaidBroadcast(allow bool) OptionsSendPhoto

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendPhoto) SetBusinessConnectionID(businessConnectionID string) OptionsSendPhoto

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetCaption

func (o OptionsSendPhoto) SetCaption(caption string) OptionsSendPhoto

SetCaption sets the `caption` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetCaptionEntities

func (o OptionsSendPhoto) SetCaptionEntities(entities []MessageEntity) OptionsSendPhoto

SetCaptionEntities sets the `caption_entities` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendPhoto) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendPhoto

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetDisableNotification

func (o OptionsSendPhoto) SetDisableNotification(disable bool) OptionsSendPhoto

SetDisableNotification sets the `disable_notification` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetHasSpoiler added in v0.11.18

func (o OptionsSendPhoto) SetHasSpoiler(hasSpoiler bool) OptionsSendPhoto

SetHasSpoiler sets the `has_spoiler` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetMessageEffectID added in v0.11.1

func (o OptionsSendPhoto) SetMessageEffectID(messageEffectID string) OptionsSendPhoto

SetMessageEffectID sets the `message_effect_id` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetMessageThreadID

func (o OptionsSendPhoto) SetMessageThreadID(messageThreadID int64) OptionsSendPhoto

SetMessageThreadID sets the `message_thread_id`value of OptionsSendPhoto.

func (OptionsSendPhoto) SetParseMode

func (o OptionsSendPhoto) SetParseMode(parseMode ParseMode) OptionsSendPhoto

SetParseMode sets the `parse_mode` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetProtectContent

func (o OptionsSendPhoto) SetProtectContent(protect bool) OptionsSendPhoto

SetProtectContent sets the `protect_content` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetReplyMarkup

func (o OptionsSendPhoto) SetReplyMarkup(replyMarkup any) OptionsSendPhoto

SetReplyMarkup sets the `reply_markup` value of OptionsSendPhoto.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendPhoto) SetReplyParameters

func (o OptionsSendPhoto) SetReplyParameters(replyParameters ReplyParameters) OptionsSendPhoto

SetReplyParameters sets the `reply_parameters` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetShowCaptionAboveMedia added in v0.11.1

func (o OptionsSendPhoto) SetShowCaptionAboveMedia(showCaptionAboveMedia bool) OptionsSendPhoto

SetShowCaptionAboveMedia sets the `show_caption_above_media` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendPhoto) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendPhoto

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendPhoto.

type OptionsSendPoll

type OptionsSendPoll MethodOptions

OptionsSendPoll struct for SendPoll().

options include: `business_connection_id`, `message_thread_id`, `question_parse_mode`, `question_entities`, `is_anonymous`, `type`, `allows_multiple_answers`, `allows_revoting`, `shuffle_options`, `allow_adding_options`, `hide_results_until_closes`, `members_only`, `country_codes`, `correct_option_ids`, `explanation`, `explanation_parse_mode`, `explanation_entities`, `explanation_media`, `open_period`, `close_date`, `is_closed`, `description`, `description_parse_mode`, `description_entities`, `media`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendpoll

func (OptionsSendPoll) SetAllowAddingOptions added in v0.13.3

func (o OptionsSendPoll) SetAllowAddingOptions(allowAddingOptions bool) OptionsSendPoll

SetAllowAddingOptions sets the `allow_adding_options` value of OptionsSendPoll.

func (OptionsSendPoll) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendPoll) SetAllowPaidBroadcast(allow bool) OptionsSendPoll

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendPoll.

func (OptionsSendPoll) SetAllowsMultipleAnswers

func (o OptionsSendPoll) SetAllowsMultipleAnswers(allowsMultipleAnswers bool) OptionsSendPoll

SetAllowsMultipleAnswers sets the `allows_multiple_answers` value of OptionsSendPoll.

func (OptionsSendPoll) SetAllowsRevoting added in v0.13.3

func (o OptionsSendPoll) SetAllowsRevoting(allowsRevoting bool) OptionsSendPoll

SetAllowsRevoting sets the `allows_revoting` value of OptionsSendPoll.

func (OptionsSendPoll) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendPoll) SetBusinessConnectionID(businessConnectionID string) OptionsSendPoll

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendPoll.

func (OptionsSendPoll) SetCloseDate

func (o OptionsSendPoll) SetCloseDate(closeDate int) OptionsSendPoll

SetCloseDate sets the `close_date` value of OptionsSendPoll.

func (OptionsSendPoll) SetCorrectOptionIDs added in v0.13.3

func (o OptionsSendPoll) SetCorrectOptionIDs(correctOptionIDs []int) OptionsSendPoll

SetCorrectOptionIDs sets the `correct_option_ids` value of OptionsSendPoll.

func (OptionsSendPoll) SetCountryCodes added in v0.13.4

func (o OptionsSendPoll) SetCountryCodes(countryCodes []string) OptionsSendPoll

SetCountryCodes sets the `country_codes` value of OptionsSendPoll.

func (OptionsSendPoll) SetDescription added in v0.13.3

func (o OptionsSendPoll) SetDescription(description string) OptionsSendPoll

SetDescription sets the `description` value of OptionsSendPoll.

func (OptionsSendPoll) SetDescriptionEntities added in v0.13.3

func (o OptionsSendPoll) SetDescriptionEntities(descriptionEntities []MessageEntity) OptionsSendPoll

SetDescriptionEntities sets the `description_entities` value of OptionsSendPoll.

func (OptionsSendPoll) SetDescriptionParseMode added in v0.13.3

func (o OptionsSendPoll) SetDescriptionParseMode(descriptionParseMode ParseMode) OptionsSendPoll

SetDescriptionParseMode sets the `description_parse_mode` value of OptionsSendPoll.

func (OptionsSendPoll) SetDisableNotification

func (o OptionsSendPoll) SetDisableNotification(disable bool) OptionsSendPoll

SetDisableNotification sets the `disable_notification` value of OptionsSendPoll.

func (OptionsSendPoll) SetExplanation

func (o OptionsSendPoll) SetExplanation(explanation string) OptionsSendPoll

SetExplanation sets the `explanation` value of OptionsSendPoll.

func (OptionsSendPoll) SetExplanationEntities

func (o OptionsSendPoll) SetExplanationEntities(entities []MessageEntity) OptionsSendPoll

SetExplanationEntities sets the `explanation_entities` value of OptionsSendPoll.

func (OptionsSendPoll) SetExplanationMedia added in v0.13.4

func (o OptionsSendPoll) SetExplanationMedia(media InputPollMedia) OptionsSendPoll

SetExplanationMedia sets the `explanation_media` value of OptionsSendPoll.

func (OptionsSendPoll) SetExplanationParseMode

func (o OptionsSendPoll) SetExplanationParseMode(explanationParseMode ParseMode) OptionsSendPoll

SetExplanationParseMode sets the `explanation_parse_mode` value of OptionsSendPoll.

func (OptionsSendPoll) SetHideResultsUntilCloses added in v0.13.3

func (o OptionsSendPoll) SetHideResultsUntilCloses(hideResultsUntilCloses bool) OptionsSendPoll

SetHideResultsUntilCloses sets the `hide_results_until_closes` value of OptionsSendPoll.

func (OptionsSendPoll) SetIsAnonymous

func (o OptionsSendPoll) SetIsAnonymous(isAnonymous bool) OptionsSendPoll

SetIsAnonymous sets the `is_anonymous` value of OptionsSendPoll.

func (OptionsSendPoll) SetIsClosed

func (o OptionsSendPoll) SetIsClosed(isClosed bool) OptionsSendPoll

SetIsClosed sets the `is_closed` value of OptionsSendPoll.

func (OptionsSendPoll) SetMedia added in v0.13.4

SetMedia sets the `media` value of OptionsSendPoll.

func (OptionsSendPoll) SetMembersOnly added in v0.13.4

func (o OptionsSendPoll) SetMembersOnly(membersOnly bool) OptionsSendPoll

SetMembersOnly sets the `members_only` value of OptionsSendPoll.

func (OptionsSendPoll) SetMessageEffectID added in v0.11.1

func (o OptionsSendPoll) SetMessageEffectID(messageEffectID string) OptionsSendPoll

SetMessageEffectID sets the `message_effect_id` value of OptionsSendPoll.

func (OptionsSendPoll) SetMessageThreadID

func (o OptionsSendPoll) SetMessageThreadID(messageThreadID int64) OptionsSendPoll

SetMessageThreadID sets the `message_thread_id` value of OptionsSendPoll.

func (OptionsSendPoll) SetOpenPeriod

func (o OptionsSendPoll) SetOpenPeriod(openPeriod int) OptionsSendPoll

SetOpenPeriod sets the `open_period` value of OptionsSendPoll.

func (OptionsSendPoll) SetProtectContent

func (o OptionsSendPoll) SetProtectContent(protect bool) OptionsSendPoll

SetProtectContent sets the `protect_content` value of OptionsSendPoll.

func (OptionsSendPoll) SetQuestionEntities added in v0.10.8

func (o OptionsSendPoll) SetQuestionEntities(questionEntities []MessageEntity) OptionsSendPoll

SetQuestionEntities sets the `question_entities` value of OptionsSendPoll.

func (OptionsSendPoll) SetQuestionParseMode added in v0.10.8

func (o OptionsSendPoll) SetQuestionParseMode(questionParseMode ParseMode) OptionsSendPoll

SetQuestionParseMode sets the `question_parse_mode` value of OptionsSendPoll.

func (OptionsSendPoll) SetReplyMarkup

func (o OptionsSendPoll) SetReplyMarkup(replyMarkup any) OptionsSendPoll

SetReplyMarkup sets the `reply_markup` value of OptionsSendPoll.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendPoll) SetReplyParameters

func (o OptionsSendPoll) SetReplyParameters(replyParameters ReplyParameters) OptionsSendPoll

SetReplyParameters sets the `reply_parameters` value of OptionsSendPoll.

func (OptionsSendPoll) SetShuffleOptions added in v0.13.3

func (o OptionsSendPoll) SetShuffleOptions(shuffleOptions bool) OptionsSendPoll

SetShuffleOptions sets the `shuffle_options` value of OptionsSendPoll.

func (OptionsSendPoll) SetType

func (o OptionsSendPoll) SetType(newType string) OptionsSendPoll

SetType sets the `type` value of OptionsSendPoll.

type OptionsSendRichMessage added in v0.13.5

type OptionsSendRichMessage MethodOptions

OptionsSendRichMessage struct for SendRichMessage().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters,` `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendrichmessage

func (OptionsSendRichMessage) SetAllowPaidBroadcast added in v0.13.5

func (o OptionsSendRichMessage) SetAllowPaidBroadcast(allow bool) OptionsSendRichMessage

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetBusinessConnectionID added in v0.13.5

func (o OptionsSendRichMessage) SetBusinessConnectionID(businessConnectionID string) OptionsSendRichMessage

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetDirectMessagesTopicID added in v0.13.5

func (o OptionsSendRichMessage) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendRichMessage

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetDisableNotification added in v0.13.5

func (o OptionsSendRichMessage) SetDisableNotification(disable bool) OptionsSendRichMessage

SetDisableNotification sets the `disable_notification` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetMessageEffectID added in v0.13.5

func (o OptionsSendRichMessage) SetMessageEffectID(messageEffectID string) OptionsSendRichMessage

SetMessageEffectID sets the `message_effect_id` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetMessageThreadID added in v0.13.5

func (o OptionsSendRichMessage) SetMessageThreadID(messageThreadID int64) OptionsSendRichMessage

SetMessageThreadID sets the `message_thread_id` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetProtectContent added in v0.13.5

func (o OptionsSendRichMessage) SetProtectContent(protect bool) OptionsSendRichMessage

SetProtectContent sets the `protect_content` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetReplyMarkup added in v0.13.5

func (o OptionsSendRichMessage) SetReplyMarkup(replyMarkup any) OptionsSendRichMessage

SetReplyMarkup sets the `reply_markup` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetReplyParameters added in v0.13.5

func (o OptionsSendRichMessage) SetReplyParameters(replyParameters ReplyParameters) OptionsSendRichMessage

SetReplyParameters sets the `reply_parameters` value of OptionsSendRichMessage.

func (OptionsSendRichMessage) SetSuggestedPostParameters added in v0.13.5

func (o OptionsSendRichMessage) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendRichMessage

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendRichMessage.

type OptionsSendRichMessageDraft added in v0.13.5

type OptionsSendRichMessageDraft MethodOptions

OptionsSendRichMessageDraft struct for SendRichMessageDraft().

options include: `message_thread_id`.

https://core.telegram.org/bots/api#sendrichmessagedraft

func (OptionsSendRichMessageDraft) SetMessageThreadID added in v0.13.5

func (o OptionsSendRichMessageDraft) SetMessageThreadID(messageThreadID int64) OptionsSendRichMessageDraft

SetMessageThreadID sets the `message_thread_id` value of OptionsSendRichMessageDraft.

type OptionsSendSticker

type OptionsSendSticker MethodOptions

OptionsSendSticker struct for SendSticker().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `emoji`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendsticker

func (OptionsSendSticker) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendSticker) SetAllowPaidBroadcast(allow bool) OptionsSendSticker

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendSticker.

func (OptionsSendSticker) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendSticker) SetBusinessConnectionID(businessConnectionID string) OptionsSendSticker

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendSticker.

func (OptionsSendSticker) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendSticker) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendSticker

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendSticker.

func (OptionsSendSticker) SetDisableNotification

func (o OptionsSendSticker) SetDisableNotification(disable bool) OptionsSendSticker

SetDisableNotification sets the `disable_notification` value of OptionsSendSticker.

func (OptionsSendSticker) SetEmoji

func (o OptionsSendSticker) SetEmoji(emoji string) OptionsSendSticker

SetEmoji sets the `emoji` value of OptionsSendSticker.

func (OptionsSendSticker) SetMessageEffectID added in v0.11.1

func (o OptionsSendSticker) SetMessageEffectID(messageEffectID string) OptionsSendSticker

SetMessageEffectID sets the `message_effect_id` value of OptionsSendSticker.

func (OptionsSendSticker) SetMessageThreadID

func (o OptionsSendSticker) SetMessageThreadID(messageThreadID int64) OptionsSendSticker

SetMessageThreadID sets the `message_thread_id` value of OptionsSendSticker.

func (OptionsSendSticker) SetProtectContent

func (o OptionsSendSticker) SetProtectContent(protect bool) OptionsSendSticker

SetProtectContent sets the `protect_content` value of OptionsSendSticker.

func (OptionsSendSticker) SetReplyMarkup

func (o OptionsSendSticker) SetReplyMarkup(replyMarkup any) OptionsSendSticker

SetReplyMarkup sets the `reply_markup` value of OptionsSendSticker.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendSticker) SetReplyParameters

func (o OptionsSendSticker) SetReplyParameters(replyParameters ReplyParameters) OptionsSendSticker

SetReplyParameters sets the `reply_parameters` value of OptionsSendSticker.

func (OptionsSendSticker) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendSticker) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendSticker

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendSticker.

type OptionsSendVenue

type OptionsSendVenue MethodOptions

OptionsSendVenue struct for SendVenue().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `foursquare_id`, `foursquare_type`, `google_place_id`, `google_place_type`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendvenue

func (OptionsSendVenue) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendVenue) SetAllowPaidBroadcast(allow bool) OptionsSendVenue

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendVenue.

func (OptionsSendVenue) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendVenue) SetBusinessConnectionID(businessConnectionID string) OptionsSendVenue

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendVenue.

func (OptionsSendVenue) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendVenue) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendVenue

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendVenue.

func (OptionsSendVenue) SetDisableNotification

func (o OptionsSendVenue) SetDisableNotification(disable bool) OptionsSendVenue

SetDisableNotification sets the `disable_notification` value of OptionsSendVenue.

func (OptionsSendVenue) SetFoursquareID

func (o OptionsSendVenue) SetFoursquareID(foursquareID string) OptionsSendVenue

SetFoursquareID sets the `foursquare_id` value of OptionsSendVenue.

func (OptionsSendVenue) SetFoursquareType

func (o OptionsSendVenue) SetFoursquareType(foursquareType string) OptionsSendVenue

SetFoursquareType sets the `foursquare_type` value of OptionsSendVenue.

func (OptionsSendVenue) SetGooglePlaceID

func (o OptionsSendVenue) SetGooglePlaceID(googlePlaceID string) OptionsSendVenue

SetGooglePlaceID sets the `google_place_id` value of OptionsSendVenue.

func (OptionsSendVenue) SetGooglePlaceType

func (o OptionsSendVenue) SetGooglePlaceType(googlePlaceType string) OptionsSendVenue

SetGooglePlaceType sets the `google_place_type` value of OptionsSendVenue.

func (OptionsSendVenue) SetMessageEffectID added in v0.11.1

func (o OptionsSendVenue) SetMessageEffectID(messageEffectID string) OptionsSendVenue

SetMessageEffectID sets the `message_effect_id` value of OptionsSendVenue.

func (OptionsSendVenue) SetMessageThreadID

func (o OptionsSendVenue) SetMessageThreadID(messageThreadID int64) OptionsSendVenue

SetMessageThreadID sets the `message_thread_id` value of OptionsSendVenue.

func (OptionsSendVenue) SetProtectContent

func (o OptionsSendVenue) SetProtectContent(protect bool) OptionsSendVenue

SetProtectContent sets the `protect_content` value of OptionsSendVenue.

func (OptionsSendVenue) SetReplyMarkup

func (o OptionsSendVenue) SetReplyMarkup(replyMarkup any) OptionsSendVenue

SetReplyMarkup sets the `reply_markup` value of OptionsSendVenue.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVenue) SetReplyParameters

func (o OptionsSendVenue) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVenue

SetReplyParameters sets the `reply_parameters` value of OptionsSendVenue.

func (OptionsSendVenue) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendVenue) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendVenue

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendVenue.

type OptionsSendVideo

type OptionsSendVideo MethodOptions

OptionsSendVideo struct for SendVideo().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `duration`, `width`, `height`, `thumbnail`, `cover`, `start_timestamp`, `caption`, `parse_mode`, `caption_entities`, `show_caption_above_media`, `has_spoiler`, `supports_streaming`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendvideo

func (OptionsSendVideo) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendVideo) SetAllowPaidBroadcast(allow bool) OptionsSendVideo

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendVideo.

func (OptionsSendVideo) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendVideo) SetBusinessConnectionID(businessConnectionID string) OptionsSendVideo

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendVideo.

func (OptionsSendVideo) SetCaption

func (o OptionsSendVideo) SetCaption(caption string) OptionsSendVideo

SetCaption sets the `caption` value of OptionsSendVideo.

func (OptionsSendVideo) SetCaptionEntities

func (o OptionsSendVideo) SetCaptionEntities(entities []MessageEntity) OptionsSendVideo

SetCaptionEntities sets the `caption_entities` value of OptionsSendVideo.

func (OptionsSendVideo) SetCover added in v0.11.14

func (o OptionsSendVideo) SetCover(cover any) OptionsSendVideo

SetCover sets the `cover` value of OptionsSendVideo.

`cover` can be one of InputFile or string.

func (OptionsSendVideo) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendVideo) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendVideo

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendVideo.

func (OptionsSendVideo) SetDisableNotification

func (o OptionsSendVideo) SetDisableNotification(disable bool) OptionsSendVideo

SetDisableNotification sets the `disable_notification` value of OptionsSendVideo.

func (OptionsSendVideo) SetDuration

func (o OptionsSendVideo) SetDuration(duration int) OptionsSendVideo

SetDuration sets the `duration` value of OptionsSendVideo.

func (OptionsSendVideo) SetHasSpoiler added in v0.11.18

func (o OptionsSendVideo) SetHasSpoiler(hasSpoiler bool) OptionsSendVideo

SetHasSpoiler sets the `has_spoiler` value of OptionsSendVideo.

func (OptionsSendVideo) SetHeight

func (o OptionsSendVideo) SetHeight(height int) OptionsSendVideo

SetHeight sets the `height` value of OptionsSendVideo.

func (OptionsSendVideo) SetMessageEffectID added in v0.11.1

func (o OptionsSendVideo) SetMessageEffectID(messageEffectID string) OptionsSendVideo

SetMessageEffectID sets the `message_effect_id` value of OptionsSendVideo.

func (OptionsSendVideo) SetMessageThreadID

func (o OptionsSendVideo) SetMessageThreadID(messageThreadID int64) OptionsSendVideo

SetMessageThreadID sets the `message_thread_id` value of OptionsSendVideo.

func (OptionsSendVideo) SetParseMode

func (o OptionsSendVideo) SetParseMode(parseMode ParseMode) OptionsSendVideo

SetParseMode sets the `parse_mode` value of OptionsSendVideo.

func (OptionsSendVideo) SetProtectContent

func (o OptionsSendVideo) SetProtectContent(protect bool) OptionsSendVideo

SetProtectContent sets the `protect_content` value of OptionsSendVideo.

func (OptionsSendVideo) SetReplyMarkup

func (o OptionsSendVideo) SetReplyMarkup(replyMarkup any) OptionsSendVideo

SetReplyMarkup sets the `reply_markup` value of OptionsSendVideo.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVideo) SetReplyParameters

func (o OptionsSendVideo) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVideo

SetReplyParameters sets the `reply_parameters` value of OptionsSendVideo.

func (OptionsSendVideo) SetShowCaptionAboveMedia added in v0.11.1

func (o OptionsSendVideo) SetShowCaptionAboveMedia(showCaptionAboveMedia bool) OptionsSendVideo

SetShowCaptionAboveMedia sets the `show_caption_above_media` value of OptionsSendVideo.

func (OptionsSendVideo) SetStartTimestamp added in v0.11.14

func (o OptionsSendVideo) SetStartTimestamp(startTimestamp int) OptionsSendVideo

SetStartTimestamp sets the `start_timestamp` value of OptionsSendVideo.

func (OptionsSendVideo) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendVideo) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendVideo

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendVideo.

func (OptionsSendVideo) SetSupportsStreaming

func (o OptionsSendVideo) SetSupportsStreaming(supportsStreaming bool) OptionsSendVideo

SetSupportsStreaming sets the `supports_streaming` value of OptionsSendVideo.

func (OptionsSendVideo) SetThumbnail

func (o OptionsSendVideo) SetThumbnail(thumbnail any) OptionsSendVideo

SetThumbnail sets the `thumbnail` value of OptionsSendVideo.

`thumbnail` can be one of InputFile or string.

func (OptionsSendVideo) SetWidth

func (o OptionsSendVideo) SetWidth(width int) OptionsSendVideo

SetWidth sets the `width` value of OptionsSendVideo.

type OptionsSendVideoNote

type OptionsSendVideoNote MethodOptions

OptionsSendVideoNote struct for SendVideoNote().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `duration`, `length`, `thumbnail`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`. (XXX: API returns 'Bad Request: wrong video note length' when length is not given / 2017.05.19.)

https://core.telegram.org/bots/api#sendvideonote

func (OptionsSendVideoNote) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendVideoNote) SetAllowPaidBroadcast(allow bool) OptionsSendVideoNote

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendVideoNote) SetBusinessConnectionID(businessConnectionID string) OptionsSendVideoNote

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendVideoNote) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendVideoNote

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetDisableNotification

func (o OptionsSendVideoNote) SetDisableNotification(disable bool) OptionsSendVideoNote

SetDisableNotification sets the `disable_notification` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetDuration

func (o OptionsSendVideoNote) SetDuration(duration int) OptionsSendVideoNote

SetDuration sets the `duration` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetLength

func (o OptionsSendVideoNote) SetLength(length int) OptionsSendVideoNote

SetLength sets the `length` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetMessageEffectID added in v0.11.1

func (o OptionsSendVideoNote) SetMessageEffectID(messageEffectID string) OptionsSendVideoNote

SetMessageEffectID sets the `message_effect_id` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetMessageThreadID

func (o OptionsSendVideoNote) SetMessageThreadID(messageThreadID int64) OptionsSendVideoNote

SetMessageThreadID sets the `message_thread_id` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetProtectContent

func (o OptionsSendVideoNote) SetProtectContent(protect bool) OptionsSendVideoNote

SetProtectContent sets the `protect_content` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetReplyMarkup

func (o OptionsSendVideoNote) SetReplyMarkup(replyMarkup any) OptionsSendVideoNote

SetReplyMarkup sets the `reply_markup` value of OptionsSendVideoNote.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVideoNote) SetReplyParameters

func (o OptionsSendVideoNote) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVideoNote

SetReplyParameters sets the `reply_parameters` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendVideoNote) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendVideoNote

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetThumbnail

func (o OptionsSendVideoNote) SetThumbnail(thumbnail any) OptionsSendVideoNote

SetThumbnail sets the `thumbnail` value of OptionsSendVideoNote.

`thumbnail` can be one of InputFile or string.

type OptionsSendVoice

type OptionsSendVoice MethodOptions

OptionsSendVoice struct for SendVoice().

options include: `business_connection_id`, `message_thread_id`, `direct_messages_topic_id`, `caption`, `parse_mode`, `caption_entities`, `duration`, `disable_notification`, `protect_content`, `allow_paid_broadcast`, `message_effect_id`, `suggested_post_parameters`, `reply_parameters`, and `reply_markup`.

https://core.telegram.org/bots/api#sendvoice

func (OptionsSendVoice) SetAllowPaidBroadcast added in v0.11.8

func (o OptionsSendVoice) SetAllowPaidBroadcast(allow bool) OptionsSendVoice

SetAllowPaidBroadcast sets the `allow_paid_broadcast` value of OptionsSendVoice.

func (OptionsSendVoice) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendVoice) SetBusinessConnectionID(businessConnectionID string) OptionsSendVoice

SetBusinessConnectionID sets the `business_connection_id` value of OptionsSendVoice.

func (OptionsSendVoice) SetCaption

func (o OptionsSendVoice) SetCaption(caption string) OptionsSendVoice

SetCaption sets the `caption` value of OptionsSendVoice.

func (OptionsSendVoice) SetCaptionEntities

func (o OptionsSendVoice) SetCaptionEntities(entities []MessageEntity) OptionsSendVoice

SetCaptionEntities sets the `caption_entities` value of OptionsSendVoice.

func (OptionsSendVoice) SetDirectMessagesTopicID added in v0.11.19

func (o OptionsSendVoice) SetDirectMessagesTopicID(directMessagesTopicID int64) OptionsSendVoice

SetDirectMessagesTopicID sets the `direct_messages_topic_id` value of OptionsSendVoice.

func (OptionsSendVoice) SetDisableNotification

func (o OptionsSendVoice) SetDisableNotification(disable bool) OptionsSendVoice

SetDisableNotification sets the `disable_notification` value of OptionsSendVoice.

func (OptionsSendVoice) SetDuration

func (o OptionsSendVoice) SetDuration(duration int) OptionsSendVoice

SetDuration sets the `duration` value of OptionsSendVoice.

func (OptionsSendVoice) SetMessageEffectID added in v0.11.1

func (o OptionsSendVoice) SetMessageEffectID(messageEffectID string) OptionsSendVoice

SetMessageEffectID sets the `message_effect_id` value of OptionsSendVoice.

func (OptionsSendVoice) SetMessageThreadID

func (o OptionsSendVoice) SetMessageThreadID(messageThreadID int64) OptionsSendVoice

SetMessageThreadID sets the `message_thread_id` value of OptionsSendVoice.

func (OptionsSendVoice) SetParseMode

func (o OptionsSendVoice) SetParseMode(parseMode ParseMode) OptionsSendVoice

SetParseMode sets the `parse_mode` value of OptionsSendVoice.

func (OptionsSendVoice) SetProtectContent

func (o OptionsSendVoice) SetProtectContent(protect bool) OptionsSendVoice

SetProtectContent sets the `protect_content` value of OptionsSendVoice.

func (OptionsSendVoice) SetReplyMarkup

func (o OptionsSendVoice) SetReplyMarkup(replyMarkup any) OptionsSendVoice

SetReplyMarkup sets the `reply_markup` value of OptionsSendVoice.

`replyMarkup` can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVoice) SetReplyParameters

func (o OptionsSendVoice) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVoice

SetReplyParameters sets the `reply_parameters` value of OptionsSendVoice.

func (OptionsSendVoice) SetSuggestedPostParameters added in v0.11.19

func (o OptionsSendVoice) SetSuggestedPostParameters(suggestedPostParameters SuggestedPostParameters) OptionsSendVoice

SetSuggestedPostParameters sets the `suggested_post_parameters` value of OptionsSendVoice.

type OptionsSetBusinessAccountBio added in v0.11.17

type OptionsSetBusinessAccountBio MethodOptions

OptionsSetBusinessAccountBio struct for SetBusinessAccountBio().

options include: `bio`.

https://core.telegram.org/bots/api#setbusinessaccountbio

func (OptionsSetBusinessAccountBio) SetBio added in v0.11.17

SetBio sets the `bio` value of OptionsSetBusinessAccountBio.

type OptionsSetBusinessAccountName added in v0.11.17

type OptionsSetBusinessAccountName MethodOptions

OptionsSetBusinessAccountName struct for SetBusinessAccountName().

options include: `last_name`.

https://core.telegram.org/bots/api#setbusinessaccountname

func (OptionsSetBusinessAccountName) SetLastName added in v0.11.17

SetLastName sets the `last_name` value of OptionsSetBusinessAccountName.

type OptionsSetBusinessAccountProfilePhoto added in v0.11.17

type OptionsSetBusinessAccountProfilePhoto MethodOptions

OptionsSetBusinessAccountProfilePhoto struct for SetBusinessAccountProfilePhoto().

options include: `is_public`.

https://core.telegram.org/bots/api#setbusinessaccountprofilephoto

func (OptionsSetBusinessAccountProfilePhoto) SetIsPublic added in v0.11.17

SetIsPublic sets the `is_public` value of OptionsSetBusinessAccountProfilePhoto.

type OptionsSetBusinessAccountUsername added in v0.11.17

type OptionsSetBusinessAccountUsername MethodOptions

OptionsSetBusinessAccountUsername struct for SetBusinessAccountUsername().

options include: `username`.

https://core.telegram.org/bots/api#setbusinessaccountusername

func (OptionsSetBusinessAccountUsername) SetUsername added in v0.11.17

SetUsername sets the `username` value of OptionsSetBusinessAccountUsername.

type OptionsSetChatMemberTag added in v0.13.1

type OptionsSetChatMemberTag MethodOptions

OptionsSetChatMemberTag struct for SetChatMemberTag

options include: `tag`.

https://core.telegram.org/bots/api#setchatmembertag

func (OptionsSetChatMemberTag) SetTag added in v0.13.1

SetTag sets the `tag` value of OptionsSetChatMemberTag.

`tag` is 0-16 characters long, and emoji not allowed.

type OptionsSetChatMenuButton

type OptionsSetChatMenuButton MethodOptions

OptionsSetChatMenuButton struct for SetChatMenuButton().

options include: `chat_id`, and `menu_button`.

https://core.telegram.org/bots/api#setchatmenubutton

func (OptionsSetChatMenuButton) SetChatID

SetChatID sets the `chat_id` value of OptionsSetChatMenuButton.

func (OptionsSetChatMenuButton) SetMenuButton

func (o OptionsSetChatMenuButton) SetMenuButton(menuButton MenuButton) OptionsSetChatMenuButton

SetMenuButton sets the `menu_button` value of OptionsSetChatMenuButton.

type OptionsSetChatPermissions

type OptionsSetChatPermissions MethodOptions

OptionsSetChatPermissions struct for SetChatPermissions

options include: `use_independent_chat_permissions`.

https://core.telegram.org/bots/api#setchatpermissions

func (OptionsSetChatPermissions) SetUserIndependentChatPermissions

func (o OptionsSetChatPermissions) SetUserIndependentChatPermissions(val bool) OptionsSetChatPermissions

SetUserIndependentChatPermissions sets the `use_independent_chat_permissions` value of OptionsRestrictChatMember.

type OptionsSetCustomEmojiStickerSetThumbnail

type OptionsSetCustomEmojiStickerSetThumbnail MethodOptions

OptionsSetCustomEmojiStickerSetThumbnail struct for SetCustomEmojiStickerSet()

options include: `custom_emoji_id`.

https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail

func (OptionsSetCustomEmojiStickerSetThumbnail) SetCustomEmojiID

SetCustomEmojiID sets the `custom_emoji_id` value of OptionsSetCustomEmojiStickerSetThumbnail.

type OptionsSetGameScore

type OptionsSetGameScore MethodOptions

OptionsSetGameScore struct for SetGameScore().

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

other options: `force`, and `disable_edit_message`

https://core.telegram.org/bots/api#setgamescore

func (OptionsSetGameScore) SetDisableEditMessage

func (o OptionsSetGameScore) SetDisableEditMessage(disableEditMessage bool) OptionsSetGameScore

SetDisableEditMessage sets the `disable_edit_message` value of OptionsSetGameScore.

func (OptionsSetGameScore) SetForce

func (o OptionsSetGameScore) SetForce(force bool) OptionsSetGameScore

SetForce sets the `force` value of OptionsSetGameScore.

func (OptionsSetGameScore) SetIDs

func (o OptionsSetGameScore) SetIDs(chatID ChatID, messageID int64) OptionsSetGameScore

SetIDs sets the `chat_id` and `message_id` values of OptionsSetGameScore.

func (OptionsSetGameScore) SetInlineMessageID

func (o OptionsSetGameScore) SetInlineMessageID(inlineMessageID string) OptionsSetGameScore

SetInlineMessageID sets the `inline_message_id` value of OptionsSetGameScore.

type OptionsSetManagedBotAccessSettings added in v0.13.4

type OptionsSetManagedBotAccessSettings MethodOptions

OptionsSetManagedBotAccessSettings struct for SetManagedBotAccessSettings().

options include: `added_user_ids`.

https://core.telegram.org/bots/api#setmanagedbotaccesssettings

func (OptionsSetManagedBotAccessSettings) SetAddedUserIDs added in v0.13.4

SetAddedUserIDs sets the `added_user_ids` value of OptionsSetManagedBotAccessSettings.

type OptionsSetMessageReaction

type OptionsSetMessageReaction MethodOptions

OptionsSetMessageReaction struct for SetMessageReaction().

options include: `reaction`, and `is_big`.

https://core.telegram.org/bots/api#setmessagereaction

func NewMessageReactionWithEmoji

func NewMessageReactionWithEmoji(emoji string) OptionsSetMessageReaction

NewMessageReactionWithEmoji returns a new OptionsSetMessageReaction with an emoji string for function `SetMessageReaction`.

func (OptionsSetMessageReaction) SetIsBig

SetIsBig sets the `is_big` value of OptionsSetMessageReaction.

func (OptionsSetMessageReaction) SetReaction

SetReaction sets the `reaction` value of OptionsSetMessageReaction.

type OptionsSetMyCommands

type OptionsSetMyCommands MethodOptions

OptionsSetMyCommands struct for SetMyCommands().

options include: `scope`, and `language_code`

https://core.telegram.org/bots/api#setmycommands

func (OptionsSetMyCommands) SetLanguageCode

func (o OptionsSetMyCommands) SetLanguageCode(languageCode string) OptionsSetMyCommands

SetLanguageCode sets the `language_code` value of OptionsSetMyCommands.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

func (OptionsSetMyCommands) SetScope

func (o OptionsSetMyCommands) SetScope(scope any) OptionsSetMyCommands

SetScope sets the `scope` value of OptionsSetMyCommands.

`scope` can be one of: BotCommandScopeDefault, BotCommandScopeAllPrivateChats, BotCommandScopeAllGroupChats, BotCommandScopeAllChatAdministrators, BotCommandScopeChat, BotCommandScopeChatAdministrators, or BotCommandScopeChatMember.

type OptionsSetMyDefaultAdministratorRights

type OptionsSetMyDefaultAdministratorRights MethodOptions

OptionsSetMyDefaultAdministratorRights struct for SetMyDefaultAdministratorRights().

options include: `rights`, and `for_channels`.

https://core.telegram.org/bots/api#setmydefaultadministratorrights

func (OptionsSetMyDefaultAdministratorRights) SetForChannels

SetForChannels sets the `for_channels` value of OptionsSetMyDefaultAdministratorRights.

func (OptionsSetMyDefaultAdministratorRights) SetRights

SetRights sets the `rights` value of OptionsSetMyDefaultAdministratorRights.

type OptionsSetMyDescription

type OptionsSetMyDescription MethodOptions

OptionsSetMyDescription struct for SetMyDescription().

options include: `description`, and `language_code`.

https://core.telegram.org/bots/api#setmydescription

func (OptionsSetMyDescription) SetDescription

func (o OptionsSetMyDescription) SetDescription(description string) OptionsSetMyDescription

SetDescription sets the `description` value of OptionsSetMyDescription.

func (OptionsSetMyDescription) SetLanguageCode

func (o OptionsSetMyDescription) SetLanguageCode(languageCode string) OptionsSetMyDescription

SetLanguageCode sets the `language_code` value of OptionsSetMyDescription.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

type OptionsSetMyName

type OptionsSetMyName MethodOptions

OptionsSetMyName struct for SetMyName().

options include: `language_code`.

https://core.telegram.org/bots/api#setmyname

func (OptionsSetMyName) SetLanguageCode

func (o OptionsSetMyName) SetLanguageCode(languageCode string) OptionsSetMyName

SetLanguageCode sets the `language_code` value of OptionsSetMyName.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

type OptionsSetMyShortDescription

type OptionsSetMyShortDescription MethodOptions

OptionsSetMyShortDescription struct for SetMyShortDescription().

options include: `short_description`, and `language_code`.

https://core.telegram.org/bots/api#setmyshortdescription

func (OptionsSetMyShortDescription) SetLanguageCode

func (o OptionsSetMyShortDescription) SetLanguageCode(languageCode string) OptionsSetMyShortDescription

SetLanguageCode sets the `language_code` value of OptionsSetMyShortDescription.

`language_code` is a two-letter ISO 639-1 language code and can be empty.

func (OptionsSetMyShortDescription) SetShortDescription added in v0.11.18

func (o OptionsSetMyShortDescription) SetShortDescription(shortDescription string) OptionsSetMyShortDescription

SetShortDescription sets the `short_description` value of OptionsSetMyShortDescription.

type OptionsSetStickerMaskPosition

type OptionsSetStickerMaskPosition MethodOptions

OptionsSetStickerMaskPosition struct for SetStickerMaskPosition()

options include: `mask_position`.

https://core.telegram.org/bots/api#setstickermaskposition

func (OptionsSetStickerMaskPosition) SetMaskPosition

SetMaskPosition sets the `mask_position` value of OptionsSetStickerMaskPosition.

type OptionsSetStickerSetThumbnail

type OptionsSetStickerSetThumbnail MethodOptions

OptionsSetStickerSetThumbnail struct for SetStickerSetThumbnail()

options include: `thumbnail`.

https://core.telegram.org/bots/api#setstickersetthumbnail

func (OptionsSetStickerSetThumbnail) SetThumbnail

SetThumbnail sets the `thumbnail` value of OptionsSetStickerSetThumbnail.

func (OptionsSetStickerSetThumbnail) SetThumbnailString

func (o OptionsSetStickerSetThumbnail) SetThumbnailString(thumbnail string) OptionsSetStickerSetThumbnail

SetThumbnailString sets the `thumbnail` value of OptionsSetStickerSetThumbnail.

`thumbnail` can be a file_id or a http url to a file

type OptionsSetUserEmojiStatus added in v0.11.9

type OptionsSetUserEmojiStatus MethodOptions

OptionsSetUserEmojiStatus struct for SetUserEmojiStatus().

options include: `emoji_status_custom_emoji_id`, and `emoji_status_expiration_date`.

func (OptionsSetUserEmojiStatus) SetEmojiStatusCustomEmojiID added in v0.11.9

func (o OptionsSetUserEmojiStatus) SetEmojiStatusCustomEmojiID(customEmojiID string) OptionsSetUserEmojiStatus

SetEmojiStatusCustomEmojiID sets the `emoji_status_custom_emoji_id` value of OptionsSetUserEmojiStatus.

func (OptionsSetUserEmojiStatus) SetEmojiStatusExpirationDate added in v0.11.9

func (o OptionsSetUserEmojiStatus) SetEmojiStatusExpirationDate(expirationDate int) OptionsSetUserEmojiStatus

SetEmojiStatusExpirationDate sets the `emoji_status_expiration_date` value of OptionsSetUserEmojiStatus.

type OptionsSetWebhook

type OptionsSetWebhook MethodOptions

OptionsSetWebhook struct for SetWebhook().

options include: `certificate`, `ip_address`, `max_connections`, `allowed_updates`, `drop_pending_updates`, and `secret_token`.

https://core.telegram.org/bots/api#setwebhook

func (OptionsSetWebhook) SetAllowedUpdates

func (o OptionsSetWebhook) SetAllowedUpdates(allowedUpdates []UpdateType) OptionsSetWebhook

SetAllowedUpdates sets the `allowed_updates` value of OptionsSetWebhook.

func (OptionsSetWebhook) SetCertificate

func (o OptionsSetWebhook) SetCertificate(filepath string) OptionsSetWebhook

SetCertificate sets the `certificate` value of OptionsSetWebhook.

func (OptionsSetWebhook) SetDropPendingUpdates

func (o OptionsSetWebhook) SetDropPendingUpdates(drop bool) OptionsSetWebhook

SetDropPendingUpdates sets the `drop_pending_updates` value of OptionsSetWebhook.

func (OptionsSetWebhook) SetIPAddress

func (o OptionsSetWebhook) SetIPAddress(address string) OptionsSetWebhook

SetIPAddress sets the `ip_address` value of OptionsSetWebhook.

func (OptionsSetWebhook) SetMaxConnections

func (o OptionsSetWebhook) SetMaxConnections(maxConnections int) OptionsSetWebhook

SetMaxConnections sets the `max_connections` value of OptionsSetWebhook.

maxConnections: 1 ~ 100 (default: 40)

func (OptionsSetWebhook) SetSecretToken

func (o OptionsSetWebhook) SetSecretToken(token string) OptionsSetWebhook

SetSecretToken sets the `secret_token` value of OptionsSetWebhook.

type OptionsStopMessageLiveLocation

type OptionsStopMessageLiveLocation MethodOptions

OptionsStopMessageLiveLocation struct for StopMessageLiveLocation()

required options: `chat_id` + `message_id` (when `inline_message_id` is not given)

or `inline_message_id` (when `chat_id` & `message_id` is not given)

other options: `business_connection_id`, `reply_markup`

https://core.telegram.org/bots/api#stopmessagelivelocation

func (OptionsStopMessageLiveLocation) SetBusinessConnectionID added in v0.11.2

func (o OptionsStopMessageLiveLocation) SetBusinessConnectionID(businessConnectionID string) OptionsStopMessageLiveLocation

SetBusinessConnectionID sets the `business_connection_id` value of OptionsStopMessageLiveLocation.

func (OptionsStopMessageLiveLocation) SetIDs

SetIDs sets the `chat_id` and `message_id` values of OptionsStopMessageLiveLocation.

func (OptionsStopMessageLiveLocation) SetInlineMessageID

func (o OptionsStopMessageLiveLocation) SetInlineMessageID(inlineMessageID string) OptionsStopMessageLiveLocation

SetInlineMessageID sets the `inline_message_id` value of OptionsStopMessageLiveLocation.

func (OptionsStopMessageLiveLocation) SetReplyMarkup

SetReplyMarkup sets the `reply_markup` value of OptionsStopMessageLiveLocation.

type OptionsStopPoll

type OptionsStopPoll MethodOptions

OptionsStopPoll struct for StopPoll().

options include: `business_connection_id`, and `reply_markup`.

https://core.telegram.org/bots/api#stoppoll

func (OptionsStopPoll) SetBusinessConnectionID added in v0.11.2

func (o OptionsStopPoll) SetBusinessConnectionID(businessConnectionID string) OptionsStopPoll

SetBusinessConnectionID sets the `business_connection_id` value of OptionsStopPoll.

func (OptionsStopPoll) SetReplyMarkup

func (o OptionsStopPoll) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsStopPoll

SetReplyMarkup sets the `reply_markup` value of OptionsStopPoll.

type OptionsTransferGift added in v0.11.17

type OptionsTransferGift MethodOptions

OptionsTransferGift struct for TransferGift().

options include: `star_count`.

https://core.telegram.org/bots/api#transfergift

func (OptionsTransferGift) SetStarCount added in v0.11.17

func (o OptionsTransferGift) SetStarCount(starCount int) OptionsTransferGift

SetStarCount sets the `star_count` value of OptionsTrasnferGift.

type OptionsUnpinChatMessage

type OptionsUnpinChatMessage MethodOptions

OptionsUnpinChatMessage struct for UnpinChatMessage

options include: `business_connection_id`, and `message_id`.

https://core.telegram.org/bots/api#unpinchatmessage

func (OptionsUnpinChatMessage) SetBusinessConnectionID added in v0.11.5

func (o OptionsUnpinChatMessage) SetBusinessConnectionID(businessConnectionID string) OptionsUnpinChatMessage

SetBusinessConnectionID sets the `business_connection_id` value of OptionsUnpinChatMessage.

func (OptionsUnpinChatMessage) SetMessageID

func (o OptionsUnpinChatMessage) SetMessageID(messageID int64) OptionsUnpinChatMessage

SetMessageID set the `message_id` value of OptionsUnpinChatMessage.

type OptionsUpgradeGift added in v0.11.17

type OptionsUpgradeGift MethodOptions

OptionsUpgradeGift struct for UpgradeGift().

options include: `keep_original_details`, and `star_count`.

https://core.telegram.org/bots/api#upgradegift

func (OptionsUpgradeGift) SetKeepOriginalDetails added in v0.11.17

func (o OptionsUpgradeGift) SetKeepOriginalDetails(keep bool) OptionsUpgradeGift

SetKeepOriginalDetails sets the `keep_original_details` value of OptionsUpgradeGift.

func (OptionsUpgradeGift) SetStarCount added in v0.11.17

func (o OptionsUpgradeGift) SetStarCount(starCount int) OptionsUpgradeGift

SetStarCount sets the `star_count` value of OptionsUpgradeGift.

type OptionsVerifyChat added in v0.11.12

type OptionsVerifyChat MethodOptions

OptionsVerifyChat struct for VerifyChat().

options include: `custom_description`.

https://core.telegram.org/bots/api#verifychat

func (OptionsVerifyChat) SetCustomDescription added in v0.11.12

func (o OptionsVerifyChat) SetCustomDescription(customDescription string) OptionsVerifyChat

SetCustomDescription sets the `custom_description` value of OptionsVerifyChat.

type OptionsVerifyUser added in v0.11.12

type OptionsVerifyUser MethodOptions

OptionsVerifyUser struct for VerifyUser().

options include: `custom_description`.

https://core.telegram.org/bots/api#verifyuser

func (OptionsVerifyUser) SetCustomDescription added in v0.11.12

func (o OptionsVerifyUser) SetCustomDescription(customDescription string) OptionsVerifyUser

SetCustomDescription sets the `custom_description` value of OptionsVerifyUser.

type OrderInfo

type OrderInfo struct {
	Name            *string          `json:"name,omitempty"`
	PhoneNumber     *string          `json:"phone_number,omitempty"`
	Email           *string          `json:"email,omitempty"`
	ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"`
}

OrderInfo is a struct of order info

https://core.telegram.org/bots/api#orderinfo

type OwnedGift added in v0.11.17

type OwnedGift struct {
	Type        string          `json:"type"`
	Gift        json.RawMessage `json:"gift"` // one of `Gift` or `UniqueGift`
	OwnedGiftID *string         `json:"owned_gift_id,omitempty"`
	SenderUser  *User           `json:"sender_user,omitempty"`
	SendDate    int             `json:"send_date"`
	IsSaved     *bool           `json:"is_saved,omitempty"`

	// Type == "regular"
	Text                    *string         `json:"text,omitempty"`
	Entities                []MessageEntity `json:"entities,omitempty"`
	IsPrivate               *bool           `json:"is_private,omitempty"`
	CanBeUpgraded           *bool           `json:"can_be_upgraded,omitempty"`
	WasRefunded             *bool           `json:"was_refunded,omitempty"`
	ConvertStarCount        *int            `json:"convert_star_count,omitempty"`
	PrepaidUpgradeStarCount *int            `json:"prepaid_upgrade_star_count,omitempty"`
	IsUpgradeSeparate       *bool           `json:"is_upgrade_separate,omitempty"`
	UniqueGiftNumber        *int            `json:"unique_gift_number,omitempty"`

	// Type == "unique"
	CanBeTransferred  *bool `json:"can_be_transferred,omitempty"`
	TransferStarCount *int  `json:"transfer_star_count,omitempty"`
	NextTransferDate  *int  `json:"next_transfer_date,omitempty"`
}

OwnedGift describes a gift received and owned by a user or a chat.

https://core.telegram.org/bots/api#ownedgift

func (OwnedGift) GiftAsGift added in v0.11.17

func (g OwnedGift) GiftAsGift() (result *Gift, err error)

GiftAsGift returns `gift` as Gift.

func (OwnedGift) GiftAsUniqueGift added in v0.11.17

func (g OwnedGift) GiftAsUniqueGift() (result *UniqueGift, err error)

GiftAsUniqueGift returns `gift` as UniqueGift.

type OwnedGifts added in v0.11.17

type OwnedGifts struct {
	TotalCount int         `json:"total_count"`
	Gifts      []OwnedGift `json:"gifts"`
	NextOffset *string     `json:"next_offset,omitempty"`
}

OwnedGifts contains the list of gifts received and owned by a user or a chat.

https://core.telegram.org/bots/api#ownedgifts

type PaidMedia added in v0.11.3

type PaidMedia any

PaidMedia can be one of `PaidMediaPreview`, `PaidMediaPhoto`, or `PaidMediaVideo`

https://core.telegram.org/bots/api#paidmedia

type PaidMediaInfo added in v0.11.3

type PaidMediaInfo struct {
	StarCount int         `json:"star_count"`
	PaidMedia []PaidMedia `json:"paid_media"`
}

PaidMediaInfo struct

https://core.telegram.org/bots/api#paidmediainfo

type PaidMediaLivePhoto added in v0.13.4

type PaidMediaLivePhoto struct {
	Type      string    `json:"type"` // == "live_photo"
	LivePhoto LivePhoto `json:"live_photo"`
}

PaidMediaLivePhoto struct

https://core.telegram.org/bots/api#paidmedialivephoto

type PaidMediaPhoto added in v0.11.3

type PaidMediaPhoto struct {
	Type  string      `json:"type"` // == "photo"
	Photo []PhotoSize `json:"photo"`
}

PaidMediaPhoto struct

https://core.telegram.org/bots/api#paidmediaphoto

type PaidMediaPreview added in v0.11.3

type PaidMediaPreview struct {
	Type     string `json:"type"` // == "preview"
	Width    int    `json:"width"`
	Height   int    `json:"height"`
	Duration int    `json:"duration"`
}

PaidMediaPreview struct

https://core.telegram.org/bots/api#paidmediapreview

type PaidMediaPurchased added in v0.11.7

type PaidMediaPurchased struct {
	From             User   `json:"from"`
	PaidMediaPayload string `json:"paid_media_payload"`
}

PaidMediaPurchased is a struct for a paid media purchase.

https://core.telegram.org/bots/api#paidmediapurchased

type PaidMediaVideo added in v0.11.3

type PaidMediaVideo struct {
	Type  string `json:"type"` // == "video"
	Video Video  `json:"video"`
}

PaidMediaVideo struct

https://core.telegram.org/bots/api#paidmediavideo

type PaidMessagePriceChanged added in v0.11.17

type PaidMessagePriceChanged struct {
	PaidMessageStarCount int `json:"paid_message_star_count"`
}

PaidMessagePriceChanged describes a service message about a change in the price of paid messages within a chat.

https://core.telegram.org/bots/api#paidmessagepricechanged

type ParseMode

type ParseMode string // parse_mode

ParseMode is a mode of parse

const (
	// (legacy) https://core.telegram.org/bots/api#markdown-style
	ParseModeMarkdown ParseMode = "Markdown"

	// https://core.telegram.org/bots/api#markdownv2-style
	ParseModeMarkdownV2 ParseMode = "MarkdownV2"

	// https://core.telegram.org/bots/api#html-style
	ParseModeHTML ParseMode = "HTML"
)

ParseMode strings

type PhotoSize

type PhotoSize struct {
	FileID       string `json:"file_id"`
	FileUniqueID string `json:"file_unique_id"`
	Width        int    `json:"width"`
	Height       int    `json:"height"`
	FileSize     *int   `json:"file_size,omitempty"`
}

PhotoSize is a struct of a photo's size

https://core.telegram.org/bots/api#photosize

type Poll

type Poll struct {
	ID                    string          `json:"id"`
	Question              string          `json:"question"` // 1~255 chars
	QuestionEntities      []MessageEntity `json:"question_entities,omitempty"`
	Options               []PollOption    `json:"options"`
	TotalVoterCount       int             `json:"total_voter_count"`
	IsClosed              bool            `json:"is_closed"`
	IsAnonymous           bool            `json:"is_anonymous"`
	Type                  string          `json:"type"` // "quiz" or "regular"
	AllowsMultipleAnswers bool            `json:"allows_multiple_answers"`
	AllowsRevoting        bool            `json:"allows_revoting"`
	MembersOnly           bool            `json:"members_only"`
	CountryCodes          []string        `json:"country_codes,omitempty"`
	CorrectOptionIDs      []int           `json:"correct_option_ids,omitempty"`
	Explanation           *string         `json:"explanation,omitempty"`
	ExplanationEntities   []MessageEntity `json:"explanation_entities,omitempty"`
	ExplanationMedia      *PollMedia      `json:"explalation_media,omitempty"`
	OpenPeriod            *int            `json:"open_period,omitempty"`
	CloseDate             *int            `json:"close_date,omitempty"`
	Description           *string         `json:"description,omitempty"`
	DescriptionEntities   []MessageEntity `json:"description_entities,omitempty"`
	Media                 *PollMedia      `json:"media,omitempty"`
}

Poll is a struct of a poll

https://core.telegram.org/bots/api#poll

type PollAnswer

type PollAnswer struct {
	PollID              string   `json:"poll_id"`
	VoterChat           *Chat    `json:"voter_chat,omitempty"`
	User                *User    `json:"user,omitempty"`
	OptionIDs           []int    `json:"option_ids"`
	OptionPersistentIDs []string `json:"option_persistent_ids"`
}

PollAnswer is a struct of a poll answer

https://core.telegram.org/bots/api#pollanswer

type PollMedia added in v0.13.4

type PollMedia struct {
	Animation *Animation  `json:"animation,omitempty"`
	Audio     *Audio      `json:"audio,omitempty"`
	Document  *Document   `json:"document,omitempty"`
	Link      *Link       `json:"link,omitempty"`
	LivePhoto *LivePhoto  `json:"live_photo,omitempty"`
	Location  *Location   `json:"location,omitempty"`
	Photo     []PhotoSize `json:"photo,omitempty"`
	Sticker   *Sticker    `json:"sticker,omitempty"`
	Venue     *Venue      `json:"venue,omitempty"`
	Video     *Video      `json:"video,omitempty"`
}

PollMedia is a struct of a poll media

https://core.telegram.org/bots/api#pollmedia

type PollOption

type PollOption struct {
	PersistentID string          `json:"persistent_id"`
	Text         *string         `json:"text,omitempty"` // 1~100 chars
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	Media        *PollMedia      `json:"media,omitempty"`
	VoterCount   int             `json:"voter_count"`
	AddedByUser  *User           `json:"added_by_user,omitempty"`
	AddedByChat  *Chat           `json:"added_by_chat,omitempty"`
	AdditionDate *int64          `json:"addition_date,omitempty"`
}

PollOption is a struct of a poll option

https://core.telegram.org/bots/api#polloption

type PollOptionAdded added in v0.13.3

type PollOptionAdded struct {
	PollMessage        *MaybeInaccessibleMessage `json:"poll_message,omitempty"`
	OptionPersistentID string                    `json:"option_persistent_id"`
	OptionText         string                    `json:"option_text"`
	OptionTextEntities []MessageEntity           `json:"option_text_entities,omitempty"`
}

PollOptionAdded describes a service message about an option added to a poll.

https://core.telegram.org/bots/api#polloptionadded

type PollOptionDeleted added in v0.13.3

type PollOptionDeleted struct {
	PollMessage        *MaybeInaccessibleMessage `json:"poll_message,omitempty"`
	OptionPersistentID string                    `json:"option_persistent_id"`
	OptionText         string                    `json:"option_text"`
	OptionTextEntities []MessageEntity           `json:"option_text_entities,omitempty"`
}

PollOptionDeleted describes a service message about an option deleted from a poll.

https://core.telegram.org/bots/api#polloptiondeleted

type PreCheckoutQuery

type PreCheckoutQuery struct {
	ID               string     `json:"id"`
	From             User       `json:"from"`
	Currency         string     `json:"currency"`
	TotalAmount      int        `json:"total_amount"`
	InvoicePayload   string     `json:"invoice_payload"`
	ShippingOptionID *string    `json:"shipping_option_id,omitempty"`
	OrderInfo        *OrderInfo `json:"order_info,omitempty"`
}

PreCheckoutQuery is a struct for a precheckout query

https://core.telegram.org/bots/api#precheckoutquery

type PreparedInlineMessage added in v0.11.9

type PreparedInlineMessage struct {
	ID             string `json:"id"`
	ExpirationDate int    `json:"expiration_date"`
}

PreparedInlineMessage is a struct for a prepared inline message

https://core.telegram.org/bots/api#preparedinlinemessage

type PreparedKeyboardButton added in v0.13.3

type PreparedKeyboardButton struct {
	ID string `json:"id"`
}

PreparedKeyboardButton is a struct for a keyboard button to be used by a user of a Mini App.

https://core.telegram.org/bots/api#preparedkeyboardbutton

type ProximityAlertTriggered

type ProximityAlertTriggered struct {
	Traveler User `json:"traveler"`
	Watcher  User `json:"watcher"`
	Distance int  `json:"distance"`
}

ProximityAlertTriggered is a struct of priximity alert triggered object

https://core.telegram.org/bots/api#proximityalerttriggered

type Rarity added in v0.12.2

type Rarity string
const (
	RarityUncommon  Rarity = "uncommon"
	RarityRare      Rarity = "rare"
	RarityEpic      Rarity = "epic"
	RarityLegendary Rarity = "legendary"
)

type ReactionCount

type ReactionCount struct {
	Type       ReactionType `json:"type"`
	TotalCount int          `json:"total_count"`
}

ReactionCount is a struct for a count of reactions

https://core.telegram.org/bots/api#reactioncount

type ReactionType

type ReactionType struct {
	Type          string  `json:"type"`
	Emoji         *string `json:"emoji,omitempty"`
	CustomEmojiID *string `json:"custom_emoji_id,omitempty"`
}

ReactionType is a struct for a reaction

NOTE: Can be generated with New*Reaction*() functions in types_helper.go

NOTE: This is a flat union discriminated by `Type`. When the API adds a new reaction type, add any new fields to this struct and add a matching New*Reaction*() helper in types_helper.go.

https://core.telegram.org/bots/api#reactiontype

func NewCustomEmojiReaction

func NewCustomEmojiReaction(customEmojiID string) ReactionType

NewCustomEmojiReaction returns a ReactionType with custom emoji.

https://core.telegram.org/bots/api#reactiontypecustomemoji

func NewEmojiReaction

func NewEmojiReaction(emoji string) ReactionType

NewEmojiReaction returns a ReactionType with emoji.

https://core.telegram.org/bots/api#reactiontypeemoji

func NewPaidReaction added in v0.11.6

func NewPaidReaction() ReactionType

NewPaidReaction returns a new ReactionType with type 'paid'.

https://core.telegram.org/bots/api#reactiontypepaid

type RefundedPayment added in v0.11.4

type RefundedPayment struct {
	Currency                string  `json:"currency"`
	TotalAmount             int     `json:"total_amount"`
	InvoicePayload          string  `json:"invoice_payload"`
	TelegramPaymentChargeID string  `json:"telegram_payment_charge_id"`
	ProviderPaymentChargeID *string `json:"provider_payment_charge_id,omitempty"`
}

RefundedPayment is a struct for a refunded payment

https://core.telegram.org/bots/api#refundedpayment

type ReplyKeyboardMarkup

type ReplyKeyboardMarkup struct {
	Keyboard              [][]KeyboardButton `json:"keyboard"`
	IsPersistent          *bool              `json:"is_persistent,omitempty"`
	ResizeKeyboard        *bool              `json:"resize_keyboard,omitempty"`
	OneTimeKeyboard       *bool              `json:"one_time_keyboard,omitempty"`
	InputFieldPlaceholder *string            `json:"input_field_placeholder,omitempty"` // 1-64 characters
	Selective             *bool              `json:"selective,omitempty"`
}

ReplyKeyboardMarkup is a struct for reply keyboard markups

NOTE: Can be generated with NewReplyKeyboardMarkup() function in types_helper.go

https://core.telegram.org/bots/api#replykeyboardmarkup

func NewReplyKeyboardMarkup added in v0.10.7

func NewReplyKeyboardMarkup(keyboard [][]KeyboardButton) ReplyKeyboardMarkup

NewReplyKeyboardMarkup returns a new ReplyKeyboardMarkup.

func (ReplyKeyboardMarkup) SetInputFieldPlaceholder added in v0.10.7

func (m ReplyKeyboardMarkup) SetInputFieldPlaceholder(placeholder string) ReplyKeyboardMarkup

SetInputFieldPlaceholder sets the `input_field_placeholder` value of ReplyKeyboardMarkup.

func (ReplyKeyboardMarkup) SetIsPersistent added in v0.10.7

func (m ReplyKeyboardMarkup) SetIsPersistent(persistent bool) ReplyKeyboardMarkup

SetIsPersistent sets the `is_persistent` value of ReplyKeyboardMarkup.

func (ReplyKeyboardMarkup) SetOneTimeKeyboard added in v0.10.7

func (m ReplyKeyboardMarkup) SetOneTimeKeyboard(oneTimeKeyboard bool) ReplyKeyboardMarkup

SetOneTimeKeyboard sets the `one_time_keyboard` value of ReplyKeyboardMarkup.

func (ReplyKeyboardMarkup) SetResizeKeyboard added in v0.10.7

func (m ReplyKeyboardMarkup) SetResizeKeyboard(resizeKeyboard bool) ReplyKeyboardMarkup

SetResizeKeyboard sets the `resize_keyboard` value of ReplyKeyboardMarkup.

func (ReplyKeyboardMarkup) SetSelective added in v0.10.7

func (m ReplyKeyboardMarkup) SetSelective(selective bool) ReplyKeyboardMarkup

SetSelective sets the `selective` value of ReplyKeyboardMarkup.

type ReplyKeyboardRemove

type ReplyKeyboardRemove struct {
	RemoveKeyboard bool  `json:"remove_keyboard"`
	Selective      *bool `json:"selective,omitempty"`
}

ReplyKeyboardRemove is a struct for ReplyKeyboardRemove

NOTE: Can be generated with NewReplyKeyboardRemove() function in types_helper.go

https://core.telegram.org/bots/api#replykeyboardremove

func NewReplyKeyboardRemove added in v0.10.7

func NewReplyKeyboardRemove(remove bool) ReplyKeyboardRemove

NewReplyKeyboardRemove returns a new ReplyKeyboardRemove.

func (ReplyKeyboardRemove) SetSelective added in v0.10.7

func (r ReplyKeyboardRemove) SetSelective(selective bool) ReplyKeyboardRemove

SetSelective sets the `selective` value of ReplyKeyboardRemove.

type ReplyParameters

type ReplyParameters struct {
	MessageID                int64           `json:"message_id"`
	ChatID                   *ChatID         `json:"chat_id,omitempty"`
	AllowSendingWithoutReply *bool           `json:"allow_sending_without_reply,omitempty"`
	Quote                    *string         `json:"quote,omitempty"`
	QuoteParseMode           *ParseMode      `json:"quote_parse_mode,omitempty"`
	QuoteEntities            []MessageEntity `json:"quote_entities,omitempty"`
	QuotePosition            *int            `json:"quote_position,omitempty"`
	ChecklistTaskID          *int64          `json:"checklist_task_id,omitempty"`
	PollOptionID             *string         `json:"poll_option_id,omitempty"`
}

ReplyParameters is a struct for replying messages

NOTE: Can be generated with NewReplyParameters() function in types_helper.go

https://core.telegram.org/bots/api#replyparameters

func NewReplyParameters added in v0.10.7

func NewReplyParameters(messageID int64) ReplyParameters

NewReplyParameters returns a new ReplyParameters.

func (ReplyParameters) SetAllowSendingWithoutReply added in v0.10.7

func (p ReplyParameters) SetAllowSendingWithoutReply(allowSendingWithoutReply bool) ReplyParameters

SetAllowSendingWithoutReply sets the `allow_sending_without_reply` value of ReplyParameters.

func (ReplyParameters) SetChatID added in v0.10.7

func (p ReplyParameters) SetChatID(chatID ChatID) ReplyParameters

SetChatID sets the `chat_id` value of ReplyParameters.

func (ReplyParameters) SetQuote added in v0.10.7

func (p ReplyParameters) SetQuote(quote string) ReplyParameters

SetQuote sets the `quote` value of ReplyParameters.

func (ReplyParameters) SetQuoteEntities added in v0.10.7

func (p ReplyParameters) SetQuoteEntities(entities []MessageEntity) ReplyParameters

SetQuoteEntities sets the `quote_entities` value of ReplyParameters.

func (ReplyParameters) SetQuoteParseMode added in v0.10.7

func (p ReplyParameters) SetQuoteParseMode(parseMode ParseMode) ReplyParameters

SetQuoteParseMode sets the `quote_parse_mode` value of ReplyParameters.

func (ReplyParameters) SetQuotePosition added in v0.10.7

func (p ReplyParameters) SetQuotePosition(position int) ReplyParameters

SetQuotePosition sets the `quote_position` value of ReplyParameters.

type RevenueWithdrawalState added in v0.11.2

type RevenueWithdrawalState struct {
	Type RevenueWithdrawalStateType `json:"type"`

	// when Type == RevenueWithdrawalStateSucceeded
	Date *int    `json:"date,omitempty"`
	URL  *string `json:"url,omitempty"`
}

RevenueWithdrawalState is a struct for a state of revenue withdrawl

https://core.telegram.org/bots/api#revenuewithdrawalstate

type RevenueWithdrawalStateType added in v0.11.2

type RevenueWithdrawalStateType string

RevenueWithdrawalStateType is a type of revenue withdrawl state

https://core.telegram.org/bots/api#revenuewithdrawalstate

const (
	RevenueWithdrawalStatePending   RevenueWithdrawalStateType = "pending"
	RevenueWithdrawalStateSucceeded RevenueWithdrawalStateType = "succeeded"
	RevenueWithdrawalStateFailed    RevenueWithdrawalStateType = "failed"
)

type RichBlock added in v0.13.5

type RichBlock struct {
	Type string `json:"type"`

	// text-bearing blocks: paragraph, heading, pre, footer, pullquote, thinking
	Text RichText `json:"text,omitzero"`

	// heading
	Size *int `json:"size,omitempty"` // 1(largest)-6(smallest)

	// pre
	Language *string `json:"language,omitempty"`

	// mathematical_expression
	Expression *string `json:"expression,omitempty"`

	// anchor
	Name *string `json:"name,omitempty"`

	// list
	Items []RichBlockListItem `json:"items,omitempty"`

	// blockquote, collage, slideshow, details
	Blocks []RichBlock `json:"blocks,omitempty"`

	// blockquote, pullquote
	Credit RichText `json:"credit,omitzero"`

	// details
	Summary RichText `json:"summary,omitzero"`
	IsOpen  *bool    `json:"is_open,omitempty"`

	// table
	Cells      [][]RichBlockTableCell `json:"cells,omitempty"`
	IsBordered *bool                  `json:"is_bordered,omitempty"`
	IsStriped  *bool                  `json:"is_striped,omitempty"`

	// collage, slideshow, table, map, animation, audio, photo, video, voice_note
	Caption *RichBlockCaption `json:"caption,omitempty"`

	// map
	Location *Location `json:"location,omitempty"`
	Zoom     *int      `json:"zoom,omitempty"` // 13-20
	Width    *int      `json:"width,omitempty"`
	Height   *int      `json:"height,omitempty"`

	// animation
	Animation *Animation `json:"animation,omitempty"`

	// audio
	Audio *Audio `json:"audio,omitempty"`

	// photo
	Photo []PhotoSize `json:"photo,omitempty"`

	// video
	Video *Video `json:"video,omitempty"`

	// voice_note
	VoiceNote *Voice `json:"voice_note,omitempty"`

	// animation, photo, video
	HasSpoiler *bool `json:"has_spoiler,omitempty"`
}

RichBlock is a block in a rich formatted message.

It is a flat union of all block variants, discriminated by `Type`. Only the fields relevant to a given `Type` are populated; see the per-type field notes below and https://core.telegram.org/bots/api#richblock

type == "paragraph", "heading", "pre", "footer", "divider", "mathematical_expression", "anchor", "list", "blockquote", "pullquote", "collage", "slideshow", "table", "details", "map", "animation", "audio", "photo", "video", "voice_note", or "thinking"

NOTE: When the API adds a new block variant, add its `type` to the list above and add any new fields to this flat struct (grouped by `type` in the field comments below).

type RichBlockCaption added in v0.13.5

type RichBlockCaption struct {
	Text   RichText `json:"text"`
	Credit RichText `json:"credit"`
}

RichBlockCaption is a struct for a caption of a rich formatted block.

When received as a part of RichBlockTable, the caption may be a bare RichText rather than an object; in that case it is decoded into `Text`.

https://core.telegram.org/bots/api#richblockcaption

func (*RichBlockCaption) UnmarshalJSON added in v0.13.7

func (c *RichBlockCaption) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes a RichBlockCaption from either its object form ({"text":..., "credit":...}) or a bare RichText (string/array/typed object).

type RichBlockListItem added in v0.13.5

type RichBlockListItem struct {
	Label       string      `json:"label"`
	Blocks      []RichBlock `json:"blocks"`
	HasCheckbox *bool       `json:"has_checkbox,omitempty"`
	IsChecked   *bool       `json:"is_checked,omitempty"`
	Value       *int        `json:"value,omitempty"`
	Type        *string     `json:"type,omitempty"` // must be one of 'a', 'A', 'i', 'I', or '1'
}

RichBlockListItem is a struct for an item of a list.

https://core.telegram.org/bots/api#richblocklistitem

type RichBlockTableCell added in v0.13.5

type RichBlockTableCell struct {
	Text     RichText `json:"text,omitzero"`
	IsHeader *bool    `json:"is_header,omitempty"`
	Colspan  *int     `json:"colspan,omitempty"`
	Rowspan  *int     `json:"rowspan,omitempty"`
	Align    string   `json:"align"`  // must be one of 'left', 'center', or 'right'
	Valign   string   `json:"valign"` // must be one of 'top', 'middle', or 'bottom'
}

RichBlockTableCell is a struct for a cell in a table.

https://core.telegram.org/bots/api#richblocktablecell

type RichMessage added in v0.13.5

type RichMessage struct {
	Blocks []RichBlock `json:"blocks"` // an array of RichBlocks
	IsRTL  *bool       `json:"is_rtl,omitempty"`
}

RichMessage is a struct for a rich formatted message.

https://core.telegram.org/bots/api#richmessage

type RichText added in v0.13.5

type RichText struct {
	Value any
}

RichText is a base type for a rich formatted text.

It can be a plain string, an array of RichTexts, or a single typed RichText object (eg. RichTextBold) discriminated by its `type` field. After unmarshalling, the concrete value is held in `Value` and can be type-switched: string, []RichText, *RichTextBold, *RichTextURL, ... (an unknown `type` falls back to map[string]any).

NOTE: Can be generated with NewRichTextWithXXX() in types_helper.go

NOTE: When adding a new RichText variant (eg. RichTextXXX), also register its `type` string in newRichTextOfType() below; otherwise it will silently fall back to map[string]any on unmarshal instead of erroring.

https://core.telegram.org/bots/api#richtext

func NewRichTextWithRichText added in v0.13.5

func NewRichTextWithRichText(richText RichText) RichText

NewRichTextWithRichText returns a single RichText as a RichText.

func NewRichTextWithRichTexts added in v0.13.5

func NewRichTextWithRichTexts(richTexts ...RichText) RichText

NewRichTextWithRichTexts returns an array of RichText as a RichText.

func NewRichTextWithText added in v0.13.5

func NewRichTextWithText(text string) RichText

NewRichTextWithText returns a plain-text as a RichText.

func (RichText) MarshalJSON added in v0.13.7

func (t RichText) MarshalJSON() ([]byte, error)

MarshalJSON encodes a RichText as its underlying value.

func (*RichText) UnmarshalJSON added in v0.13.7

func (t *RichText) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes a RichText from its plain-string, array, or typed-object form.

type RichTextAnchor added in v0.13.5

type RichTextAnchor struct {
	Type string `json:"type"` // type == "anchor"
	Name string `json:"name"`
}

RichTextAnchor is a struct for an anchor.

https://core.telegram.org/bots/api#richtextanchor

type RichTextAnchorLink struct {
	Type       string   `json:"type"` // type == "anchor_link"
	Text       RichText `json:"text"`
	AnchorName string   `json:"anchor_name"`
}

RichTextAnchorLink is a struct for a link to an anchor.

https://core.telegram.org/bots/api#richtextanchorlink

type RichTextBankCardNumber added in v0.13.5

type RichTextBankCardNumber struct {
	Type           string   `json:"type"` // type == "bank_card_number"
	Text           RichText `json:"text"`
	BankCardNumber string   `json:"bank_card_number"`
}

RichTextBankCardNumber is a struct for a text with a bank card number.

https://core.telegram.org/bots/api#richtextbankcardnumber

type RichTextBold added in v0.13.5

type RichTextBold struct {
	Type string   `json:"type"` // type == "bold"
	Text RichText `json:"text"`
}

RichTextBold is a struct for a bold text.

https://core.telegram.org/bots/api#richtextbold

type RichTextBotCommand added in v0.13.5

type RichTextBotCommand struct {
	Type       string   `json:"type"` // type == "bot_command"
	Text       RichText `json:"text"`
	BotCommand string   `json:"bot_command"`
}

RichTextBotCommand is a struct for a bot command.

https://core.telegram.org/bots/api#richtextbotcommand

type RichTextCashtag added in v0.13.5

type RichTextCashtag struct {
	Type    string   `json:"type"` // type == "cashtag"
	Text    RichText `json:"text"`
	Cashtag string   `json:"cashtag"`
}

RichTextCashtag is a struct for a cashtag.

https://core.telegram.org/bots/api#richtextcashtag

type RichTextCode added in v0.13.5

type RichTextCode struct {
	Type string   `json:"type"` // type == "code"
	Text RichText `json:"text"`
}

RichTextCode is a struct for a monowidth text.

https://core.telegram.org/bots/api#richtextcode

type RichTextCustomEmoji added in v0.13.5

type RichTextCustomEmoji struct {
	Type            string `json:"type"` // type == "custom_emoji"
	CustomEmojiID   string `json:"custom_emoji_id"`
	AlternativeText string `json:"alternative_text"`
}

RichTextCustomEmoji is a struct for a custom emoji.

https://core.telegram.org/bots/api#richtextcustomemoji

type RichTextDateTime added in v0.13.5

type RichTextDateTime struct {
	Type           string   `json:"type"` // type == "date_time"
	Text           RichText `json:"text"`
	UnixTime       int      `json:"unix_time"`
	DateTimeFormat string   `json:"date_time_format"`
}

RichTextDateTime is a struct for formatted date and time.

https://core.telegram.org/bots/api#richtextdatetime

type RichTextEmailAddress added in v0.13.5

type RichTextEmailAddress struct {
	Type         string   `json:"type"` // type == "email_address"
	Text         RichText `json:"text"`
	EmailAddress string   `json:"email_address"`
}

RichTextEmailAddress is a struct for a text with an email address.

https://core.telegram.org/bots/api#richtextemailaddress

type RichTextHashtag added in v0.13.5

type RichTextHashtag struct {
	Type    string   `json:"type"` // type == "hashtag"
	Text    RichText `json:"text"`
	Hashtag string   `json:"hashtag"`
}

RichTextHashtag is a struct for a hashtag.

https://core.telegram.org/bots/api#richtexthashtag

type RichTextItalic added in v0.13.5

type RichTextItalic struct {
	Type string   `json:"type"` // type == "italic"
	Text RichText `json:"text"`
}

RichTextItalic is a struct for an italicized text.

https://core.telegram.org/bots/api#richtextitalic

type RichTextMarked added in v0.13.5

type RichTextMarked struct {
	Type string   `json:"type"` // type == "marked"
	Text RichText `json:"text"`
}

RichTextMarked is a struct for a marked text.

https://core.telegram.org/bots/api#richtextmarked

type RichTextMathematicalExpression added in v0.13.5

type RichTextMathematicalExpression struct {
	Type       string `json:"type"` // type == "mathematical_expression"
	Expression string `json:"expression"`
}

RichTextMathematicalExpression is a struct for a mathematical expression.

https://core.telegram.org/bots/api#richtextmathematicalexpression

type RichTextMention added in v0.13.5

type RichTextMention struct {
	Type     string   `json:"type"` // type == "mention"
	Text     RichText `json:"text"`
	Username string   `json:"username"`
}

RichTextMention is a struct for a mention by a username.

https://core.telegram.org/bots/api#richtextmention

type RichTextPhoneNumber added in v0.13.5

type RichTextPhoneNumber struct {
	Type        string   `json:"type"` // type == "phone_number"
	Text        RichText `json:"text"`
	PhoneNumber string   `json:"phone_number"`
}

RichTextPhoneNumber is a struct for a text with a phone number.

https://core.telegram.org/bots/api#richtextphonenumber

type RichTextReference added in v0.13.5

type RichTextReference struct {
	Type string   `json:"type"` // type == "reference"
	Text RichText `json:"text"`
	Name string   `json:"name"`
}

RichTextReference is a struct for a reference.

https://core.telegram.org/bots/api#richtextreference

type RichTextReferenceLink struct {
	Type          string   `json:"type"` // type == "reference_link"
	Text          RichText `json:"text"`
	ReferenceName string   `json:"reference_name"`
}

RichTextReferenceLink is a struct for a link to a reference.

https://core.telegram.org/bots/api#richtextreferencelink

type RichTextSpoiler added in v0.13.5

type RichTextSpoiler struct {
	Type string   `json:"type"` // type == "spoiler"
	Text RichText `json:"text"`
}

RichTextSpoiler is a struct for a text covered by a spoiler.

https://core.telegram.org/bots/api#richtextspoiler

type RichTextStrikethrough added in v0.13.5

type RichTextStrikethrough struct {
	Type string   `json:"type"` // type == "strikethrough"
	Text RichText `json:"text"`
}

RichTextStrikethrough is a struct for a strikethrough text.

https://core.telegram.org/bots/api#richtextstrikethrough

type RichTextSubscript added in v0.13.5

type RichTextSubscript struct {
	Type string   `json:"type"` // type == "subscript"
	Text RichText `json:"text"`
}

RichTextSubscript is a struct for a subscript text.

https://core.telegram.org/bots/api#richtextsubscript

type RichTextSuperscript added in v0.13.5

type RichTextSuperscript struct {
	Type string   `json:"type"` // type == "superscript"
	Text RichText `json:"text"`
}

RichTextSuperscript is a struct for a superscript text.

https://core.telegram.org/bots/api#richtextsuperscript

type RichTextTextMention added in v0.13.5

type RichTextTextMention struct {
	Type string   `json:"type"` // type == "text_mention"
	Text RichText `json:"text"`
	User User     `json:"user"`
}

RichTextTextMention is a struct for a mention of a Telegram users by their identifier.

https://core.telegram.org/bots/api#richtexttextmention

type RichTextURL added in v0.13.5

type RichTextURL struct {
	Type string   `json:"type"` // type == "url"
	Text RichText `json:"text"`
	URL  string   `json:"url"`
}

RichTextURL is a struct for a text with a link.

https://core.telegram.org/bots/api#richtexturl

type RichTextUnderline added in v0.13.5

type RichTextUnderline struct {
	Type string   `json:"type"` // type == "underline"
	Text RichText `json:"text"`
}

RichTextUnderline is a struct for an underlined text.

https://core.telegram.org/bots/api#richtextunderline

type SentGuestMessage added in v0.13.4

type SentGuestMessage struct {
	InlineMessageID string `json:"inline_message_id"`
}

SentGuestMessage is a struct for an inline message sent by a guest bot.

https://core.telegram.org/bots/api#sentguestmessage

type SentWebAppMessage

type SentWebAppMessage struct {
	InlineMessageID *string `json:"inline_message_id,omitempty"`
}

SentWebAppMessage is a struct for an inline message sent by web app

https://core.telegram.org/bots/api#sentwebappmessage

type SharedUser added in v0.10.6

type SharedUser struct {
	UserID    int64       `json:"user_id"`
	FirstName *string     `json:"first_name,omitempty"`
	LastName  *string     `json:"last_name,omitempty"`
	Username  *string     `json:"username,omitempty"`
	Photo     []PhotoSize `json:"photo,omitempty"`
}

SharedUser is a struct for a user which was shared with the bot using KeyboardButtonRequestUser button.

https://core.telegram.org/bots/api#shareduser

type ShippingAddress

type ShippingAddress struct {
	CountryCode string `json:"country_code"`
	State       string `json:"state"`
	City        string `json:"city"`
	StreetLine1 string `json:"street_line1"`
	StreetLine2 string `json:"street_line2"`
	PostCode    string `json:"post_code"`
}

ShippingAddress is a struct of shipping address

https://core.telegram.org/bots/api#shippingaddress

type ShippingOption

type ShippingOption struct {
	ID     string         `json:"id"`
	Title  string         `json:"title"`
	Prices []LabeledPrice `json:"prices"`
}

ShippingOption is a struct of an option of the shipping

https://core.telegram.org/bots/api#shippingoption

type ShippingQuery

type ShippingQuery struct {
	ID              string          `json:"id"`
	From            User            `json:"from"`
	InvoicePayload  string          `json:"invoice_payload"`
	ShippingAddress ShippingAddress `json:"shipping_address"`
}

ShippingQuery is a struct for a shipping query

https://core.telegram.org/bots/api#shippingquery

type StarAmount added in v0.11.17

type StarAmount struct {
	Amount         int  `json:"amount"`
	NanostarAmount *int `json:"nanostar_amount,omitempty"`
}

StarAmount describes an amount of Telegram Stars.

https://core.telegram.org/bots/api#staramount

type StarTransaction added in v0.11.2

type StarTransaction struct {
	ID             string              `json:"id"`
	Amount         int                 `json:"amount"`
	NanostarAmount *int                `json:"nanostar_amount,omitempty"`
	Date           int                 `json:"date"`
	Source         *TransactionPartner `json:"source,omitempty"`   // only for incoming transactions
	Receiver       *TransactionPartner `json:"receiver,omitempty"` // only for outgoing transactions
}

StarTransaction is a struct for a star transaction

https://core.telegram.org/bots/api#startransaction

type StarTransactions added in v0.11.2

type StarTransactions struct {
	Transactions []StarTransaction `json:"transactions"`
}

StarTransactions is a struct for star transactions

https://core.telegram.org/bots/api#startransactions

type Sticker

type Sticker struct {
	FileID           string        `json:"file_id"`
	FileUniqueID     string        `json:"file_unique_id"`
	Type             StickerType   `json:"type"`
	Width            int           `json:"width"`
	Height           int           `json:"height"`
	IsAnimated       bool          `json:"is_animated"`
	IsVideo          bool          `json:"is_video"`
	Thumbnail        *PhotoSize    `json:"thumbnail,omitempty"`
	Emoji            *string       `json:"emoji,omitempty"`
	SetName          *string       `json:"set_name,omitempty"`
	PremiumAnimation *File         `json:"premium_animation,omitempty"`
	MaskPosition     *MaskPosition `json:"mask_position,omitempty"`
	CustomEmojiID    *string       `json:"custom_emoji_id,omitempty"`
	NeedsRepainting  *bool         `json:"needs_repainting,omitempty"`
	FileSize         *int          `json:"file_size,omitempty"`
}

Sticker is a struct of a sticker

https://core.telegram.org/bots/api#sticker

type StickerFormat

type StickerFormat string

StickerFormat is a format of sticker

const (
	StickerFormatStatic   StickerFormat = "static"
	StickerFormatAnimated StickerFormat = "animated"
	StickerFormatVideo    StickerFormat = "video"
)

StickerFormat strings

type StickerSet

type StickerSet struct {
	Name        string      `json:"name"`
	Title       string      `json:"title"`
	StickerType StickerType `json:"sticker_type"`
	Stickers    []Sticker   `json:"stickers"`
	Thumbnail   *PhotoSize  `json:"thumbnail,omitempty"`
}

StickerSet is a struct of a sticker set

https://core.telegram.org/bots/api#stickerset

type StickerType

type StickerType string

StickerType is a type of sticker

const (
	StickerTypeRegular     StickerType = "regular"
	StickerTypeMask        StickerType = "mask"
	StickerTypeCustomEmoji StickerType = "custom_emoji"
)

StickerType strings

type Story

type Story struct {
	Chat Chat  `json:"chat"`
	ID   int64 `json:"id"`
}

Story is a struct for a forwarded story of a message

https://core.telegram.org/bots/api#story

type StoryArea added in v0.11.17

type StoryArea struct {
	Position StoryAreaPosition `json:"position"`
	Type     StoryAreaType     `json:"type"`
}

StoryArea describes a clickable area on a story media.

https://core.telegram.org/bots/api#storyarea

type StoryAreaPosition added in v0.11.17

type StoryAreaPosition struct {
	XPercentage            float32 `json:"x_percentage"`
	YPercentage            float32 `json:"y_percentage"`
	WidthPercentage        float32 `json:"width_percentage"`
	HeightPercentage       float32 `json:"height_percentage"`
	RotationAngle          float32 `json:"rotation_angle"`
	CornerRadiusPercentage float32 `json:"corner_radius_percentage"`
}

StoryAreaPosition describes the position of a clickable area within a story.

https://core.telegram.org/bots/api#storyareaposition

type StoryAreaType added in v0.11.17

type StoryAreaType struct {
	Type StoryAreaTypeType `json:"type"`

	// Type == TypeStoryAreaLocation
	// https://core.telegram.org/bots/api#storyareatypelocation
	Latitude  *float32         `json:"latitude,omitempty"`
	Longitude *float32         `json:"longitude,omitempty"`
	Address   *LocationAddress `json:"address,omitempty"`

	// Type == TypeStoryAreaSuggestedReaction
	// https://core.telegram.org/bots/api#storyareatypesuggestedreaction
	ReactionType *ReactionType `json:"reaction_type,omitempty"`
	IsDark       *bool         `json:"is_dark,omitempty"`
	IsFlipped    *bool         `json:"is_flipped,omitempty"`

	// Type == TypeStoryAreaLink
	// https://core.telegram.org/bots/api#storyareatypelink
	URL *string `json:"url,omitempty"`

	// Type == TypeStoryAreaWeather
	// https://core.telegram.org/bots/api#storyareatypeweather
	Temperature     *float32 `json:"temperature,omitempty"`
	Emoji           *string  `json:"emoji,omitempty"`
	BackgroundColor *int     `json:"background_color,omitempty"`

	// Type == TypeStoryAreaUniqueGift
	// https://core.telegram.org/bots/api#storyareatypeuniquegift
	Name *string `json:"name,omitempty"`
}

StoryAreaType describes the type of a clickable area on a story.

https://core.telegram.org/bots/api#storyareatype

type StoryAreaTypeType added in v0.11.17

type StoryAreaTypeType string

StoryAreaTypeType is a type of StoryAreaType

const (
	StoryAreaTypeLocation          StoryAreaTypeType = "location"
	StoryAreaTypeSuggestedReaction StoryAreaTypeType = "suggested_reaction"
	StoryAreaTypeLink              StoryAreaTypeType = "link"
	StoryAreaTypeWeather           StoryAreaTypeType = "weather"
	StoryAreaTypeUniqueGift        StoryAreaTypeType = "unique_gift"
)

type SuccessfulPayment

type SuccessfulPayment struct {
	Currency                   string     `json:"currency"`
	TotalAmount                int        `json:"total_amount"`
	InvoicePayload             string     `json:"invoice_payload"`
	SubscriptionExpirationDate *int       `json:"subscription_expiration_date,omitempty"`
	IsRecurring                *bool      `json:"is_recurring,omitempty"`
	IsFirstRecurring           *bool      `json:"is_first_recurring,omitempty"`
	ShippingOptionID           *string    `json:"shipping_option_id,omitempty"`
	OrderInfo                  *OrderInfo `json:"order_info,omitempty"`
	TelegramPaymentChargeID    string     `json:"telegram_payment_charge_id"`
	ProviderPaymentChargeID    string     `json:"provider_payment_charge_id"`
}

SuccessfulPayment is a struct of successful payments

https://core.telegram.org/bots/api#successfulpayment

type SuggestedPostApprovalFailed added in v0.11.19

type SuggestedPostApprovalFailed struct {
	SuggestedPostMessage *Message           `json:"suggested_post_message,omitempty"`
	Price                SuggestedPostPrice `json:"price"`
}

SuggestedPostApprovalFailed is a struct for a service message about the failed approval of a suggested post.

https://core.telegram.org/bots/api#suggestedpostapprovalfailed

type SuggestedPostApproved added in v0.11.19

type SuggestedPostApproved struct {
	SuggestedPostMessage *Message            `json:"suggested_post_message,omitempty"`
	Price                *SuggestedPostPrice `json:"price,omitempty"`
	SendDate             int                 `json:"send_date"`
}

SuggestedPostApproved is a struct for a service message about the approval of a suggested post.

https://core.telegram.org/bots/api#suggestedpostapproved

type SuggestedPostDeclined added in v0.11.19

type SuggestedPostDeclined struct {
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	Comment              *string  `json:"comment,omitempty"`
}

SuggestedPostDeclined is a struct for a service message about the rejection of a suggested post.

https://core.telegram.org/bots/api#suggestedpostdeclined

type SuggestedPostInfo added in v0.11.19

type SuggestedPostInfo struct {
	State    SuggestedPostStateType `json:"state"`
	Price    *SuggestedPostPrice    `json:"price,omitempty"`
	SendDate *int                   `json:"send_date,omitempty"`
}

SuggestedPostInfo is a struct for suggested post info

https://core.telegram.org/bots/api#suggestedpostinfo

type SuggestedPostPaid added in v0.11.19

type SuggestedPostPaid struct {
	SuggestedPostMessage *Message    `json:"suggested_post_message,omitempty"`
	Currency             string      `jso:"currency"`
	Amount               int         `json:"amount,omitempty"`
	StarAmount           *StarAmount `json:"star_amount,omitempty"`
}

SuggestedPostPaid is a struct for a service message about a successful payment for a suggested post.

https://core.telegram.org/bots/api#suggestedpostpaid

type SuggestedPostParameters added in v0.11.19

type SuggestedPostParameters struct {
	Price    *SuggestedPostPrice `json:"price,omitempty"`
	SendDate *int                `json:"send_date,omitempty"`
}

SuggestedPostParameters is a struct for suggested post parameters

https://core.telegram.org/bots/api#suggestedpostparameters

type SuggestedPostPrice added in v0.11.19

type SuggestedPostPrice struct {
	Currency string `json:"currency"`
	Amount   int64  `json:"amount"`
}

SuggestedPostPrice is a struct for suggested post price

https://core.telegram.org/bots/api#suggestedpostprice

type SuggestedPostRefunded added in v0.11.19

type SuggestedPostRefunded struct {
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	Reason               string   `json:"reason"`
}

SuggestedPostRefunded is a struct for a service message about a payment refund for a suggested post.

https://core.telegram.org/bots/api#suggestedpostrefunded

type SuggestedPostStateType added in v0.11.19

type SuggestedPostStateType string

SuggestedPostStateType is a type of suggested post info's state

const (
	SuggestedPostStatePending  SuggestedPostStateType = "pending"
	SuggestedPostStateApproved SuggestedPostStateType = "approved"
	SuggestedPostStateDeclined SuggestedPostStateType = "declined"
)

type SwitchInlineQueryChosenChat

type SwitchInlineQueryChosenChat struct {
	Query             *string `json:"query,omitempty"`
	AllowUserChats    *bool   `json:"allow_user_chats,omitempty"`
	AllowBotChats     *bool   `json:"allow_bot_chats,omitempty"`
	AllowGroupChats   *bool   `json:"allow_group_chats,omitempty"`
	AllowChannelChats *bool   `json:"allow_channel_chats,omitempty"`
}

SwitchInlineQueryChosenChat is a struct for SwitchInlineQueryChosenChat

NOTE: Can be generated with NewSwitchInlineQueryChosenChat() function in types_helper.go

https://core.telegram.org/bots/api#switchinlinequerychosenchat

func NewSwitchInlineQueryChosenChat added in v0.10.7

func NewSwitchInlineQueryChosenChat() SwitchInlineQueryChosenChat

NewSwitchInlineQueryChosenChat returns a new SwitchInlineQueryChosenChat.

func (SwitchInlineQueryChosenChat) SetAllowBotChats added in v0.10.7

SetAllowBotChats sets the `allow_bot_chats` value of SwitchInlineQueryChosenChat.

func (SwitchInlineQueryChosenChat) SetAllowChannelChats added in v0.10.7

func (c SwitchInlineQueryChosenChat) SetAllowChannelChats(allow bool) SwitchInlineQueryChosenChat

SetAllowChannelChats sets the `allow_channel_chats` value of SwitchInlineQueryChosenChat.

func (SwitchInlineQueryChosenChat) SetAllowGroupChats added in v0.10.7

func (c SwitchInlineQueryChosenChat) SetAllowGroupChats(allow bool) SwitchInlineQueryChosenChat

SetAllowGroupChats sets the `allow_group_chats` value of SwitchInlineQueryChosenChat.

func (SwitchInlineQueryChosenChat) SetAllowUserChats added in v0.10.7

SetAllowUserChats sets the `allow_user_chats` value of SwitchInlineQueryChosenChat.

func (SwitchInlineQueryChosenChat) SetQuery added in v0.10.7

SetQuery sets the `query` value of SwitchInlineQueryChosenChat.

type TextQuote

type TextQuote struct {
	Text     string          `json:"text"`
	Entities []MessageEntity `json:"entities,omitempty"`
	Position int             `json:"position"`
	IsManual *bool           `json:"is_manual,omitempty"`
}

TextQuote is a struct of a text quote

https://core.telegram.org/bots/api#textquote

type ThumbnailMimeType

type ThumbnailMimeType string

ThumbnailMimeType is a type of inline query result's thumbnail mime type

const (
	ThumbnailMimeTypeImageJpeg ThumbnailMimeType = "image/jpeg"
	ThumbnailMimeTypeImageGif  ThumbnailMimeType = "image/gif"
	ThumbnailMimeTypeVideoMp4  ThumbnailMimeType = "video/mp4"
)

ThumbnailMimeType strings

type TransactionPartner added in v0.11.2

type TransactionPartner struct {
	Type TransactionPartnerType `json:"type"`

	// when Type == TransactionPartnerUser
	TransactionType             *TransactionPartnerUserTransactionType `json:"transaction_type,omitempty"`
	User                        *User                                  `json:"user,omitempty"`
	Affiliate                   *AffiliateInfo                         `json:"affiliate,omitempty"`
	InvoicePayload              *string                                `json:"invoice_payload,omitempty"`
	SubscriptionPeriod          *int                                   `json:"subscription_period,omitempty"`
	PaidMedia                   []PaidMedia                            `json:"paid_media,omitempty"`
	PaidMediaPayload            *string                                `json:"paid_media_payload,omitempty"`
	PremiumSubscriptionDuration *int                                   `json:"premium_subscription_duration,omitempty"`

	// when Type == TransactionPartnerChat
	Chat *Chat `json:"chat,omitempty"`

	// when Type == TransactionPartnerUser, or Type == TransactionPartnerChat
	Gift *string `json:"gift,omitempty"`

	// when Type == TransactionPartnerAffiliateProgram
	SponsorUser       *User `json:"sponsor_user,omitempty"`
	CommissionPerMile *int  `json:"commission_per_mille,omitempty"`

	// when Type == TransactionPartnerFragment
	WithdrawlState *RevenueWithdrawalState `json:"withdrawal_state,omitempty"`

	// when Type == TransactionParterTelegramAPI
	RequestCount *int `json:"request_count,omitempty"`
}

TransactionPartner is a struct for a transaction partner

https://core.telegram.org/bots/api#transactionpartner

type TransactionPartnerType added in v0.11.2

type TransactionPartnerType string

TransactionPartnerType is a type of transaction partner

https://core.telegram.org/bots/api#transactionpartner

const (
	TransactionPartnerUser             TransactionPartnerType = "user"
	TransactionPartnerChat             TransactionPartnerType = "chat"
	TransactionPartnerAffiliateProgram TransactionPartnerType = "affiliate_program"
	TransactionPartnerFragment         TransactionPartnerType = "fragment"
	TransactionPartnerTelegramAds      TransactionPartnerType = "telegram_ads"
	TransactionPartnerTelegramAPI      TransactionPartnerType = "telegram_api"
	TransactionPartnerOther            TransactionPartnerType = "other"
)

type TransactionPartnerUserTransactionType added in v0.11.17

type TransactionPartnerUserTransactionType string

TransactionPartnerUserTransactionType is a transaction type of TransactionPartnerUser

https://core.telegram.org/bots/api#transactionpartneruser

const (
	TransactionPartnerUserTransactionInvoicePayment          TransactionPartnerUserTransactionType = "invoice_payment"
	TransactionPartnerUserTransactionPaidMediaPayment        TransactionPartnerUserTransactionType = "paid_media_payment"
	TransactionPartnerUserTransactionGiftPurchase            TransactionPartnerUserTransactionType = "gift_purchase"
	TransactionPartnerUserTransactionPremiumPurchase         TransactionPartnerUserTransactionType = "premium_purchase"
	TransactionPartnerUserTransactionBusinessAccountTransfer TransactionPartnerUserTransactionType = "business_account_transfer"
)

type UniqueGift added in v0.11.17

type UniqueGift struct {
	GiftID           string             `json:"gift_id"`
	BaseName         string             `json:"base_name"`
	Name             string             `json:"name"`
	Number           int                `json:"number"`
	Model            UniqueGiftModel    `json:"model"`
	Symbol           UniqueGiftSymbol   `json:"symbol"`
	Backdrop         UniqueGiftBackdrop `json:"backdrop"`
	IsPremium        *bool              `json:"is_premium,omitempty"`
	IsBurned         *bool              `json:"is_burned,omitempty"`
	IsFromBlockchain *bool              `json:"is_from_blockchain,omitempty"`
	Colors           *UniqueGiftColors  `json:"colors,omitempty"`
	PublisherChat    *Chat              `json:"publisher_chat,omitempty"`
}

UniqueGift describes a unique gift that was upgraded from a regular gift.

https://core.telegram.org/bots/api#uniquegift

type UniqueGiftBackdrop added in v0.11.17

type UniqueGiftBackdrop struct {
	Name           string                   `json:"name"`
	Colors         UniqueGiftBackdropColors `json:"colors"`
	RarityPerMille int                      `json:"rarity_per_mille"`
}

UniqueGiftBackdrop describes the backdrop of a unique gift.

https://core.telegram.org/bots/api#uniquegiftbackdrop

type UniqueGiftBackdropColors added in v0.11.17

type UniqueGiftBackdropColors struct {
	CenterColor int `json:"center_color"`
	EdgeColor   int `json:"edge_color"`
	SymbolColor int `json:"symbol_color"`
	TextColor   int `json:"text_color"`
}

UniqueGiftBackdropColors describes the colors of the backdrop of a unique gift.

https://core.telegram.org/bots/api#uniquegiftbackdropcolors

type UniqueGiftColors added in v0.12.1

type UniqueGiftColors struct {
	ModelCustomEmojiID    string `json:"model_custom_emoji_id"`
	SymbolCustomEmojiID   string `json:"symbol_custom_emoji_id"`
	LightThemeMainColor   int    `json:"light_theme_main_color"`
	LightThemeOtherColors []int  `json:"light_theme_other_colors"`
	DarkThemeMainColor    int    `json:"dark_theme_main_color"`
	DarkThemeOtherColors  []int  `json:"dark_theme_other_colors"`
}

UniqueGiftColors contains information about the color scheme for a user's name, message replies and link previews based on a unique gift.

https://core.telegram.org/bots/api#uniquegiftcolors

type UniqueGiftInfo added in v0.11.17

type UniqueGiftInfo struct {
	Gift               UniqueGift           `json:"gift"`
	Origin             UniqueGiftInfoOrigin `json:"origin"`
	LastResaleCurrency *string              `json:"last_resale_currency,omitempty"`
	LastResaleAmount   *int                 `json:"last_resale_amount,omitempty"`
	OwnedGiftID        *string              `json:"owned_gift_id,omitempty"`
	TransferStarCount  *int                 `json:"transfer_star_count,omitempty"`
	NextTransferDate   *int                 `json:"next_transfer_date,omitempty"`
}

UniqueGiftInfo describes a service message about a unique gift that was sent or received.

https://core.telegram.org/bots/api#uniquegiftinfo

type UniqueGiftInfoOrigin added in v0.11.18

type UniqueGiftInfoOrigin string

UniqueGiftInfoOrigin is the origin of a unique gift info.

const (
	UniqueGiftInfoOriginUpgrade       UniqueGiftInfoOrigin = "upgrade"
	UniqueGiftInfoOriginTransfer      UniqueGiftInfoOrigin = "transfer"
	UniqueGiftInfoOriginResale        UniqueGiftInfoOrigin = "resale"
	UniqueGiftInfoOriginGiftedUpgrade UniqueGiftInfoOrigin = "gifted_upgrade"
	UniqueGiftInfoOriginOffer         UniqueGiftInfoOrigin = "offer"
)

UniqueGiftInfoOrigin constants

type UniqueGiftModel added in v0.11.17

type UniqueGiftModel struct {
	Name           string  `json:"name"`
	Sticker        Sticker `json:"sticker"`
	RarityPerMille int     `json:"rarity_per_mille"`
	Rarity         *Rarity `json:"rarity,omitempty"`
}

UniqueGiftModel describes the model of a unique gift.

https://core.telegram.org/bots/api#uniquegiftmodel

type UniqueGiftSymbol added in v0.11.17

type UniqueGiftSymbol struct {
	Name           string  `json:"name"`
	Sticker        Sticker `json:"sticker"`
	RarityPerMille int     `json:"rarity_per_mille"`
}

UniqueGiftSymbol describes the symbol shown on the pattern of a unique gift.

https://core.telegram.org/bots/api#uniquegiftsymbol

type Update

type Update struct {
	UpdateID                int64                        `json:"update_id"`
	Message                 *Message                     `json:"message,omitempty"`
	EditedMessage           *Message                     `json:"edited_message,omitempty"`
	ChannelPost             *Message                     `json:"channel_post,omitempty"`
	EditedChannelPost       *Message                     `json:"edited_channel_post,omitempty"`
	BusinessConnection      *BusinessConnection          `json:"business_connection,omitempty"`
	BusinessMessage         *Message                     `json:"business_message,omitempty"`
	EditedBusinessMessage   *Message                     `json:"edited_business_message,omitempty"`
	DeletedBusinessMessages *BusinessMessagesDeleted     `json:"deleted_business_messages,omitempty"`
	GuestMessage            *Message                     `json:"guest_message,omitempty"`
	MessageReaction         *MessageReactionUpdated      `json:"message_reaction,omitempty"`
	MessageReactionCount    *MessageReactionCountUpdated `json:"message_reaction_count,omitempty"`
	InlineQuery             *InlineQuery                 `json:"inline_query,omitempty"`
	ChosenInlineResult      *ChosenInlineResult          `json:"chosen_inline_result,omitempty"`
	CallbackQuery           *CallbackQuery               `json:"callback_query,omitempty"`
	ShippingQuery           *ShippingQuery               `json:"shipping_query,omitempty"`
	PreCheckoutQuery        *PreCheckoutQuery            `json:"pre_checkout_query,omitempty"`
	PurchasedPaidMedia      *PaidMediaPurchased          `json:"purchased_paid_media,omitempty"`
	Poll                    *Poll                        `json:"poll,omitempty"`
	PollAnswer              *PollAnswer                  `json:"poll_answer,omitempty"`
	MyChatMember            *ChatMemberUpdated           `json:"my_chat_member,omitempty"`
	ChatMember              *ChatMemberUpdated           `json:"chat_member,omitempty"`
	ChatJoinRequest         *ChatJoinRequest             `json:"chat_join_request,omitempty"`
	ChatBoost               *ChatBoostUpdated            `json:"chat_boost,omitempty"`
	RemovedChatBoost        *ChatBoostRemoved            `json:"removed_chat_boost,omitempty"`
	ManagedBot              *ManagedBotUpdated           `json:"managed_bot,omitempty"`
}

Update is a struct of an update

https://core.telegram.org/bots/api#update

func (*Update) GetChannelPost

func (u *Update) GetChannelPost() (post *Message, edited bool)

GetChannelPost returns usable channel post property from Update.

func (*Update) GetFrom

func (u *Update) GetFrom() *User

GetFrom returns the `from` value from Update.

NOTE: `Poll` type doesn't have `from` property.

func (*Update) GetMessage

func (u *Update) GetMessage() (message *Message, edited bool)

GetMessage returns usable message property from Update.

func (*Update) HasCallbackQuery

func (u *Update) HasCallbackQuery() bool

HasCallbackQuery checks if Update has CallbackQuery

func (*Update) HasChannelPost

func (u *Update) HasChannelPost() bool

HasChannelPost checks if Update has ChannelPost.

func (*Update) HasChatJoinRequest

func (u *Update) HasChatJoinRequest() bool

HasChatJoinRequest checks if Update has ChatJoinRequest.

func (*Update) HasChatMember

func (u *Update) HasChatMember() bool

HasChatMember checks if Update has ChatMember.

func (*Update) HasChosenInlineResult

func (u *Update) HasChosenInlineResult() bool

HasChosenInlineResult checks if Update has ChosenInlineResult

func (*Update) HasEditedChannelPost

func (u *Update) HasEditedChannelPost() bool

HasEditedChannelPost checks if Update has EditedChannelPost.

func (*Update) HasEditedMessage

func (u *Update) HasEditedMessage() bool

HasEditedMessage checks if Update has EditedMessage.

func (*Update) HasInlineQuery

func (u *Update) HasInlineQuery() bool

HasInlineQuery checks if Update has InlineQuery

func (*Update) HasMediaGroup added in v0.11.0

func (u *Update) HasMediaGroup() (exists bool)

HasMediaGroup checks if Update is a part of a grouped media

func (*Update) HasMessage

func (u *Update) HasMessage() bool

HasMessage checks if Update has Message.

func (*Update) HasMyChatMember

func (u *Update) HasMyChatMember() bool

HasMyChatMember checks if Update has MyChatMember.

func (*Update) HasPoll

func (u *Update) HasPoll() bool

HasPoll checks if Update has Poll

func (*Update) HasPollAnswer

func (u *Update) HasPollAnswer() bool

HasPollAnswer checks if Update has PollAnswer.

func (*Update) HasPreCheckoutQuery

func (u *Update) HasPreCheckoutQuery() bool

HasPreCheckoutQuery checks if Update has PreCheckoutQuery

func (*Update) HasShippingQuery

func (u *Update) HasShippingQuery() bool

HasShippingQuery checks if Update has ShippingQuery

func (*Update) MediaGroupID added in v0.11.0

func (u *Update) MediaGroupID() *string

MediaGroupID returns the media group id (nil if none)

type UpdateType

type UpdateType string

UpdateType is a type of updates (for allowed_updates)

https://core.telegram.org/bots/api#setwebhook https://core.telegram.org/bots/api#update

const (
	UpdateTypeMessage            UpdateType = "message"
	UpdateTypeEditedMessage      UpdateType = "edited_message"
	UpdateTypeChannelPost        UpdateType = "channel_post"
	UpdateTypeEditedChannelPost  UpdateType = "edited_channel_post"
	UpdateTypeInlineQuery        UpdateType = "inline_query"
	UpdateTypeChosenInlineResult UpdateType = "chosen_inline_result"
	UpdateTypeCallbackQuery      UpdateType = "callback_query"
	UpdateTypeShippingQuery      UpdateType = "shipping_query"
	UpdateTypePreCheckoutQuery   UpdateType = "pre_checkout_query"
	UpdateTypePoll               UpdateType = "poll"
)

UpdateType strings

type User

type User struct {
	ID                         int64   `json:"id"`
	IsBot                      bool    `json:"is_bot"`
	FirstName                  string  `json:"first_name"`
	LastName                   *string `json:"last_name,omitempty"`
	Username                   *string `json:"username,omitempty"`
	LanguageCode               *string `json:"language_code,omitempty"` // https://en.wikipedia.org/wiki/IETF_language_tag
	IsPremium                  *bool   `json:"is_premium,omitempty"`
	AddedToAttachmentMenu      *bool   `json:"added_to_attachment_menu,omitempty"`
	CanJoinGroups              *bool   `json:"can_join_groups,omitempty"`               // returned only in GetMe()
	CanReadAllGroupMessages    *bool   `json:"can_read_all_group_messages,omitempty"`   // returned only in GetMe()
	SupportsGuestQueries       *bool   `json:"supports_guest_queries,omitempty"`        // returned only in GetMe()
	SupportsInlineQueries      *bool   `json:"supports_inline_queries,omitempty"`       // returned only in GetMe()
	CanConnectToBusiness       *bool   `json:"can_connect_to_business,omitempty"`       // returned only in GetMe()
	HasMainWebApp              *bool   `json:"has_main_web_app,omitempty"`              // returned only in GetMe()
	HasTopicsEnabled           *bool   `json:"has_topics_enabled,omitempty"`            // returned only in GetMe()
	AllowsUsersToCreateTopics  *bool   `json:"allows_users_to_create_topics,omitempty"` // returned only in GetMe()
	CanManageBots              *bool   `json:"can_manage_bots,omitempty"`               // returned only in GetMe()
	SupportsJoinRequestQueries *bool   `json:"supports_join_request_queries,omitempty"` // returned only in GetMe()
}

User is a struct of a user

https://core.telegram.org/bots/api#user

func (u User) InlineLink() string

InlineLink generates an inline link for User

type UserChatBoosts

type UserChatBoosts struct {
	Boosts []ChatBoost `json:"boosts"`
}

UserChatBoosts is a struct for a user's chat boosts

https://core.telegram.org/bots/api#userchatboosts

type UserProfileAudios added in v0.12.2

type UserProfileAudios struct {
	TotalCount int     `json:"total_count"`
	Audios     []Audio `json:"audios"`
}

UserProfileAudios is a struct for user profile audios

https://core.telegram.org/bots/api#userprofileaudios

type UserProfilePhotos

type UserProfilePhotos struct {
	TotalCount int           `json:"total_count"`
	Photos     [][]PhotoSize `json:"photos"`
}

UserProfilePhotos is a struct for user profile photos

https://core.telegram.org/bots/api#userprofilephotos

type UserRating added in v0.12.1

type UserRating struct {
	Level              int  `json:"level"`
	Rating             int  `json:"rating"`
	CurrentLevelRating int  `json:"current_level_rating"`
	NextLevelRating    *int `json:"next_level_rating,omitempty"`
}

UserRating is a struct which describes the rating of a user based on their Telegram Star spendings.

https://core.telegram.org/bots/api#userrating

type UsersShared

type UsersShared struct {
	RequestID int64        `json:"request_id"`
	Users     []SharedUser `json:"users"`
}

UsersShared is a struct for users who shared the message.

https://core.telegram.org/bots/api#usersshared

type Venue

type Venue struct {
	Location        Location `json:"location"`
	Title           string   `json:"title"`
	Address         string   `json:"address"`
	FoursquareID    *string  `json:"foursquare_id,omitempty"`
	FoursquareType  *string  `json:"foursquare_type,omitempty"`
	GooglePlaceID   *string  `json:"google_place_id,omitempty"`
	GooglePlaceType *string  `json:"google_place_type,omitempty"`
}

Venue is a struct of a venue

https://core.telegram.org/bots/api#venue

type Video

type Video struct {
	FileID         string         `json:"file_id"`
	FileUniqueID   string         `json:"file_unique_id"`
	Width          int            `json:"width"`
	Height         int            `json:"height"`
	Duration       int            `json:"duration"`
	Thumbnail      *PhotoSize     `json:"thumbnail,omitempty"`
	Cover          []PhotoSize    `json:"cover,omitempty"`
	StartTimestamp *int           `json:"start_timestamp,omitempty"`
	Qualities      []VideoQuality `json:"qualities,omitempty"`
	FileName       *string        `json:"file_name,omitempty"`
	MimeType       *string        `json:"mime_type,omitempty"`
	FileSize       *int           `json:"file_size,omitempty"`
}

Video is a struct for a video file

https://core.telegram.org/bots/api#video

type VideoChatEnded

type VideoChatEnded struct {
	Duration int `json:"duration"`
}

VideoChatEnded is a struct for service message: video chat ended

https://core.telegram.org/bots/api#videochatended

type VideoChatParticipantsInvited

type VideoChatParticipantsInvited struct {
	Users []User `json:"users"`
}

VideoChatParticipantsInvited is a struct for service message: new members invited to video chat

https://core.telegram.org/bots/api#videochatparticipantsinvited

type VideoChatScheduled

type VideoChatScheduled struct {
	StartDate int `json:"start_date"`
}

VideoChatScheduled is a struct for servoice message: video chat scheduled

https://core.telegram.org/bots/api#videochatscheduled

type VideoChatStarted

type VideoChatStarted struct{}

VideoChatStarted is a struct for service message: video chat started.

https://core.telegram.org/bots/api#videochatstarted

type VideoMimeType

type VideoMimeType string

VideoMimeType is a video mime type for an inline query

const (
	VideoMimeTypeHTML VideoMimeType = "text/html"
	VideoMimeTypeMp4  VideoMimeType = "video/mp4"
)

VideoMimeType strings

type VideoNote

type VideoNote struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Length       int        `json:"length"`
	Duration     int        `json:"duration"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
	FileSize     *int       `json:"file_size,omitempty"`
}

VideoNote is a struct for a video note

https://core.telegram.org/bots/api#videonote

type VideoQuality added in v0.12.2

type VideoQuality struct {
	FileID       string `json:"file_id"`
	FileUniqueID string `json:"file_unique_id"`
	Width        int    `json:"width"`
	Height       int    `json:"height"`
	Codec        string `json:"codec"` // eg. "h264", "h265", or "av01"
	FileSize     *int64 `json:"file_size,omitempty"`
}

VideoQuality is a struct for a video quality

https://core.telegram.org/bots/api#videoquality

type Voice

type Voice struct {
	FileID       string  `json:"file_id"`
	FileUniqueID string  `json:"file_unique_id"`
	Duration     int     `json:"duration"`
	MimeType     *string `json:"mime_type,omitempty"`
	FileSize     *int    `json:"file_size,omitempty"`
}

Voice is a struct for a voice file

https://core.telegram.org/bots/api#voice

type WebAppData

type WebAppData struct {
	Data       string `json:"data"`
	ButtonText string `json:"button_text"`
}

WebAppData is a struct of a web app data

https://core.telegram.org/bots/api#webappdata

type WebAppInfo

type WebAppInfo struct {
	URL string `json:"url"`
}

WebAppInfo is a struct of web app's information

https://core.telegram.org/bots/api#webappinfo

type WebhookInfo

type WebhookInfo struct {
	URL                          *string      `json:"url"`
	HasCustomCertificate         bool         `json:"has_custom_certificate"`
	PendingUpdateCount           int          `json:"pending_update_count"`
	IPAddress                    *string      `json:"ip_address,omitempty"`
	LastErrorDate                *int         `json:"last_error_date,omitempty"`
	LastErrorMessage             *string      `json:"last_error_message,omitempty"`
	LastSynchronizationErrorDate *int         `json:"last_synchronization_error_date,omitempty"`
	MaxConnections               *int         `json:"max_connections,omitempty"`
	AllowedUpdates               []UpdateType `json:"allowed_updates,omitempty"`
}

WebhookInfo is a struct of webhook info

https://core.telegram.org/bots/api#webhookinfo

type WriteAccessAllowed

type WriteAccessAllowed struct {
	FromRequest        *bool   `json:"from_request,omitempty"`
	WebAppName         *string `json:"web_app_name,omitempty"`
	FromAttachmentMenu *bool   `json:"from_attachment_menu,omitempty"`
}

WriteAccessAllowed is a struct for an allowed write access in the chat.

https://core.telegram.org/bots/api#writeaccessallowed

Directories

Path Synopsis
samples
commands command
polling command
webhook command
wasm module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL