telegrambot

package module
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 17 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)

Todos

  • 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 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"
	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"
	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 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
	// 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(userID int64, name string, sticker InputSticker, options OptionsAddStickerToSet) (result APIResponse[bool])

AddStickerToSet adds a sticker to set.

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

func (*Bot) AnswerCallbackQuery

func (b *Bot) AnswerCallbackQuery(callbackQueryID string, options OptionsAnswerCallbackQuery) (result APIResponse[bool])

AnswerCallbackQuery answers a callback query.

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

func (*Bot) AnswerInlineQuery

func (b *Bot) AnswerInlineQuery(inlineQueryID string, results []any, options OptionsAnswerInlineQuery) (result APIResponse[bool])

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(preCheckoutQueryID string, ok bool, errorMessage *string) (result APIResponse[bool])

AnswerPreCheckoutQuery answers a pre-checkout query.

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

func (*Bot) AnswerShippingQuery

func (b *Bot) AnswerShippingQuery(shippingQueryID string, ok bool, shippingOptions []ShippingOption, errorMessage *string) (result APIResponse[bool])

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(webAppQueryID string, res InlineQueryResult) (result APIResponse[SentWebAppMessage])

AnswerWebAppQuery answers a web app's query

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

func (*Bot) ApproveChatJoinRequest

func (b *Bot) ApproveChatJoinRequest(chatID ChatID, userID int64) (result APIResponse[bool])

ApproveChatJoinRequest approves chat join request.

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

func (*Bot) BanChatMember

func (b *Bot) BanChatMember(chatID ChatID, userID int64, options OptionsBanChatMember) (result APIResponse[bool])

BanChatMember bans a chat member.

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

func (*Bot) BanChatSenderChat

func (b *Bot) BanChatSenderChat(chatID ChatID, senderChatID int64) (result APIResponse[bool])

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() (result APIResponse[bool])

Close closes this bot from local Bot API server.

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

func (*Bot) CloseForumTopic

func (b *Bot) CloseForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])

CloseForumTopic closes a forum topic.

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

func (*Bot) CloseGeneralForumTopic

func (b *Bot) CloseGeneralForumTopic(chatID ChatID) (result APIResponse[bool])

CloseGeneralForumTopic closes general forum topic.

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

func (*Bot) CopyMessage

func (b *Bot) CopyMessage(chatID, fromChatID ChatID, messageID int64, options OptionsCopyMessage) (result APIResponse[MessageID])

CopyMessage copies a message.

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

func (*Bot) CopyMessages

func (b *Bot) CopyMessages(chatID, fromChatID ChatID, messageIDs []int64, options OptionsCopyMessages) (result APIResponse[[]MessageID])

CopyMessages copies messages.

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

func (b *Bot) CreateChatInviteLink(chatID ChatID, options OptionsCreateChatInviteLink) (result APIResponse[ChatInviteLink])

CreateChatInviteLink creates a chat invite link.

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

func (*Bot) CreateForumTopic

func (b *Bot) CreateForumTopic(chatID ChatID, name string, options OptionsCreateForumTopic) (result APIResponse[ForumTopic])

CreateForumTopic creates a topic in a forum supergroup chat.

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

func (b *Bot) CreateInvoiceLink(title, description, payload, providerToken, currency string, prices []LabeledPrice, options OptionsCreateInvoiceLink) (result APIResponse[string])

CreateInvoiceLink creates a link for an invoice.

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

func (*Bot) CreateNewStickerSet

func (b *Bot) CreateNewStickerSet(userID int64, name, title string, stickers []InputSticker, options OptionsCreateNewStickerSet) (result APIResponse[bool])

CreateNewStickerSet creates a new sticker set.

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

func (*Bot) DeclineChatJoinRequest

func (b *Bot) DeclineChatJoinRequest(chatID ChatID, userID int64) (result APIResponse[bool])

DeclineChatJoinRequest declines chat join request.

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

func (*Bot) DeleteChatPhoto

func (b *Bot) DeleteChatPhoto(chatID ChatID) (result APIResponse[bool])

DeleteChatPhoto deletes a chat photo.

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

func (*Bot) DeleteChatStickerSet

func (b *Bot) DeleteChatStickerSet(chatID ChatID) (result APIResponse[bool])

DeleteChatStickerSet deletes a chat sticker set.

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

func (*Bot) DeleteForumTopic

func (b *Bot) DeleteForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])

DeleteForumTopic deletes a forum topic.

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

func (*Bot) DeleteMessage

func (b *Bot) DeleteMessage(chatID ChatID, messageID int64) (result APIResponse[bool])

DeleteMessage deletes a message.

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

func (*Bot) DeleteMessages

func (b *Bot) DeleteMessages(chatID ChatID, messageIDs []int64) (result APIResponse[bool])

DeleteMessages deletes messages.

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

func (*Bot) DeleteMyCommands

func (b *Bot) DeleteMyCommands(options OptionsDeleteMyCommands) (result APIResponse[bool])

DeleteMyCommands deletes commands of this bot.

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

func (*Bot) DeleteStickerFromSet

func (b *Bot) DeleteStickerFromSet(sticker string) (result APIResponse[bool])

DeleteStickerFromSet deletes a sticker from set.

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

func (*Bot) DeleteStickerSet

func (b *Bot) DeleteStickerSet(name string) (result APIResponse[bool])

DeleteStickerSet deletes a sticker set.

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

func (*Bot) DeleteWebhook

func (b *Bot) DeleteWebhook(dropPendingUpdates bool) (result APIResponse[bool])

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(chatID ChatID, inviteLink string, options OptionsCreateChatInviteLink) (result APIResponse[ChatInviteLink])

EditChatInviteLink edits a chat invite link.

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

func (*Bot) EditForumTopic

func (b *Bot) EditForumTopic(chatID ChatID, messageThreadID int64, options OptionsEditForumTopic) (result APIResponse[bool])

EditForumTopic edits a forum topic.

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

func (*Bot) EditGeneralForumTopic

func (b *Bot) EditGeneralForumTopic(chatID ChatID, name string) (result APIResponse[bool])

EditGeneralForumTopic edites general forum topic.

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

func (*Bot) EditMessageCaption

func (b *Bot) EditMessageCaption(options OptionsEditMessageCaption) (result APIResponseMessageOrBool)

EditMessageCaption edits caption of a message.

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

func (*Bot) EditMessageLiveLocation

func (b *Bot) EditMessageLiveLocation(latitude, longitude float32, options OptionsEditMessageLiveLocation) (result APIResponseMessageOrBool)

EditMessageLiveLocation edits live location of a message.

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

func (*Bot) EditMessageMedia

func (b *Bot) EditMessageMedia(media InputMedia, options OptionsEditMessageMedia) (result APIResponseMessageOrBool)

EditMessageMedia edites a media message.

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

func (*Bot) EditMessageReplyMarkup

func (b *Bot) EditMessageReplyMarkup(options OptionsEditMessageReplyMarkup) (result APIResponseMessageOrBool)

EditMessageReplyMarkup edits reply markup of a message.

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

func (*Bot) EditMessageText

func (b *Bot) EditMessageText(text string, options OptionsEditMessageText) (result APIResponseMessageOrBool)

EditMessageText edits text of a message.

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

func (b *Bot) ExportChatInviteLink(chatID ChatID) (result APIResponse[string])

ExportChatInviteLink exports a chat invite link.

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

func (*Bot) ForwardMessage

func (b *Bot) ForwardMessage(chatID, fromChatID ChatID, messageID int64, options OptionsForwardMessage) (result APIResponse[Message])

ForwardMessage forwards a message.

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

func (*Bot) ForwardMessages

func (b *Bot) ForwardMessages(chatID, fromChatID ChatID, messageIDs []int64, options OptionsForwardMessage) (result APIResponse[[]MessageID])

ForwardMessages forwards messages.

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

func (*Bot) GetBusinessConnection added in v0.10.6

func (b *Bot) GetBusinessConnection(businessConnectionID string) (result APIResponse[BusinessConnection])

GetBusinessConnection gets a business connection.

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

func (*Bot) GetChat

func (b *Bot) GetChat(chatID ChatID) (result APIResponse[Chat])

GetChat gets a chat.

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

func (*Bot) GetChatAdministrators

func (b *Bot) GetChatAdministrators(chatID ChatID) (result APIResponse[[]ChatMember])

GetChatAdministrators gets chat administrators.

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

func (*Bot) GetChatMember

func (b *Bot) GetChatMember(chatID ChatID, userID int64) (result APIResponse[ChatMember])

GetChatMember gets a chat member.

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

func (*Bot) GetChatMemberCount

func (b *Bot) GetChatMemberCount(chatID ChatID) (result APIResponse[int])

GetChatMemberCount gets chat members' count.

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

func (*Bot) GetChatMenuButton

func (b *Bot) GetChatMenuButton(options OptionsGetChatMenuButton) (result APIResponse[MenuButton])

GetChatMenuButton fetches current chat menu button.

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

func (*Bot) GetCustomEmojiStickers

func (b *Bot) GetCustomEmojiStickers(customEmojiIDs []string) (result APIResponse[[]Sticker])

GetCustomEmojiStickers gets custom emoji stickers.

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

func (*Bot) GetFile

func (b *Bot) GetFile(fileID string) (result APIResponse[File])

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() (result APIResponse[[]Sticker])

GetForumTopicIconStickers fetches forum topic icon stickers.

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

func (*Bot) GetGameHighScores

func (b *Bot) GetGameHighScores(userID int64, options OptionsGetGameHighScores) (result APIResponse[[]GameHighScore])

GetGameHighScores gets high scores of a game.

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

func (*Bot) GetMe

func (b *Bot) GetMe() (result APIResponse[User])

GetMe gets info of this bot.

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

func (*Bot) GetMyCommands

func (b *Bot) GetMyCommands(options OptionsGetMyCommands) (result APIResponse[[]BotCommand])

GetMyCommands fetches commands of this bot.

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

func (*Bot) GetMyDefaultAdministratorRights

func (b *Bot) GetMyDefaultAdministratorRights(options OptionsGetMyDefaultAdministratorRights) (result APIResponse[bool])

GetMyDefaultAdministratorRights gets my default administrator rights.

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

func (*Bot) GetMyDescription

func (b *Bot) GetMyDescription(options OptionsGetMyDescription) (result APIResponse[BotDescription])

GetMyDescription gets the bot's description.

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

func (*Bot) GetMyName

func (b *Bot) GetMyName(options OptionsGetMyName) (result APIResponse[BotName])

GetMyName fetches the bot's name.

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

func (*Bot) GetMyShortDescription

func (b *Bot) GetMyShortDescription(options OptionsGetMyShortDescription) (result APIResponse[BotShortDescription])

GetMyShortDescription gets the bot's short description.

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

func (*Bot) GetStickerSet

func (b *Bot) GetStickerSet(name string) (result APIResponse[StickerSet])

GetStickerSet gets a sticker set.

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

func (*Bot) GetUpdates

func (b *Bot) GetUpdates(options OptionsGetUpdates) (result APIResponse[[]Update])

GetUpdates retrieves updates from Telegram bot API.

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

func (*Bot) GetUserChatBoosts

func (b *Bot) GetUserChatBoosts(chatID ChatID, userID int64) (result APIResponse[UserChatBoosts])

GetUserChatBoosts gets boosts of a user.

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

func (*Bot) GetUserProfilePhotos

func (b *Bot) GetUserProfilePhotos(userID int64, options OptionsGetUserProfilePhotos) (result APIResponse[UserProfilePhotos])

GetUserProfilePhotos gets user profile photos.

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

func (*Bot) GetWebhookInfo

func (b *Bot) GetWebhookInfo() (result APIResponse[WebhookInfo])

GetWebhookInfo gets webhook info for this bot.

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

func (*Bot) HideGeneralForumTopic

func (b *Bot) HideGeneralForumTopic(chatID ChatID) (result APIResponse[bool])

HideGeneralForumTopic hides general forum topic.

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

func (*Bot) LeaveChat

func (b *Bot) LeaveChat(chatID ChatID) (result APIResponse[bool])

LeaveChat leaves a chat.

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

func (*Bot) LogOut

func (b *Bot) LogOut() (result APIResponse[bool])

LogOut logs this bot from cloud Bot API server.

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

func (*Bot) PinChatMessage

func (b *Bot) PinChatMessage(chatID ChatID, messageID int64, options OptionsPinChatMessage) (result APIResponse[bool])

PinChatMessage pins a chat message.

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

func (*Bot) PromoteChatMember

func (b *Bot) PromoteChatMember(chatID ChatID, userID int64, options OptionsPromoteChatMember) (result APIResponse[bool])

PromoteChatMember promotes a chat member.

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

func (*Bot) ReopenForumTopic

func (b *Bot) ReopenForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])

ReopenForumTopic reopens a forum topic.

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

func (*Bot) ReopenGeneralForumTopic

func (b *Bot) ReopenGeneralForumTopic(chatID ChatID) (result APIResponse[bool])

ReopenGeneralForumTopic reopens general forum topic.

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

func (*Bot) ReplaceStickerInSet added in v0.10.6

func (b *Bot) ReplaceStickerInSet(userID, name, oldSticker string, sticker InputSticker) (result APIResponse[bool])

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

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

func (*Bot) RestrictChatMember

func (b *Bot) RestrictChatMember(chatID ChatID, userID int64, permissions ChatPermissions, options OptionsRestrictChatMember) (result APIResponse[bool])

RestrictChatMember restricts a chat member.

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

func (b *Bot) RevokeChatInviteLink(chatID ChatID, inviteLink string) (result APIResponse[ChatInviteLink])

RevokeChatInviteLink revoks a chat invite link.

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

func (*Bot) SendAnimation

func (b *Bot) SendAnimation(chatID ChatID, animation InputFile, options OptionsSendAnimation) (result APIResponse[Message])

SendAnimation sends an animation.

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

func (*Bot) SendAudio

func (b *Bot) SendAudio(chatID ChatID, audio InputFile, options OptionsSendAudio) (result APIResponse[Message])

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

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

func (*Bot) SendChatAction

func (b *Bot) SendChatAction(chatID ChatID, action ChatAction, options OptionsSendChatAction) (result APIResponse[bool])

SendChatAction sends chat actions.

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

func (*Bot) SendContact

func (b *Bot) SendContact(chatID ChatID, phoneNumber, firstName string, options OptionsSendContact) (result APIResponse[Message])

SendContact sends contacts.

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

func (*Bot) SendDice

func (b *Bot) SendDice(chatID ChatID, options OptionsSendDice) (result APIResponse[Message])

SendDice sends a random dice.

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

func (*Bot) SendDocument

func (b *Bot) SendDocument(chatID ChatID, document InputFile, options OptionsSendDocument) (result APIResponse[Message])

SendDocument sends a general file.

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

func (*Bot) SendGame

func (b *Bot) SendGame(chatID ChatID, gameShortName string, options OptionsSendGame) (result APIResponse[Message])

SendGame sends a game.

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

func (*Bot) SendInvoice

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

SendInvoice sends an invoice.

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

func (*Bot) SendLocation

func (b *Bot) SendLocation(chatID ChatID, latitude, longitude float32, options OptionsSendLocation) (result APIResponse[Message])

SendLocation sends locations.

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

func (*Bot) SendMediaGroup

func (b *Bot) SendMediaGroup(chatID ChatID, media []InputMedia, options OptionsSendMediaGroup) (result APIResponse[[]Message])

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(chatID ChatID, text string, options OptionsSendMessage) (result APIResponse[Message])

SendMessage sends a message to the bot.

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

func (*Bot) SendPhoto

func (b *Bot) SendPhoto(chatID ChatID, photo InputFile, options OptionsSendPhoto) (result APIResponse[Message])

SendPhoto sends a photo.

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

func (*Bot) SendPoll

func (b *Bot) SendPoll(chatID ChatID, question string, pollOptions []string, options OptionsSendPoll) (result APIResponse[Message])

SendPoll sends a poll.

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

func (*Bot) SendSticker

func (b *Bot) SendSticker(chatID ChatID, sticker InputFile, options OptionsSendSticker) (result APIResponse[Message])

SendSticker sends a sticker.

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

func (*Bot) SendVenue

func (b *Bot) SendVenue(chatID ChatID, latitude, longitude float32, title, address string, options OptionsSendVenue) (result APIResponse[Message])

SendVenue sends venues.

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

func (*Bot) SendVideo

func (b *Bot) SendVideo(chatID ChatID, video InputFile, options OptionsSendVideo) (result APIResponse[Message])

SendVideo sends a video file.

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

func (*Bot) SendVideoNote

func (b *Bot) SendVideoNote(chatID ChatID, videoNote InputFile, options OptionsSendVideoNote) (result APIResponse[Message])

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(chatID ChatID, voice InputFile, options OptionsSendVoice) (result APIResponse[Message])

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

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

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(chatID ChatID, userID int64, customTitle string) (result APIResponse[bool])

SetChatAdministratorCustomTitle sets chat administrator's custom title.

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

func (*Bot) SetChatDescription

func (b *Bot) SetChatDescription(chatID ChatID, description string) (result APIResponse[bool])

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) 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(options OptionsSetChatMenuButton) (result APIResponse[bool])

SetChatMenuButton sets chat menu button.

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

func (*Bot) SetChatPermissions

func (b *Bot) SetChatPermissions(chatID ChatID, permissions ChatPermissions, options OptionsSetChatPermissions) (result APIResponse[bool])

SetChatPermissions sets permissions of a chat.

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

func (*Bot) SetChatPhoto

func (b *Bot) SetChatPhoto(chatID ChatID, photo InputFile) (result APIResponse[bool])

SetChatPhoto sets a chat photo.

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

func (*Bot) SetChatStickerSet

func (b *Bot) SetChatStickerSet(chatID ChatID, stickerSetName string) (result APIResponse[bool])

SetChatStickerSet sets a chat sticker set.

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

func (*Bot) SetChatTitle

func (b *Bot) SetChatTitle(chatID ChatID, title string) (result APIResponse[bool])

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(name string, options OptionsSetCustomEmojiStickerSetThumbnail) (result APIResponse[bool])

SetCustomEmojiStickerSetThumbnail sets the custom emoji sticker set's thumbnail.

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

func (*Bot) SetGameScore

func (b *Bot) SetGameScore(userID int64, score int, options OptionsSetGameScore) (result APIResponseMessageOrBool)

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) 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(chatID ChatID, messageID int64, options OptionsSetMessageReaction) (result APIResponse[bool])

SetMessageReaction sets message reaction.

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

func (*Bot) SetMyCommands

func (b *Bot) SetMyCommands(commands []BotCommand, options OptionsSetMyCommands) (result APIResponse[bool])

SetMyCommands sets commands of this bot.

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

func (*Bot) SetMyDefaultAdministratorRights

func (b *Bot) SetMyDefaultAdministratorRights(options OptionsSetMyDefaultAdministratorRights) (result APIResponse[bool])

SetMyDefaultAdministratorRights sets my default administrator rights.

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

func (*Bot) SetMyDescription

func (b *Bot) SetMyDescription(options OptionsSetMyDescription) (result APIResponse[bool])

SetMyDescription sets the bot's description.

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

func (*Bot) SetMyName

func (b *Bot) SetMyName(name string, options OptionsSetMyName) (result APIResponse[bool])

SetMyName changes the bot's name.

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

func (*Bot) SetMyShortDescription

func (b *Bot) SetMyShortDescription(options OptionsSetMyShortDescription) (result APIResponse[bool])

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(sticker string, emojiList []string) (result APIResponse[bool])

SetStickerEmojiList sets the emoji list of sticker set.

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

func (*Bot) SetStickerKeywords

func (b *Bot) SetStickerKeywords(sticker string, keywords []string) (result APIResponse[bool])

SetStickerKeywords sets the keywords of sticker.

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

func (*Bot) SetStickerMaskPosition

func (b *Bot) SetStickerMaskPosition(sticker string, options OptionsSetStickerMaskPosition) (result APIResponse[bool])

SetStickerMaskPosition sets mask position of sticker.

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

func (*Bot) SetStickerPositionInSet

func (b *Bot) SetStickerPositionInSet(sticker string, position int) (result APIResponse[bool])

SetStickerPositionInSet sets sticker position in set.

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

func (*Bot) SetStickerSetThumbnail

func (b *Bot) SetStickerSetThumbnail(name string, userID int64, format StickerFormat, options OptionsSetStickerSetThumbnail) (result APIResponse[bool])

SetStickerSetThumbnail sets a thumbnail of a sticker set.

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

func (*Bot) SetStickerSetTitle

func (b *Bot) SetStickerSetTitle(name, title string) (result APIResponse[bool])

SetStickerSetTitle sets the title of sticker set.

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

func (*Bot) SetWebhook

func (b *Bot) SetWebhook(host string, port int, options OptionsSetWebhook) (result APIResponse[bool])

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) StartMonitoringUpdates

func (b *Bot) StartMonitoringUpdates(updateOffset int64, interval int, updateHandler func(b *Bot, update Update, err error))

DEPRECATED: renamed to `StartPollingUpdates`

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(options OptionsStopMessageLiveLocation) (result APIResponseMessageOrBool)

StopMessageLiveLocation stops live location of a message.

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

func (*Bot) StopMonitoringUpdates

func (b *Bot) StopMonitoringUpdates()

DEPRECATED: renamed to `StopPollingUpdates`

func (*Bot) StopPoll

func (b *Bot) StopPoll(chatID ChatID, messageID int64, options OptionsStopPoll) (result APIResponse[Poll])

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) UnbanChatMember

func (b *Bot) UnbanChatMember(chatID ChatID, userID int64, onlyIfBanned bool) (result APIResponse[bool])

UnbanChatMember unbans a chat member.

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

func (*Bot) UnbanChatSenderChat

func (b *Bot) UnbanChatSenderChat(chatID ChatID, senderChatID int64) (result APIResponse[bool])

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(chatID ChatID) (result APIResponse[bool])

UnhideGeneralForumTopic unhides general forum topic.

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

func (*Bot) UnpinAllChatMessages

func (b *Bot) UnpinAllChatMessages(chatID ChatID) (result APIResponse[bool])

UnpinAllChatMessages unpins all chat messages.

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

func (*Bot) UnpinAllForumTopicMessages

func (b *Bot) UnpinAllForumTopicMessages(chatID ChatID, messageThreadID int64) (result APIResponse[bool])

UnpinAllForumTopicMessages unpins all forum topic messages.

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

func (*Bot) UnpinChatMessage

func (b *Bot) UnpinChatMessage(chatID ChatID, options OptionsUnpinChatMessage) (result APIResponse[bool])

UnpinChatMessage unpins a chat message.

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

func (*Bot) UploadStickerFile

func (b *Bot) UploadStickerFile(userID int64, sticker InputFile, stickerFormat StickerFormat) (result APIResponse[File])

UploadStickerFile uploads a sticker file.

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

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 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"`
	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"`
}

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 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

func (CallbackQuery) String

func (q CallbackQuery) String() string

String function for 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"`
	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"`
	AvailableReactions                 []ReactionType        `json:"available_reactions,omitempty"`
	AccentColorID                      *int                  `json:"accent_color_id,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"`
	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"`
}

Chat is a struct of a chat

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

func (Chat) String

func (c Chat) String() string

String function for 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"`
}

ChatAdministratorRights is a struct of chat administrator's rights

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

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"`

	GiveawayMessageID *int64 `json:"giveaway_message_id,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 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"`
}

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"`
	CustomTitle         *string `json:"custom_title,omitempty"`
}

ChatMemmberAdministrator 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"
	User   User   `json:"user"`
}

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"`
}

ChatMemmberOwner 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"
	User                   User   `json:"user"`
	IsMember               bool   `json:"is_member"`
	CanChangeInfo          bool   `json:"can_change_info"`
	CanInviteUsers         bool   `json:"can_invite_users"`
	CanPinMessages         bool   `json:"can_pin_messages"`
	CanManageTopics        bool   `json:"can_manage_topics"`
	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"`
	CanSendWebPagePreviews bool   `json:"can_add_web_page_previews"`
	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

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"`
	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 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"`
	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

https://core.telegram.org/bots/api#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 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

func (ChosenInlineResult) String

func (c ChosenInlineResult) String() string

String function for 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 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 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 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"`
	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"`
	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"`
}

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"`
}

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 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"`
	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"`
}

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{}

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"`
	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"`
	URL                          *string                      `json:"url,omitempty"`
	LoginURL                     *LoginURL                    `json:"login_url,omitempty"`
	CallbackData                 *string                      `json:"callback_data,omitempty"`
	WebApp                       *WebAppInfo                  `json:"web_app,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"`
	CallbackGame                 *CallbackGame                `json:"callback_game,omitempty"`
	Pay                          *bool                        `json:"pay,omitempty"`
}

InlineKeyboardButton is a struct for InlineKeyboardButtons

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

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

type InlineKeyboardMarkup

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

InlineKeyboardMarkup is a struct for InlineKeyboardMarkup

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

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

func (InlineQuery) String

func (i InlineQuery) String() string

String function for InlineQuery

type InlineQueryResult

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

InlineQueryResult is a struct for inline query results

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"`
	HideURL             *bool                 `json:"hide_url,omitempty"`
	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

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

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

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

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"`
	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

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"`
	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

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"`
	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

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

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"`
	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

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

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

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

type InlineQueryResultGame

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

InlineQueryResultGame is a struct 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"`
	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

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

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"`
	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

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"`
	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

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

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"`
	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

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

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

type InputContactMessageContent

type InputContactMessageContent struct {
	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

type InputFile

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

InputFile represents contents of a file to be uploaded. Can be generated with InputFileFromXXX() functions in types_helper.go

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

func InputFileFromBytes

func InputFileFromBytes(bytes []byte) InputFile

InputFileFromBytes generates an InputFile from given bytes array

func InputFileFromFileID

func InputFileFromFileID(fileID string) InputFile

InputFileFromFileID generates an InputFile from given file id

func InputFileFromFilepath

func InputFileFromFilepath(filepath string) InputFile

InputFileFromFilepath generates an InputFile from given filepath

func InputFileFromURL

func InputFileFromURL(url string) InputFile

InputFileFromURL generates an InputFile from given url

type InputInvoiceMessageContent

type InputInvoiceMessageContent struct {
	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

type InputLocationMessageContent

type InputLocationMessageContent struct {
	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

type InputMedia

type InputMedia struct {
	Type                        InputMediaType  `json:"type"`
	Media                       string          `json:"media"`
	Thumbnail                   *InputFile      `json:"thumbnail,omitempty"` // video, animation, audio, document
	Caption                     *string         `json:"caption,omitempty"`
	CaptionEntities             []MessageEntity `json:"caption_entities,omitempty"`
	HasSpoiler                  *bool           `json:"has_spoiler,omitempty"` // video, animation, photo
	ParseMode                   *ParseMode      `json:"parse_mode,omitempty"`
	Width                       *int            `json:"width,omitempty"`                          // video, animation
	Height                      *int            `json:"height,omitempty"`                         // video, animation
	Duration                    *int            `json:"duration,omitempty"`                       // video, animation
	Performer                   *string         `json:"performer,omitempty"`                      // audio only
	Title                       *string         `json:"title,omitempty"`                          // audio only
	SupportsStreaming           *bool           `json:"supports_streaming,omitempty"`             // video only
	DisableContentTypeDetection *bool           `json:"disable_content_type_detection,omitempty"` // document only
}

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

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

type InputMediaType

type InputMediaType string

InputMediaType is a type of InputMedia

type InputMessageContent

type InputMessageContent any

InputMessageContent is a generic type of input message content types

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

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

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

type InputTextMessageContent

type InputTextMessageContent struct {
	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

type InputVenueMessageContent

type InputVenueMessageContent struct {
	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

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"`
	RequestUsers    *KeyboardButtonRequestUsers `json:"request_users,omitempty"`
	RequestChat     *KeyboardButtonRequestChat  `json:"request_chat,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

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

func NewKeyboardButtons

func NewKeyboardButtons(texts ...string) []KeyboardButton

NewKeyboardButtons is a helper function for generating an array of KeyboardButtons

type KeyboardButtonPollType

type KeyboardButtonPollType struct {
	Type *string `json:"type,omitempty"` // "quiz", "regular", or anything
}

KeyboardButtonPollType is a struct for KeyboardButtonPollType

https://core.telegram.org/bots/api#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

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

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

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

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 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

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

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 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

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

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

https://core.telegram.org/bots/api#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"`
	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"`
	Date                          int                            `json:"date"`
	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"`
	ViaBot                        *User                          `json:"via_bot,omitempty"`
	EditDate                      *int                           `json:"edit_date,omitempty"`
	HasProtectedContent           *bool                          `json:"has_protected_content,omitempty"`
	IsFromOffline                 *bool                          `json:"is_from_offline,omitempty"`
	MediaGroupID                  *string                        `json:"media_group_id,omitempty"`
	AuthorSignature               *string                        `json:"author_signature,omitempty"`
	Text                          *string                        `json:"text,omitempty"`
	Entities                      []MessageEntity                `json:"entities,omitempty"`
	LinkPreviewOptions            *LinkPreviewOptions            `json:"link_preview_options,omitempty"`
	Animation                     *Animation                     `json:"animation,omitempty"`
	Audio                         *Audio                         `json:"audio,omitempty"`
	Document                      *Document                      `json:"document,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"`
	HasMediaSpoiler               *bool                          `json:"has_media_spoiler,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"`
	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"`
	UsersShared                   *UsersShared                   `json:"users_shared,omitempty"`
	ChatShared                    *ChatShared                    `json:"chat_shared,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"`
	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"`
	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) HasCaption

func (m *Message) HasCaption() bool

HasCaption checks if Message has Caption.

func (*Message) HasChannelChatCreated

func (m *Message) HasChannelChatCreated() bool

HasChannelChatCreated checks if Message has ChannelChatCreated.

func (*Message) HasContact

func (m *Message) HasContact() bool

HasContact checks if Message has Contact.

func (*Message) HasDeleteChatPhoto

func (m *Message) HasDeleteChatPhoto() bool

HasDeleteChatPhoto checks if Message has DeleteChatPhoto.

func (*Message) HasDocument

func (m *Message) HasDocument() bool

HasDocument checks if Message has Document.

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) HasGroupChatCreated

func (m *Message) HasGroupChatCreated() bool

HasGroupChatCreated checks if Message has GroupChatCreated.

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) 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) HasReplyTo

func (m *Message) HasReplyTo() bool

HasReplyTo checks if Message has ReplyTo.

func (*Message) HasSticker

func (m *Message) HasSticker() bool

HasSticker checks if Message has Sticker.

func (*Message) HasSupergroupChatCreated

func (m *Message) HasSupergroupChatCreated() bool

HasSupergroupChatCreated checks if Message has SupergroupChatCreated.

func (*Message) HasText

func (m *Message) HasText() bool

HasText checks if Message has Text.

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) HasVoice

func (m *Message) HasVoice() bool

HasVoice checks if Message has Voice.

func (*Message) LargestPhoto

func (m *Message) LargestPhoto() PhotoSize

LargestPhoto returns a photo with the largest file size.

func (Message) String

func (m Message) String() string

String function for Message

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
}

MessageEntity is a struct of a message entity

https://core.telegram.org/bots/api#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"
)

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

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

func NewMessageOriginChannel

func NewMessageOriginChannel(chat Chat, messageID int64, date int, authorSignature *string) MessageOrigin

NewMessageOriginChannel returns a new MessageOriginChannel.

`authorSignature` can be nil.

func NewMessageOriginChat

func NewMessageOriginChat(senderChat Chat, date int, authorSignature *string) MessageOrigin

NewMessageOriginChat returns a new MessageOriginChat.

`authorSignature` can be nil.

func NewMessageOriginHiddenUser

func NewMessageOriginHiddenUser(senderUserName string, date int) MessageOrigin

NewMessageOriginHiddenUser returns a new MessageOriginHiddenUser.

func NewMessageOriginUser

func NewMessageOriginUser(user User, date int) MessageOrigin

NewMessageOriginUser returns a new MessageOriginUser.

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 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`, `caption`, `parse_mode`, `caption_entities`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`

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

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) SetDisableNotification

func (o OptionsCopyMessage) SetDisableNotification(disable bool) OptionsCopyMessage

SetDisableNotification sets the `disable_notification` 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.

type OptionsCopyMessages

type OptionsCopyMessages MethodOptions

OptionsCopyMessages struct for CopyMessages().

options include: `message_thread_id`, `disable_notification`, `protect_content`, and `remove_caption`

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

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

SetCreatesJoinRequests 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 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: `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) 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) 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) 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 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 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: `caption`, `parse_mode`, `caption_entities`, or `reply_markup`

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

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.

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: `horizontal_accuracy`, `heading`, `proximity_alert_radius`, `reply_markup`

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

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) 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: `reply_markup`

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

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: `reply_markup`

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

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: `parse_mode`, `entities`, `link_preview_options`, and `reply_markup`

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

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.

type OptionsForwardMessage

type OptionsForwardMessage MethodOptions

OptionsForwardMessage struct for ForwardMessage().

options include: `message_thread_id`, `disable_notification` and `protect_content`.

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

func (OptionsForwardMessage) SetDisableNotification

func (o OptionsForwardMessage) SetDisableNotification(disable bool) OptionsForwardMessage

SetDisableNotification sets the `disable_notification` 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.

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 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 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 OptionsPinChatMessage

type OptionsPinChatMessage MethodOptions

OptionsPinChatMessage struct for PinChatMessage

options include: `disable_notification`

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

func (OptionsPinChatMessage) SetDisableNotification

func (o OptionsPinChatMessage) SetDisableNotification(disable bool) OptionsPinChatMessage

SetDisableNotification sets the `disable_notification` value of OptionsPinChatMessage.

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`, and `can_manage_topics`.

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) 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 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 OptionsSendAnimation

type OptionsSendAnimation MethodOptions

OptionsSendAnimation struct for SendAnimation().

options include: `business_connection_id`, `message_thread_id`, `duration`, `width`, `height`, `thumbnail`, `caption`, `parse_mode`, `caption_entities`, `has_spoiler`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) SetHasSpiler

func (o OptionsSendAnimation) SetHasSpiler(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) 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) 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`, `caption`, `parse_mode`, `caption_entities`, `duration`, `performer`, `title`, `thumbnail`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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) 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 OptionsSendContact

type OptionsSendContact MethodOptions

OptionsSendContact struct for SendContact().

options include: `business_connection_id`, `message_thread_id`, `last_name`, `vcard`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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) 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`, `emoji`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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.

type OptionsSendDocument

type OptionsSendDocument MethodOptions

OptionsSendDocument struct for SendDocument().

options include: `business_connection_id`, `message_thread_id`, `thumbnail`, `caption`, `parse_mode`, `caption_entities`, `disable_content_type_detection`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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) 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`, `reply_parameters`, and `reply_markup`.

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

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) 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 OptionsSendInvoice

type OptionsSendInvoice MethodOptions

OptionsSendInvoice struct for SendInvoice().

options include: `message_thread_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`, `reply_parameters`, and `reply_markup`

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

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) 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) SetSuggestedTipAmounts

func (o OptionsSendInvoice) SetSuggestedTipAmounts(suggestedTipAmounts []int) OptionsSendInvoice

SetSuggestedTipAmounts sets the `suggested_tip_amounts` value of OptionsSendInvoice.

type OptionsSendLocation

type OptionsSendLocation MethodOptions

OptionsSendLocation struct for SendLocation()

options include: `business_connection_id`, `message_thread_id,` `horizontal_accuracy`, `live_period`, `heading`, `proximity_alert_radius`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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.

type OptionsSendMediaGroup

type OptionsSendMediaGroup MethodOptions

OptionsSendMediaGroup struct for SendMediaGroup().

options include: `business_connection_id`, `message_thread_id`, `disable_notification`, `protect_content`, and `reply_parameters`

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

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) SetDisableNotification

func (o OptionsSendMediaGroup) SetDisableNotification(disable bool) OptionsSendMediaGroup

SetDisableNotification sets the `disable_notification` 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`, `parse_mode`, `entities`, `link_preview_options`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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.

type OptionsSendPhoto

type OptionsSendPhoto MethodOptions

OptionsSendPhoto struct for SendPhoto().

options include: `business_connection_id`, `message_thread_id`, `caption`, `parse_mode`, `caption_entities`, `has_spoiler`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) SetDisableNotification

func (o OptionsSendPhoto) SetDisableNotification(disable bool) OptionsSendPhoto

SetDisableNotification sets the `disable_notification` value of OptionsSendPhoto.

func (OptionsSendPhoto) SetHasSpiler

func (o OptionsSendPhoto) SetHasSpiler(hasSpoiler bool) OptionsSendPhoto

SetHasSpoiler sets the `has_spoiler` 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.

type OptionsSendPoll

type OptionsSendPoll MethodOptions

OptionsSendPoll struct for SendPoll().

options include: `business_connection_id`, `message_thread_id`, `is_anonymous`, `type`, `allows_multiple_answers`, `correct_option_id`, `explanation`, `explanation_parse_mode`, `explanation_entities`, `open_period`, `close_date`, `is_closed`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

func (OptionsSendPoll) SetAllowsMultipleAnswers

func (o OptionsSendPoll) SetAllowsMultipleAnswers(allowsMultipleAnswers bool) OptionsSendPoll

SetAllowsMultipleAnswers sets the `allows_multiple_answers` 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) SetCorrectOptionID

func (o OptionsSendPoll) SetCorrectOptionID(correctOptionID int) OptionsSendPoll

SetCorrectOptionID sets the `correct_option_id` 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) SetExplanationParseMode

func (o OptionsSendPoll) SetExplanationParseMode(explanationParseMode string) OptionsSendPoll

SetExplanationParseMode sets the `explanation_parse_mode` 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) 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) 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) SetType

func (o OptionsSendPoll) SetType(newType string) OptionsSendPoll

SetType sets the `type` value of OptionsSendPoll.

type OptionsSendSticker

type OptionsSendSticker MethodOptions

OptionsSendSticker struct for SendSticker().

options include: `business_connection_id`, `message_thread_id`, `emoji`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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.

type OptionsSendVenue

type OptionsSendVenue MethodOptions

OptionsSendVenue struct for SendVenue().

options include: `business_connection_id`, `message_thread_id`, `foursquare_id`, `foursquare_type`, `google_place_id`, `google_place_type`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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.

type OptionsSendVideo

type OptionsSendVideo MethodOptions

OptionsSendVideo struct for SendVideo().

options include: `business_connection_id`, `message_thread_id`, `duration`, `width`, `height`, `thumbnail`, `caption`, `parse_mode`, `caption_entities`, `has_spoiler`, `supports_streaming`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) SetHasSpiler

func (o OptionsSendVideo) SetHasSpiler(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) 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) 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,` `duration`, `length`, `thumbnail`, `disable_notification`, `protect_content`, `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) SetBusinessConnectionID added in v0.10.6

func (o OptionsSendVideoNote) SetBusinessConnectionID(businessConnectionID string) OptionsSendVideoNote

SetBusinessConnectionID sets the `business_connection_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) 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) 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`, `caption`, `parse_mode`, `caption_entities`, `duration`, `disable_notification`, `protect_content`, `reply_parameters`, and `reply_markup`.

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

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) 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) 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.

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 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) SetDescription

func (o OptionsSetMyShortDescription) SetDescription(shortDescription string) OptionsSetMyShortDescription

SetShortDescription sets the `short_description` value of OptionsSetMyShortDescription.

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.

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 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: `reply_markup`

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

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: `reply_markup`.

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

func (OptionsStopPoll) SetReplyMarkup

func (o OptionsStopPoll) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsStopPoll

SetReplyMarkup sets the `reply_markup` value of OptionsStopPoll.

type OptionsUnpinChatMessage

type OptionsUnpinChatMessage MethodOptions

OptionsUnpinChatMessage struct for UnpinChatMessage

options include: `message_id`

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

func (OptionsUnpinChatMessage) SetMessageID

func (o OptionsUnpinChatMessage) SetMessageID(messageID int64) OptionsUnpinChatMessage

SetMessageID set the `message_id` value of OptionsUnpinChatMessage.

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 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
	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"`
	CorrectOptionID       *int            `json:"correct_option_id,omitempty"`
	Explanation           *string         `json:"explanation,omitempty"`
	ExplanationEntities   []MessageEntity `json:"explanation_entities,omitempty"`
	OpenPeriod            *int            `json:"open_period,omitempty"`
	CloseDate             *int            `json:"close_date,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"`
}

PollAnswer is a struct of a poll answer

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

type PollOption

type PollOption struct {
	Text       string `json:"text"` // 1~100 chars
	VoterCount int    `json:"voter_count"`
}

PollOption is a struct of a poll option

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

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 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 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

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

func NewCustomEmojiReaction

func NewCustomEmojiReaction(customEmojiID string) ReactionType

NewCustomEmojiReaction returns a ReactionType with custom emoji.

func NewEmojiReaction

func NewEmojiReaction(emoji string) ReactionType

NewEmojiReaction returns a ReactionType with emoji.

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

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

type ReplyKeyboardRemove

type ReplyKeyboardRemove struct {
	RemoveKeyboard bool  `json:"remove_keyboard"`
	Selective      *bool `json:"selective,omitempty"`
}

ReplyKeyboardRemove is a struct for ReplyKeyboardRemove

https://core.telegram.org/bots/api#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"`
}

ReplyParameters is a struct for replying messages

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

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 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 SuccessfulPayment

type SuccessfulPayment struct {
	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"`
	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 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

https://core.telegram.org/bots/api#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 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"`
	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"`
	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"`
}

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) 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) String

func (u Update) String() string

String function for Update

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()
	SupportsInlineQueries   *bool   `json:"supports_inline_queries,omitempty"`     // returned only in GetMe()
	CanConnectToBusiness    *bool   `json:"can_connect_to_business,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

func (User) String

func (u User) String() string

String function 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 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 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"`
	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 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