Documentation ¶
Overview ¶
Package telegrambot / Telegram Bot API helper
https://core.telegram.org/bots/api
Created on : 2015.10.06, meinside@duck.com
Index ¶
- func GenCertAndKey(domain string, outCertFilepath string, outKeyFilepath string, ...) error
- func NewInlineKeyboardButtonsAsRowsWithCallbackData(values map[string]string) [][]InlineKeyboardButton
- type APIResponse
- type APIResponseMessageOrBool
- type APIResponseParameters
- type AllowedUpdate
- type Animation
- type Audio
- type Birthdate
- type Bot
- func (b *Bot) AddCommandHandler(command string, handler func(b *Bot, update Update, args string))
- func (b *Bot) AddStickerToSet(userID int64, name string, sticker InputSticker, ...) (result APIResponse[bool])
- func (b *Bot) AnswerCallbackQuery(callbackQueryID string, options OptionsAnswerCallbackQuery) (result APIResponse[bool])
- func (b *Bot) AnswerInlineQuery(inlineQueryID string, results []any, options OptionsAnswerInlineQuery) (result APIResponse[bool])
- func (b *Bot) AnswerPreCheckoutQuery(preCheckoutQueryID string, ok bool, errorMessage *string) (result APIResponse[bool])
- func (b *Bot) AnswerShippingQuery(shippingQueryID string, ok bool, shippingOptions []ShippingOption, ...) (result APIResponse[bool])
- func (b *Bot) AnswerWebAppQuery(webAppQueryID string, res InlineQueryResult) (result APIResponse[SentWebAppMessage])
- func (b *Bot) ApproveChatJoinRequest(chatID ChatID, userID int64) (result APIResponse[bool])
- func (b *Bot) BanChatMember(chatID ChatID, userID int64, options OptionsBanChatMember) (result APIResponse[bool])
- func (b *Bot) BanChatSenderChat(chatID ChatID, senderChatID int64) (result APIResponse[bool])
- func (b *Bot) Close() (result APIResponse[bool])
- func (b *Bot) CloseForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])
- func (b *Bot) CloseGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) CopyMessage(chatID, fromChatID ChatID, messageID int64, options OptionsCopyMessage) (result APIResponse[MessageID])
- func (b *Bot) CopyMessages(chatID, fromChatID ChatID, messageIDs []int64, options OptionsCopyMessages) (result APIResponse[[]MessageID])
- func (b *Bot) CreateChatInviteLink(chatID ChatID, options OptionsCreateChatInviteLink) (result APIResponse[ChatInviteLink])
- func (b *Bot) CreateForumTopic(chatID ChatID, name string, options OptionsCreateForumTopic) (result APIResponse[ForumTopic])
- func (b *Bot) CreateInvoiceLink(title, description, payload, providerToken, currency string, ...) (result APIResponse[string])
- func (b *Bot) CreateNewStickerSet(userID int64, name, title string, stickers []InputSticker, ...) (result APIResponse[bool])
- func (b *Bot) DeclineChatJoinRequest(chatID ChatID, userID int64) (result APIResponse[bool])
- func (b *Bot) DeleteChatPhoto(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) DeleteChatStickerSet(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) DeleteForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])
- func (b *Bot) DeleteMessage(chatID ChatID, messageID int64) (result APIResponse[bool])
- func (b *Bot) DeleteMessages(chatID ChatID, messageIDs []int64) (result APIResponse[bool])
- func (b *Bot) DeleteMyCommands(options OptionsDeleteMyCommands) (result APIResponse[bool])
- func (b *Bot) DeleteStickerFromSet(sticker string) (result APIResponse[bool])
- func (b *Bot) DeleteStickerSet(name string) (result APIResponse[bool])
- func (b *Bot) DeleteWebhook(dropPendingUpdates bool) (result APIResponse[bool])
- func (b *Bot) EditChatInviteLink(chatID ChatID, inviteLink string, options OptionsCreateChatInviteLink) (result APIResponse[ChatInviteLink])
- func (b *Bot) EditForumTopic(chatID ChatID, messageThreadID int64, options OptionsEditForumTopic) (result APIResponse[bool])
- func (b *Bot) EditGeneralForumTopic(chatID ChatID, name string) (result APIResponse[bool])
- func (b *Bot) EditMessageCaption(options OptionsEditMessageCaption) (result APIResponseMessageOrBool)
- func (b *Bot) EditMessageLiveLocation(latitude, longitude float32, options OptionsEditMessageLiveLocation) (result APIResponseMessageOrBool)
- func (b *Bot) EditMessageMedia(media InputMedia, options OptionsEditMessageMedia) (result APIResponseMessageOrBool)
- func (b *Bot) EditMessageReplyMarkup(options OptionsEditMessageReplyMarkup) (result APIResponseMessageOrBool)
- func (b *Bot) EditMessageText(text string, options OptionsEditMessageText) (result APIResponseMessageOrBool)
- func (b *Bot) ExportChatInviteLink(chatID ChatID) (result APIResponse[string])
- func (b *Bot) ForwardMessage(chatID, fromChatID ChatID, messageID int64, options OptionsForwardMessage) (result APIResponse[Message])
- func (b *Bot) ForwardMessages(chatID, fromChatID ChatID, messageIDs []int64, options OptionsForwardMessage) (result APIResponse[[]MessageID])
- func (b *Bot) GetBusinessConnection(businessConnectionID string) (result APIResponse[BusinessConnection])
- func (b *Bot) GetChat(chatID ChatID) (result APIResponse[Chat])
- func (b *Bot) GetChatAdministrators(chatID ChatID) (result APIResponse[[]ChatMember])
- func (b *Bot) GetChatMember(chatID ChatID, userID int64) (result APIResponse[ChatMember])
- func (b *Bot) GetChatMemberCount(chatID ChatID) (result APIResponse[int])
- func (b *Bot) GetChatMenuButton(options OptionsGetChatMenuButton) (result APIResponse[MenuButton])
- func (b *Bot) GetCustomEmojiStickers(customEmojiIDs []string) (result APIResponse[[]Sticker])
- func (b *Bot) GetFile(fileID string) (result APIResponse[File])
- func (b *Bot) GetFileURL(file File) string
- func (b *Bot) GetForumTopicIconStickers() (result APIResponse[[]Sticker])
- func (b *Bot) GetGameHighScores(userID int64, options OptionsGetGameHighScores) (result APIResponse[[]GameHighScore])
- func (b *Bot) GetMe() (result APIResponse[User])
- func (b *Bot) GetMyCommands(options OptionsGetMyCommands) (result APIResponse[[]BotCommand])
- func (b *Bot) GetMyDefaultAdministratorRights(options OptionsGetMyDefaultAdministratorRights) (result APIResponse[bool])
- func (b *Bot) GetMyDescription(options OptionsGetMyDescription) (result APIResponse[BotDescription])
- func (b *Bot) GetMyName(options OptionsGetMyName) (result APIResponse[BotName])
- func (b *Bot) GetMyShortDescription(options OptionsGetMyShortDescription) (result APIResponse[BotShortDescription])
- func (b *Bot) GetStickerSet(name string) (result APIResponse[StickerSet])
- func (b *Bot) GetUpdates(options OptionsGetUpdates) (result APIResponse[[]Update])
- func (b *Bot) GetUserChatBoosts(chatID ChatID, userID int64) (result APIResponse[UserChatBoosts])
- func (b *Bot) GetUserProfilePhotos(userID int64, options OptionsGetUserProfilePhotos) (result APIResponse[UserProfilePhotos])
- func (b *Bot) GetWebhookInfo() (result APIResponse[WebhookInfo])
- func (b *Bot) HideGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) LeaveChat(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) LogOut() (result APIResponse[bool])
- func (b *Bot) PinChatMessage(chatID ChatID, messageID int64, options OptionsPinChatMessage) (result APIResponse[bool])
- func (b *Bot) PromoteChatMember(chatID ChatID, userID int64, options OptionsPromoteChatMember) (result APIResponse[bool])
- func (b *Bot) ReopenForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])
- func (b *Bot) ReopenGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) ReplaceStickerInSet(userID, name, oldSticker string, sticker InputSticker) (result APIResponse[bool])
- func (b *Bot) RestrictChatMember(chatID ChatID, userID int64, permissions ChatPermissions, ...) (result APIResponse[bool])
- func (b *Bot) RevokeChatInviteLink(chatID ChatID, inviteLink string) (result APIResponse[ChatInviteLink])
- func (b *Bot) SendAnimation(chatID ChatID, animation InputFile, options OptionsSendAnimation) (result APIResponse[Message])
- func (b *Bot) SendAudio(chatID ChatID, audio InputFile, options OptionsSendAudio) (result APIResponse[Message])
- func (b *Bot) SendChatAction(chatID ChatID, action ChatAction, options OptionsSendChatAction) (result APIResponse[bool])
- func (b *Bot) SendContact(chatID ChatID, phoneNumber, firstName string, options OptionsSendContact) (result APIResponse[Message])
- func (b *Bot) SendDice(chatID ChatID, options OptionsSendDice) (result APIResponse[Message])
- func (b *Bot) SendDocument(chatID ChatID, document InputFile, options OptionsSendDocument) (result APIResponse[Message])
- func (b *Bot) SendGame(chatID ChatID, gameShortName string, options OptionsSendGame) (result APIResponse[Message])
- func (b *Bot) SendInvoice(chatID int64, title, description, payload, providerToken, currency string, ...) (result APIResponse[Message])
- func (b *Bot) SendLocation(chatID ChatID, latitude, longitude float32, options OptionsSendLocation) (result APIResponse[Message])
- func (b *Bot) SendMediaGroup(chatID ChatID, media []InputMedia, options OptionsSendMediaGroup) (result APIResponse[[]Message])
- func (b *Bot) SendMessage(chatID ChatID, text string, options OptionsSendMessage) (result APIResponse[Message])
- func (b *Bot) SendPhoto(chatID ChatID, photo InputFile, options OptionsSendPhoto) (result APIResponse[Message])
- func (b *Bot) SendPoll(chatID ChatID, question string, pollOptions []string, options OptionsSendPoll) (result APIResponse[Message])
- func (b *Bot) SendSticker(chatID ChatID, sticker InputFile, options OptionsSendSticker) (result APIResponse[Message])
- func (b *Bot) SendVenue(chatID ChatID, latitude, longitude float32, title, address string, ...) (result APIResponse[Message])
- func (b *Bot) SendVideo(chatID ChatID, video InputFile, options OptionsSendVideo) (result APIResponse[Message])
- func (b *Bot) SendVideoNote(chatID ChatID, videoNote InputFile, options OptionsSendVideoNote) (result APIResponse[Message])
- func (b *Bot) SendVoice(chatID ChatID, voice InputFile, options OptionsSendVoice) (result APIResponse[Message])
- func (b *Bot) SetCallbackQueryHandler(handler func(b *Bot, update Update, callbackQuery CallbackQuery))
- func (b *Bot) SetChannelPostHandler(handler func(b *Bot, update Update, channelPost Message, edited bool))
- func (b *Bot) SetChatAdministratorCustomTitle(chatID ChatID, userID int64, customTitle string) (result APIResponse[bool])
- func (b *Bot) SetChatDescription(chatID ChatID, description string) (result APIResponse[bool])
- func (b *Bot) SetChatJoinRequestHandler(handler func(b *Bot, update Update, chatJoinRequest ChatJoinRequest))
- func (b *Bot) SetChatMemberUpdateHandler(...)
- func (b *Bot) SetChatMenuButton(options OptionsSetChatMenuButton) (result APIResponse[bool])
- func (b *Bot) SetChatPermissions(chatID ChatID, permissions ChatPermissions, options OptionsSetChatPermissions) (result APIResponse[bool])
- func (b *Bot) SetChatPhoto(chatID ChatID, photo InputFile) (result APIResponse[bool])
- func (b *Bot) SetChatStickerSet(chatID ChatID, stickerSetName string) (result APIResponse[bool])
- func (b *Bot) SetChatTitle(chatID ChatID, title string) (result APIResponse[bool])
- func (b *Bot) SetChosenInlineResultHandler(handler func(b *Bot, update Update, chosenInlineResult ChosenInlineResult))
- func (b *Bot) SetCustomEmojiStickerSetThumbnail(name string, options OptionsSetCustomEmojiStickerSetThumbnail) (result APIResponse[bool])
- func (b *Bot) SetGameScore(userID int64, score int, options OptionsSetGameScore) (result APIResponseMessageOrBool)
- func (b *Bot) SetInlineQueryHandler(handler func(b *Bot, update Update, inlineQuery InlineQuery))
- func (b *Bot) SetMessageHandler(handler func(b *Bot, update Update, message Message, edited bool))
- func (b *Bot) SetMessageReaction(chatID ChatID, messageID int64, options OptionsSetMessageReaction) (result APIResponse[bool])
- func (b *Bot) SetMyCommands(commands []BotCommand, options OptionsSetMyCommands) (result APIResponse[bool])
- func (b *Bot) SetMyDefaultAdministratorRights(options OptionsSetMyDefaultAdministratorRights) (result APIResponse[bool])
- func (b *Bot) SetMyDescription(options OptionsSetMyDescription) (result APIResponse[bool])
- func (b *Bot) SetMyName(name string, options OptionsSetMyName) (result APIResponse[bool])
- func (b *Bot) SetMyShortDescription(options OptionsSetMyShortDescription) (result APIResponse[bool])
- func (b *Bot) SetNoMatchingCommandHandler(handler func(b *Bot, update Update, cmd, args string))
- func (b *Bot) SetPollAnswerHandler(handler func(b *Bot, update Update, pollAnswer PollAnswer))
- func (b *Bot) SetPollHandler(handler func(b *Bot, update Update, poll Poll))
- func (b *Bot) SetPreCheckoutQueryHandler(handler func(b *Bot, update Update, preCheckoutQuery PreCheckoutQuery))
- func (b *Bot) SetShippingQueryHandler(handler func(b *Bot, update Update, shippingQuery ShippingQuery))
- func (b *Bot) SetStickerEmojiList(sticker string, emojiList []string) (result APIResponse[bool])
- func (b *Bot) SetStickerKeywords(sticker string, keywords []string) (result APIResponse[bool])
- func (b *Bot) SetStickerMaskPosition(sticker string, options OptionsSetStickerMaskPosition) (result APIResponse[bool])
- func (b *Bot) SetStickerPositionInSet(sticker string, position int) (result APIResponse[bool])
- func (b *Bot) SetStickerSetThumbnail(name string, userID int64, format StickerFormat, ...) (result APIResponse[bool])
- func (b *Bot) SetStickerSetTitle(name, title string) (result APIResponse[bool])
- func (b *Bot) SetWebhook(host string, port int, options OptionsSetWebhook) (result APIResponse[bool])
- func (b *Bot) StartMonitoringUpdates(updateOffset int64, interval int, ...)
- func (b *Bot) StartPollingUpdates(updateOffset int64, interval int, ...)
- func (b *Bot) StartWebhookServerAndWait(certFilepath string, keyFilepath string, ...)
- func (b *Bot) StopMessageLiveLocation(options OptionsStopMessageLiveLocation) (result APIResponseMessageOrBool)
- func (b *Bot) StopMonitoringUpdates()
- func (b *Bot) StopPoll(chatID ChatID, messageID int64, options OptionsStopPoll) (result APIResponse[Poll])
- func (b *Bot) StopPollingUpdates()
- func (b *Bot) UnbanChatMember(chatID ChatID, userID int64, onlyIfBanned bool) (result APIResponse[bool])
- func (b *Bot) UnbanChatSenderChat(chatID ChatID, senderChatID int64) (result APIResponse[bool])
- func (b *Bot) UnhideGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) UnpinAllChatMessages(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) UnpinAllForumTopicMessages(chatID ChatID, messageThreadID int64) (result APIResponse[bool])
- func (b *Bot) UnpinAllGeneralForumTopicMessages(chatID ChatID) (result APIResponse[bool])
- func (b *Bot) UnpinChatMessage(chatID ChatID, options OptionsUnpinChatMessage) (result APIResponse[bool])
- func (b *Bot) UploadStickerFile(userID int64, sticker InputFile, stickerFormat StickerFormat) (result APIResponse[File])
- type BotCommand
- type BotCommandScopeAllChatAdministrators
- type BotCommandScopeAllGroupChats
- type BotCommandScopeAllPrivateChats
- type BotCommandScopeChat
- type BotCommandScopeChatAdministrators
- type BotCommandScopeChatMember
- type BotCommandScopeDefault
- type BotCommandScopeType
- type BotDescription
- type BotName
- type BotShortDescription
- type BusinessConnection
- type BusinessIntro
- type BusinessLocation
- type BusinessMessagesDeleted
- type BusinessOpeningHours
- type BusinessOpeningHoursInterval
- type CallbackGame
- type CallbackQuery
- type Chat
- type ChatAction
- type ChatAdministratorRights
- func (r ChatAdministratorRights) SetCanEditMessages(canEditMessages bool) ChatAdministratorRights
- func (r ChatAdministratorRights) SetCanManageTopics(canManageTopics bool) ChatAdministratorRights
- func (r ChatAdministratorRights) SetCanPinMessages(canPinMessages bool) ChatAdministratorRights
- func (r ChatAdministratorRights) SetCanPostMessages(canPostMessages bool) ChatAdministratorRights
- type ChatBoost
- type ChatBoostAdded
- type ChatBoostRemoved
- type ChatBoostSource
- type ChatBoostUpdated
- type ChatID
- type ChatInviteLink
- type ChatJoinRequest
- type ChatLocation
- type ChatMember
- type ChatMemberAdministrator
- type ChatMemberBanned
- type ChatMemberLeft
- type ChatMemberMember
- type ChatMemberOwner
- type ChatMemberRestricted
- type ChatMemberStatus
- type ChatMemberUpdated
- type ChatPermissions
- func (p ChatPermissions) SetCanAddWebPagePreviews(can bool) ChatPermissions
- func (p ChatPermissions) SetCanChangeInfo(can bool) ChatPermissions
- func (p ChatPermissions) SetCanInviteUsers(can bool) ChatPermissions
- func (p ChatPermissions) SetCanManageTopics(can bool) ChatPermissions
- func (p ChatPermissions) SetCanPinMessages(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendAudios(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendDocuments(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendMessages(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendOtherMessages(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendPhotos(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendPolls(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendVideoNotes(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendVideos(can bool) ChatPermissions
- func (p ChatPermissions) SetCanSendVoiceNotes(can bool) ChatPermissions
- type ChatPhoto
- type ChatShared
- type ChatType
- type ChosenInlineResult
- type Contact
- type Dice
- type Document
- type DocumentMimeType
- type ExternalReplyInfo
- type File
- type ForceReply
- type ForumTopic
- type ForumTopicClosed
- type ForumTopicCreated
- type ForumTopicEdited
- type ForumTopicReopened
- type Game
- type GameHighScore
- type GeneralForumTopicHidden
- type GeneralForumTopicUnhidden
- type Giveaway
- type GiveawayCompleted
- type GiveawayCreated
- type GiveawayWinners
- type InaccessibleMessage
- type InlineKeyboardButton
- func NewInlineKeyboardButton(text string) InlineKeyboardButton
- func NewInlineKeyboardButtonsAsColumnsWithCallbackData(values map[string]string) []InlineKeyboardButton
- func NewInlineKeyboardButtonsWithCallbackData(values map[string]string) []InlineKeyboardButton
- func NewInlineKeyboardButtonsWithSwitchInlineQuery(values map[string]string) []InlineKeyboardButton
- func NewInlineKeyboardButtonsWithURL(values map[string]string) []InlineKeyboardButton
- func (b InlineKeyboardButton) SetCallbackData(data string) InlineKeyboardButton
- func (b InlineKeyboardButton) SetCallbackGame(callbackGame CallbackGame) InlineKeyboardButton
- func (b InlineKeyboardButton) SetLoginURL(loginURL LoginURL) InlineKeyboardButton
- func (b InlineKeyboardButton) SetPay(pay bool) InlineKeyboardButton
- func (b InlineKeyboardButton) SetSwichInlineQuery(query string) InlineKeyboardButton
- func (b InlineKeyboardButton) SetSwichInlineQueryChosenChat(chosenChat SwitchInlineQueryChosenChat) InlineKeyboardButton
- func (b InlineKeyboardButton) SetSwichInlineQueryCurrentChat(query string) InlineKeyboardButton
- func (b InlineKeyboardButton) SetURL(url string) InlineKeyboardButton
- func (b InlineKeyboardButton) SetWebApp(webApp WebAppInfo) InlineKeyboardButton
- type InlineKeyboardMarkup
- type InlineQuery
- type InlineQueryResult
- type InlineQueryResultArticle
- func (r InlineQueryResultArticle) SetDescription(description string) InlineQueryResultArticle
- func (r InlineQueryResultArticle) SetHideURL(hideURL bool) InlineQueryResultArticle
- func (r InlineQueryResultArticle) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultArticle
- func (r InlineQueryResultArticle) SetThumbnailHeight(height int) InlineQueryResultArticle
- func (r InlineQueryResultArticle) SetThumbnailURL(thumbnailURL string) InlineQueryResultArticle
- func (r InlineQueryResultArticle) SetThumbnailWidth(width int) InlineQueryResultArticle
- func (r InlineQueryResultArticle) SetURL(url string) InlineQueryResultArticle
- type InlineQueryResultAudio
- func (r InlineQueryResultAudio) SetAudioDuration(duration int) InlineQueryResultAudio
- func (r InlineQueryResultAudio) SetCaption(caption string) InlineQueryResultAudio
- func (r InlineQueryResultAudio) SetCaptionEntities(entities []MessageEntity) InlineQueryResultAudio
- func (r InlineQueryResultAudio) SetInputMessageContent(content InputMessageContent) InlineQueryResultAudio
- func (r InlineQueryResultAudio) SetParseMode(parseMode ParseMode) InlineQueryResultAudio
- func (r InlineQueryResultAudio) SetPerformer(performer string) InlineQueryResultAudio
- func (r InlineQueryResultAudio) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultAudio
- type InlineQueryResultCachedAudio
- func (r InlineQueryResultCachedAudio) SetCaption(caption string) InlineQueryResultCachedAudio
- func (r InlineQueryResultCachedAudio) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedAudio
- func (r InlineQueryResultCachedAudio) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedAudio
- func (r InlineQueryResultCachedAudio) SetParseMode(parseMode ParseMode) InlineQueryResultCachedAudio
- func (r InlineQueryResultCachedAudio) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedAudio
- type InlineQueryResultCachedDocument
- func (r InlineQueryResultCachedDocument) SetCaption(caption string) InlineQueryResultCachedDocument
- func (r InlineQueryResultCachedDocument) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedDocument
- func (r InlineQueryResultCachedDocument) SetDescription(description string) InlineQueryResultCachedDocument
- func (r InlineQueryResultCachedDocument) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedDocument
- func (r InlineQueryResultCachedDocument) SetParseMode(parseMode ParseMode) InlineQueryResultCachedDocument
- func (r InlineQueryResultCachedDocument) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedDocument
- type InlineQueryResultCachedGif
- func (r InlineQueryResultCachedGif) SetCaption(caption string) InlineQueryResultCachedGif
- func (r InlineQueryResultCachedGif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedGif
- func (r InlineQueryResultCachedGif) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedGif
- func (r InlineQueryResultCachedGif) SetParseMode(parseMode ParseMode) InlineQueryResultCachedGif
- func (r InlineQueryResultCachedGif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedGif
- func (r InlineQueryResultCachedGif) SetTitle(title string) InlineQueryResultCachedGif
- type InlineQueryResultCachedMpeg4Gif
- func (r InlineQueryResultCachedMpeg4Gif) SetCaption(caption string) InlineQueryResultCachedMpeg4Gif
- func (r InlineQueryResultCachedMpeg4Gif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedMpeg4Gif
- func (r InlineQueryResultCachedMpeg4Gif) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedMpeg4Gif
- func (r InlineQueryResultCachedMpeg4Gif) SetParseMode(parseMode ParseMode) InlineQueryResultCachedMpeg4Gif
- func (r InlineQueryResultCachedMpeg4Gif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedMpeg4Gif
- func (r InlineQueryResultCachedMpeg4Gif) SetTitle(title string) InlineQueryResultCachedMpeg4Gif
- type InlineQueryResultCachedPhoto
- func (r InlineQueryResultCachedPhoto) SetCaption(caption string) InlineQueryResultCachedPhoto
- func (r InlineQueryResultCachedPhoto) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedPhoto
- func (r InlineQueryResultCachedPhoto) SetDescription(description string) InlineQueryResultCachedPhoto
- func (r InlineQueryResultCachedPhoto) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedPhoto
- func (r InlineQueryResultCachedPhoto) SetParseMode(parseMode ParseMode) InlineQueryResultCachedPhoto
- func (r InlineQueryResultCachedPhoto) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedPhoto
- func (r InlineQueryResultCachedPhoto) SetTitle(title string) InlineQueryResultCachedPhoto
- type InlineQueryResultCachedSticker
- type InlineQueryResultCachedVideo
- func (r InlineQueryResultCachedVideo) SetCaption(caption string) InlineQueryResultCachedVideo
- func (r InlineQueryResultCachedVideo) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedVideo
- func (r InlineQueryResultCachedVideo) SetDescription(description string) InlineQueryResultCachedVideo
- func (r InlineQueryResultCachedVideo) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedVideo
- func (r InlineQueryResultCachedVideo) SetParseMode(parseMode ParseMode) InlineQueryResultCachedVideo
- func (r InlineQueryResultCachedVideo) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedVideo
- type InlineQueryResultCachedVoice
- func (r InlineQueryResultCachedVoice) SetCaption(caption string) InlineQueryResultCachedVoice
- func (r InlineQueryResultCachedVoice) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedVoice
- func (r InlineQueryResultCachedVoice) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedVoice
- func (r InlineQueryResultCachedVoice) SetParseMode(parseMode ParseMode) InlineQueryResultCachedVoice
- func (r InlineQueryResultCachedVoice) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedVoice
- type InlineQueryResultContact
- func (r InlineQueryResultContact) SetInputMessageContent(content InputMessageContent) InlineQueryResultContact
- func (r InlineQueryResultContact) SetLastName(lastName string) InlineQueryResultContact
- func (r InlineQueryResultContact) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultContact
- func (r InlineQueryResultContact) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultContact
- func (r InlineQueryResultContact) SetThumbnailURL(thumbnailURL string) InlineQueryResultContact
- func (r InlineQueryResultContact) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultContact
- func (r InlineQueryResultContact) SetVCard(vCard string) InlineQueryResultContact
- type InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetCaption(caption string) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetCaptionEntities(entities []MessageEntity) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetDescription(description string) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetInputMessageContent(content InputMessageContent) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetParseMode(parseMode ParseMode) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetThumbnailURL(thumbnailURL string) InlineQueryResultDocument
- func (r InlineQueryResultDocument) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultDocument
- type InlineQueryResultGame
- type InlineQueryResultGif
- func (r InlineQueryResultGif) SetCaption(caption string) InlineQueryResultGif
- func (r InlineQueryResultGif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultGif
- func (r InlineQueryResultGif) SetGifDuration(duration int) InlineQueryResultGif
- func (r InlineQueryResultGif) SetGifHeight(height int) InlineQueryResultGif
- func (r InlineQueryResultGif) SetGifWidth(width int) InlineQueryResultGif
- func (r InlineQueryResultGif) SetInputMessageContent(content InputMessageContent) InlineQueryResultGif
- func (r InlineQueryResultGif) SetParseMode(parseMode ParseMode) InlineQueryResultGif
- func (r InlineQueryResultGif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultGif
- func (r InlineQueryResultGif) SetThumbnailMimeType(mimeType ThumbnailMimeType) InlineQueryResultGif
- func (r InlineQueryResultGif) SetTitle(title string) InlineQueryResultGif
- type InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetHeading(heading int) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetHorizontalAccuracy(horizontalAccuracy float32) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetInputMessageContent(content InputMessageContent) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetLivePeriod(livePeriod int) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetProximityAlertRadius(radius int) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetThumbnailURL(thumbnailURL string) InlineQueryResultLocation
- func (r InlineQueryResultLocation) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultLocation
- type InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetCaption(caption string) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetInputMessageContent(content InputMessageContent) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetMpeg4Duration(duration int) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetMpeg4Height(height int) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetMpeg4Width(width int) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetParseMode(parseMode ParseMode) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetThumbnailMimeType(mimeType ThumbnailMimeType) InlineQueryResultMpeg4Gif
- func (r InlineQueryResultMpeg4Gif) SetTitle(title string) InlineQueryResultMpeg4Gif
- type InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetCaption(caption string) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetCaptionEntities(entities []MessageEntity) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetDescription(description string) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetInputMessageContent(content InputMessageContent) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetParseMode(parseMode ParseMode) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetPhotoHeight(height int) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetPhotoWidth(width int) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultPhoto
- func (r InlineQueryResultPhoto) SetTitle(title string) InlineQueryResultPhoto
- type InlineQueryResultType
- type InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetFoursquareID(foursquareID string) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetFoursquareType(foursquareType string) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetGooglePlaceID(googlePlaceID string) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetGooglePlaceType(googlePlaceType string) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetInputMessageContent(content InputMessageContent) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetThumbnailURL(thumbnailURL string) InlineQueryResultVenue
- func (r InlineQueryResultVenue) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultVenue
- type InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetCaption(caption string) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetCaptionEntities(entities []MessageEntity) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetDescription(description string) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetInputMessageContent(content InputMessageContent) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetParseMode(parseMode ParseMode) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetVideoDuration(duration int) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetVideoHeight(height int) InlineQueryResultVideo
- func (r InlineQueryResultVideo) SetVideoWidth(width int) InlineQueryResultVideo
- type InlineQueryResultVoice
- func (r InlineQueryResultVoice) SetCaption(caption string) InlineQueryResultVoice
- func (r InlineQueryResultVoice) SetCaptionEntities(entities []MessageEntity) InlineQueryResultVoice
- func (r InlineQueryResultVoice) SetInputMessageContent(content InputMessageContent) InlineQueryResultVoice
- func (r InlineQueryResultVoice) SetParseMode(parseMode ParseMode) InlineQueryResultVoice
- func (r InlineQueryResultVoice) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultVoice
- func (r InlineQueryResultVoice) SetVoiceDuration(duration int) InlineQueryResultVoice
- type InlineQueryResultsButton
- type InputContactMessageContent
- type InputFile
- type InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetIsFlexible(isFlexible bool) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetMaxTipAmount(amount int) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetNeedEmail(needEmail bool) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetNeedName(needName bool) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetNeedPhoneNumber(needPhoneNumber bool) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetNeedShippingAddress(needShippingAddress bool) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetPhotoHeight(photoHeight int) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetPhotoSize(photoSize int) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetPhotoURL(photoURL string) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetPhotoWidth(photoWidth int) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetProviderData(providerData string) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetSendEmailToProvider(sendEmailToProvider bool) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) InputInvoiceMessageContent
- func (c InputInvoiceMessageContent) SetSuggestedTipAmounts(amounts []int) InputInvoiceMessageContent
- type InputLocationMessageContent
- func (c InputLocationMessageContent) SetHeading(heading int) InputLocationMessageContent
- func (c InputLocationMessageContent) SetHorizontalAccuracy(horizontalAccuracy float32) InputLocationMessageContent
- func (c InputLocationMessageContent) SetLivePeriod(livePeriod int) InputLocationMessageContent
- func (c InputLocationMessageContent) SetProximityAlertRadius(radius int) InputLocationMessageContent
- type InputMedia
- func (m *InputMedia) SetCaption(caption string) *InputMedia
- func (m InputMedia) SetCaptionEntities(entities []MessageEntity) InputMedia
- func (m InputMedia) SetDisableContentTypeDetection(disableContentTypeDetection bool) InputMedia
- func (m InputMedia) SetDuration(duration int) InputMedia
- func (m InputMedia) SetHasSpoiler(hasSpoiler bool) InputMedia
- func (m InputMedia) SetHeight(height int) InputMedia
- func (m InputMedia) SetParseMode(parseMode ParseMode) InputMedia
- func (m InputMedia) SetPerformer(performer string) InputMedia
- func (m InputMedia) SetSupportsStreaming(supportsStreaming bool) InputMedia
- func (m InputMedia) SetThumbnail(thumbnail InputFile) InputMedia
- func (m InputMedia) SetTitle(title string) InputMedia
- func (m InputMedia) SetWidth(width int) InputMedia
- type InputMediaType
- type InputMessageContent
- type InputSticker
- type InputTextMessageContent
- type InputVenueMessageContent
- func (c InputVenueMessageContent) SetFoursquareID(foursquareID string) InputVenueMessageContent
- func (c InputVenueMessageContent) SetFoursquareType(foursquareType string) InputVenueMessageContent
- func (c InputVenueMessageContent) SetGooglePlaceID(googlePlaceID string) InputVenueMessageContent
- func (c InputVenueMessageContent) SetGooglePlaceType(googlePlaceType string) InputVenueMessageContent
- type Invoice
- type KeyboardButton
- func (b KeyboardButton) SetRequestChat(requestChat KeyboardButtonRequestChat) KeyboardButton
- func (b KeyboardButton) SetRequestContact(requestContact bool) KeyboardButton
- func (b KeyboardButton) SetRequestLocation(requestLocation bool) KeyboardButton
- func (b KeyboardButton) SetRequestPoll(requestPoll KeyboardButtonPollType) KeyboardButton
- func (b KeyboardButton) SetRequestUsers(requestUsers KeyboardButtonRequestUsers) KeyboardButton
- func (b KeyboardButton) SetWebApp(webApp WebAppInfo) KeyboardButton
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetBotAdministratorRights(botAdminRights ChatAdministratorRights) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetBotIsMember(isMember bool) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetChatHasUsername(hasUsername bool) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetChatIsCreated(isCreated bool) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetChatIsForum(isForum bool) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetRequestPhoto(requestPhoto bool) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetRequestTitle(requestTitle bool) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetRequestUsername(requestUsername bool) KeyboardButtonRequestChat
- func (c KeyboardButtonRequestChat) SetUserAdministratorRights(userAdminRights ChatAdministratorRights) KeyboardButtonRequestChat
- type KeyboardButtonRequestUsers
- func (u KeyboardButtonRequestUsers) SetMaxQuantity(maxQuantity int) KeyboardButtonRequestUsers
- func (u KeyboardButtonRequestUsers) SetRequestName(requestName bool) KeyboardButtonRequestUsers
- func (u KeyboardButtonRequestUsers) SetRequestPhoto(requestPhoto bool) KeyboardButtonRequestUsers
- func (u KeyboardButtonRequestUsers) SetRequestUsername(requestUsername bool) KeyboardButtonRequestUsers
- func (u KeyboardButtonRequestUsers) SetUserIsBot(userIsBot bool) KeyboardButtonRequestUsers
- func (u KeyboardButtonRequestUsers) SetUserIsPremium(userIsPremium bool) KeyboardButtonRequestUsers
- type LabeledPrice
- type LinkPreviewOptions
- func (o LinkPreviewOptions) SetIsDisabled(disabled bool) LinkPreviewOptions
- func (o LinkPreviewOptions) SetPreferLargeMedia(preferLargeMedia bool) LinkPreviewOptions
- func (o LinkPreviewOptions) SetPreferSmallMedia(preferSmallMedia bool) LinkPreviewOptions
- func (o LinkPreviewOptions) SetShowAboveText(showAboveText bool) LinkPreviewOptions
- func (o LinkPreviewOptions) SetURL(url string) LinkPreviewOptions
- type Location
- type LoginURL
- type MaskPosition
- type MaskPositionPoint
- type MaybeInaccessibleMessage
- type MenuButton
- type MenuButtonCommands
- type MenuButtonDefault
- type MenuButtonWebApp
- type Message
- func (m *Message) HasAnimation() bool
- func (m *Message) HasAudio() bool
- func (m *Message) HasCaption() bool
- func (m *Message) HasChannelChatCreated() bool
- func (m *Message) HasContact() bool
- func (m *Message) HasDeleteChatPhoto() bool
- func (m *Message) HasDocument() bool
- func (m *Message) HasForwardFrom() bool
- func (m *Message) HasForwardFromChat() bool
- func (m *Message) HasGame() bool
- func (m *Message) HasGroupChatCreated() bool
- func (m *Message) HasLeftChatMember() bool
- func (m *Message) HasLocation() bool
- func (m *Message) HasMessageEntities() bool
- func (m *Message) HasNewChatMembers() bool
- func (m *Message) HasNewChatPhoto() bool
- func (m *Message) HasNewChatTitle() bool
- func (m *Message) HasPhoto() bool
- func (m *Message) HasPinnedMessage() bool
- func (m *Message) HasPoll() bool
- func (m *Message) HasReplyTo() bool
- func (m *Message) HasSticker() bool
- func (m *Message) HasSupergroupChatCreated() bool
- func (m *Message) HasText() bool
- func (m *Message) HasVenue() bool
- func (m *Message) HasVideo() bool
- func (m *Message) HasVoice() bool
- func (m *Message) LargestPhoto() PhotoSize
- type MessageAutoDeleteTimerChanged
- type MessageEntity
- type MessageEntityType
- type MessageID
- type MessageOrigin
- type MessageReactionCountUpdated
- type MessageReactionUpdated
- type MethodOptions
- type OptionsAddStickerToSet
- type OptionsAnswerCallbackQuery
- func (o OptionsAnswerCallbackQuery) SetCacheTime(cacheTime int) OptionsAnswerCallbackQuery
- func (o OptionsAnswerCallbackQuery) SetShowAlert(showAlert bool) OptionsAnswerCallbackQuery
- func (o OptionsAnswerCallbackQuery) SetText(text string) OptionsAnswerCallbackQuery
- func (o OptionsAnswerCallbackQuery) SetURL(url string) OptionsAnswerCallbackQuery
- type OptionsAnswerInlineQuery
- func (o OptionsAnswerInlineQuery) SetButton(button InlineQueryResultsButton) OptionsAnswerInlineQuery
- func (o OptionsAnswerInlineQuery) SetCacheTime(cacheTime int) OptionsAnswerInlineQuery
- func (o OptionsAnswerInlineQuery) SetIsPersonal(isPersonal bool) OptionsAnswerInlineQuery
- func (o OptionsAnswerInlineQuery) SetNextOffset(nextOffset string) OptionsAnswerInlineQuery
- type OptionsBanChatMember
- type OptionsCopyMessage
- func (o OptionsCopyMessage) SetCaption(caption string) OptionsCopyMessage
- func (o OptionsCopyMessage) SetCaptionEntities(entities []MessageEntity) OptionsCopyMessage
- func (o OptionsCopyMessage) SetDisableNotification(disable bool) OptionsCopyMessage
- func (o OptionsCopyMessage) SetMessageThreadID(messageThreadID int64) OptionsCopyMessage
- func (o OptionsCopyMessage) SetParseMode(parseMode ParseMode) OptionsCopyMessage
- func (o OptionsCopyMessage) SetProtectContent(protect bool) OptionsCopyMessage
- func (o OptionsCopyMessage) SetReplyMarkup(replyMarkup any) OptionsCopyMessage
- func (o OptionsCopyMessage) SetReplyParameters(replyParameters ReplyParameters) OptionsCopyMessage
- type OptionsCopyMessages
- func (o OptionsCopyMessages) SetDisableNotification(disable bool) OptionsCopyMessages
- func (o OptionsCopyMessages) SetMessageThreadID(messageThreadID int64) OptionsCopyMessages
- func (o OptionsCopyMessages) SetProtectContent(protect bool) OptionsCopyMessages
- func (o OptionsCopyMessages) SetRemoveCaption(removeCaption bool) OptionsCopyMessages
- type OptionsCreateChatInviteLink
- func (o OptionsCreateChatInviteLink) SetCreatesJoinRequest(createsJoinRequest bool) OptionsCreateChatInviteLink
- func (o OptionsCreateChatInviteLink) SetExpireDate(expireDate int) OptionsCreateChatInviteLink
- func (o OptionsCreateChatInviteLink) SetMemberLimit(memberLimit int) OptionsCreateChatInviteLink
- func (o OptionsCreateChatInviteLink) SetName(name string) OptionsCreateChatInviteLink
- type OptionsCreateForumTopic
- type OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetIsFlexible(isFlexible bool) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetMaxTipAmount(maxTipAmount int) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetNeedEmail(needEmail bool) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetNeedName(needName bool) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetNeedPhoneNumber(needPhoneNumber bool) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetNeedShippingAddress(needShippingAddr bool) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetPhotoHeight(photoHeight int) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetPhotoSize(photoSize int) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetPhotoURL(photoURL string) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetPhotoWidth(photoWidth int) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetProviderData(providerData string) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetSendEmailToProvider(sendEmailToProvider bool) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) OptionsCreateInvoiceLink
- func (o OptionsCreateInvoiceLink) SetSuggestedTipAmounts(suggestedTipAmounts []int) OptionsCreateInvoiceLink
- type OptionsCreateNewStickerSet
- type OptionsDeleteMyCommands
- type OptionsEditForumTopic
- type OptionsEditMessageCaption
- func (o OptionsEditMessageCaption) SetCaption(caption string) OptionsEditMessageCaption
- func (o OptionsEditMessageCaption) SetCaptionEntities(entities []MessageEntity) OptionsEditMessageCaption
- func (o OptionsEditMessageCaption) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageCaption
- func (o OptionsEditMessageCaption) SetInlineMessageID(inlineMessageID string) OptionsEditMessageCaption
- func (o OptionsEditMessageCaption) SetParseMode(parseMode ParseMode) OptionsEditMessageCaption
- func (o OptionsEditMessageCaption) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageCaption
- type OptionsEditMessageLiveLocation
- func (o OptionsEditMessageLiveLocation) SetHeading(heading int) OptionsEditMessageLiveLocation
- func (o OptionsEditMessageLiveLocation) SetHorizontalAccuracy(horizontalAccuracy float32) OptionsEditMessageLiveLocation
- func (o OptionsEditMessageLiveLocation) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageLiveLocation
- func (o OptionsEditMessageLiveLocation) SetInlineMessageID(inlineMessageID string) OptionsEditMessageLiveLocation
- func (o OptionsEditMessageLiveLocation) SetProximityAlertRadius(proximityAlertRadius int) OptionsEditMessageLiveLocation
- func (o OptionsEditMessageLiveLocation) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageLiveLocation
- type OptionsEditMessageMedia
- func (o OptionsEditMessageMedia) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageMedia
- func (o OptionsEditMessageMedia) SetInlineMessageID(inlineMessageID string) OptionsEditMessageMedia
- func (o OptionsEditMessageMedia) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageMedia
- type OptionsEditMessageReplyMarkup
- func (o OptionsEditMessageReplyMarkup) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageReplyMarkup
- func (o OptionsEditMessageReplyMarkup) SetInlineMessageID(inlineMessageID string) OptionsEditMessageReplyMarkup
- func (o OptionsEditMessageReplyMarkup) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageReplyMarkup
- type OptionsEditMessageText
- func (o OptionsEditMessageText) SetEntities(entities []MessageEntity) OptionsEditMessageText
- func (o OptionsEditMessageText) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageText
- func (o OptionsEditMessageText) SetInlineMessageID(inlineMessageID string) OptionsEditMessageText
- func (o OptionsEditMessageText) SetLinkPreviewOptions(linkPreviewOptions LinkPreviewOptions) OptionsEditMessageText
- func (o OptionsEditMessageText) SetParseMode(parseMode ParseMode) OptionsEditMessageText
- func (o OptionsEditMessageText) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageText
- type OptionsForwardMessage
- type OptionsGetChatMenuButton
- type OptionsGetGameHighScores
- type OptionsGetMyCommands
- type OptionsGetMyDefaultAdministratorRights
- type OptionsGetMyDescription
- type OptionsGetMyName
- type OptionsGetMyShortDescription
- type OptionsGetUpdates
- type OptionsGetUserProfilePhotos
- type OptionsPinChatMessage
- type OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanChangeInfo(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanDeleteMessages(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanDeleteStories(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanEditMessages(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanEditStories(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanInviteUsers(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanManageChat(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanManageTopics(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanManageVideoChats(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanPinMessages(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanPostMessages(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanPostStories(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanPromoteMembers(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetCanRestrictMembers(can bool) OptionsPromoteChatMember
- func (o OptionsPromoteChatMember) SetIsAnonymous(anonymous bool) OptionsPromoteChatMember
- type OptionsRestrictChatMember
- type OptionsSendAnimation
- func (o OptionsSendAnimation) SetBusinessConnectionID(businessConnectionID string) OptionsSendAnimation
- func (o OptionsSendAnimation) SetCaption(caption string) OptionsSendAnimation
- func (o OptionsSendAnimation) SetCaptionEntities(entities []MessageEntity) OptionsSendAnimation
- func (o OptionsSendAnimation) SetDisableNotification(disable bool) OptionsSendAnimation
- func (o OptionsSendAnimation) SetDuration(duration int) OptionsSendAnimation
- func (o OptionsSendAnimation) SetHasSpiler(hasSpoiler bool) OptionsSendAnimation
- func (o OptionsSendAnimation) SetHeight(height int) OptionsSendAnimation
- func (o OptionsSendAnimation) SetMessageThreadID(messageThreadID int64) OptionsSendAnimation
- func (o OptionsSendAnimation) SetParseMode(parseMode ParseMode) OptionsSendAnimation
- func (o OptionsSendAnimation) SetProtectContent(protect bool) OptionsSendAnimation
- func (o OptionsSendAnimation) SetReplyMarkup(replyMarkup any) OptionsSendAnimation
- func (o OptionsSendAnimation) SetReplyParameters(replyParameters ReplyParameters) OptionsSendAnimation
- func (o OptionsSendAnimation) SetThumbnail(thumbnail any) OptionsSendAnimation
- func (o OptionsSendAnimation) SetWidth(width int) OptionsSendAnimation
- type OptionsSendAudio
- func (o OptionsSendAudio) SetBusinessConnectionID(businessConnectionID string) OptionsSendAudio
- func (o OptionsSendAudio) SetCaption(caption string) OptionsSendAudio
- func (o OptionsSendAudio) SetCaptionEntities(entities []MessageEntity) OptionsSendAudio
- func (o OptionsSendAudio) SetDisableNotification(disable bool) OptionsSendAudio
- func (o OptionsSendAudio) SetDuration(duration int) OptionsSendAudio
- func (o OptionsSendAudio) SetMessageThreadID(messageThreadID int64) OptionsSendAudio
- func (o OptionsSendAudio) SetParseMode(parseMode ParseMode) OptionsSendAudio
- func (o OptionsSendAudio) SetPerformer(performer string) OptionsSendAudio
- func (o OptionsSendAudio) SetProtectContent(protect bool) OptionsSendAudio
- func (o OptionsSendAudio) SetReplyMarkup(replyMarkup any) OptionsSendAudio
- func (o OptionsSendAudio) SetReplyParameters(replyParameters ReplyParameters) OptionsSendAudio
- func (o OptionsSendAudio) SetThumbnail(thumbnail any) OptionsSendAudio
- func (o OptionsSendAudio) SetTitle(title string) OptionsSendAudio
- type OptionsSendChatAction
- type OptionsSendContact
- func (o OptionsSendContact) SetBusinessConnectionID(businessConnectionID string) OptionsSendContact
- func (o OptionsSendContact) SetDisableNotification(disable bool) OptionsSendContact
- func (o OptionsSendContact) SetLastName(lastName string) OptionsSendContact
- func (o OptionsSendContact) SetMessageThreadID(messageThreadID int64) OptionsSendContact
- func (o OptionsSendContact) SetProtectContent(protect bool) OptionsSendContact
- func (o OptionsSendContact) SetReplyMarkup(replyMarkup any) OptionsSendContact
- func (o OptionsSendContact) SetReplyParameters(replyParameters ReplyParameters) OptionsSendContact
- func (o OptionsSendContact) SetVCard(vCard string) OptionsSendContact
- type OptionsSendDice
- func (o OptionsSendDice) SetBusinessConnectionID(businessConnectionID string) OptionsSendDice
- func (o OptionsSendDice) SetDisableNotification(disable bool) OptionsSendDice
- func (o OptionsSendDice) SetEmoji(emoji string) OptionsSendDice
- func (o OptionsSendDice) SetMessageThreadID(messageThreadID int64) OptionsSendDice
- func (o OptionsSendDice) SetProtectContent(protect bool) OptionsSendDice
- func (o OptionsSendDice) SetReplyMarkup(replyMarkup any) OptionsSendDice
- func (o OptionsSendDice) SetReplyParameters(replyParameters ReplyParameters) OptionsSendDice
- type OptionsSendDocument
- func (o OptionsSendDocument) SetBusinessConnectionID(businessConnectionID string) OptionsSendDocument
- func (o OptionsSendDocument) SetCaption(caption string) OptionsSendDocument
- func (o OptionsSendDocument) SetCaptionEntities(entities []MessageEntity) OptionsSendDocument
- func (o OptionsSendDocument) SetDisableContentTypeDetection(disable bool) OptionsSendDocument
- func (o OptionsSendDocument) SetDisableNotification(disable bool) OptionsSendDocument
- func (o OptionsSendDocument) SetMessageThreadID(messageThreadID int64) OptionsSendDocument
- func (o OptionsSendDocument) SetParseMode(parseMode ParseMode) OptionsSendDocument
- func (o OptionsSendDocument) SetProtectContent(protect bool) OptionsSendDocument
- func (o OptionsSendDocument) SetReplyMarkup(replyMarkup any) OptionsSendDocument
- func (o OptionsSendDocument) SetReplyParameters(replyParameters ReplyParameters) OptionsSendDocument
- func (o OptionsSendDocument) SetThumbnail(thumbnail any) OptionsSendDocument
- type OptionsSendGame
- func (o OptionsSendGame) SetBusinessConnectionID(businessConnectionID string) OptionsSendGame
- func (o OptionsSendGame) SetDisableNotification(disable bool) OptionsSendGame
- func (o OptionsSendGame) SetMessageThreadID(messageThreadID int64) OptionsSendGame
- func (o OptionsSendGame) SetProtectContent(protect bool) OptionsSendGame
- func (o OptionsSendGame) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsSendGame
- func (o OptionsSendGame) SetReplyParameters(replyParameters ReplyParameters) OptionsSendGame
- type OptionsSendInvoice
- func (o OptionsSendInvoice) SetDisableNotification(disable bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetIsFlexible(isFlexible bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetMaxTipAmount(maxTipAmount int) OptionsSendInvoice
- func (o OptionsSendInvoice) SetMessageThreadID(messageThreadID int64) OptionsSendInvoice
- func (o OptionsSendInvoice) SetNeedEmail(needEmail bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetNeedName(needName bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetNeedPhoneNumber(needPhoneNumber bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetNeedShippingAddress(needShippingAddr bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetPhotoHeight(photoHeight int) OptionsSendInvoice
- func (o OptionsSendInvoice) SetPhotoSize(photoSize int) OptionsSendInvoice
- func (o OptionsSendInvoice) SetPhotoURL(photoURL string) OptionsSendInvoice
- func (o OptionsSendInvoice) SetPhotoWidth(photoWidth int) OptionsSendInvoice
- func (o OptionsSendInvoice) SetProtectContent(protect bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetProviderData(providerData string) OptionsSendInvoice
- func (o OptionsSendInvoice) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsSendInvoice
- func (o OptionsSendInvoice) SetReplyParameters(replyParameters ReplyParameters) OptionsSendInvoice
- func (o OptionsSendInvoice) SetSendEmailToProvider(sendEmailToProvider bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) OptionsSendInvoice
- func (o OptionsSendInvoice) SetStartParameter(startParameter string) OptionsSendInvoice
- func (o OptionsSendInvoice) SetSuggestedTipAmounts(suggestedTipAmounts []int) OptionsSendInvoice
- type OptionsSendLocation
- func (o OptionsSendLocation) SetBusinessConnectionID(businessConnectionID string) OptionsSendLocation
- func (o OptionsSendLocation) SetDisableNotification(disable bool) OptionsSendLocation
- func (o OptionsSendLocation) SetHeading(heading int) OptionsSendLocation
- func (o OptionsSendLocation) SetHorizontalAccuracy(horizontalAccuracy float32) OptionsSendLocation
- func (o OptionsSendLocation) SetLivePeriod(livePeriod int) OptionsSendLocation
- func (o OptionsSendLocation) SetMessageThreadID(messageThreadID int64) OptionsSendLocation
- func (o OptionsSendLocation) SetProtectContent(protect bool) OptionsSendLocation
- func (o OptionsSendLocation) SetProximityAlertRadius(proximityAlertRadius int) OptionsSendLocation
- func (o OptionsSendLocation) SetReplyMarkup(replyMarkup any) OptionsSendLocation
- func (o OptionsSendLocation) SetReplyParameters(replyParameters ReplyParameters) OptionsSendLocation
- type OptionsSendMediaGroup
- func (o OptionsSendMediaGroup) SetBusinessConnectionID(businessConnectionID string) OptionsSendMediaGroup
- func (o OptionsSendMediaGroup) SetDisableNotification(disable bool) OptionsSendMediaGroup
- func (o OptionsSendMediaGroup) SetMessageThreadID(messageThreadID int64) OptionsSendMediaGroup
- func (o OptionsSendMediaGroup) SetProtectContent(protect bool) OptionsSendMediaGroup
- func (o OptionsSendMediaGroup) SetReplyParameters(replyParameters ReplyParameters) OptionsSendMediaGroup
- type OptionsSendMessage
- func (o OptionsSendMessage) SetBusinessConnectionID(businessConnectionID string) OptionsSendMessage
- func (o OptionsSendMessage) SetDisableNotification(disable bool) OptionsSendMessage
- func (o OptionsSendMessage) SetEntities(entities []MessageEntity) OptionsSendMessage
- func (o OptionsSendMessage) SetLinkPreviewOptions(linkPreviewOptions LinkPreviewOptions) OptionsSendMessage
- func (o OptionsSendMessage) SetMessageThreadID(messageThreadID int64) OptionsSendMessage
- func (o OptionsSendMessage) SetParseMode(parseMode ParseMode) OptionsSendMessage
- func (o OptionsSendMessage) SetProtectContent(protect bool) OptionsSendMessage
- func (o OptionsSendMessage) SetReplyMarkup(replyMarkup any) OptionsSendMessage
- func (o OptionsSendMessage) SetReplyParameters(replyParameters ReplyParameters) OptionsSendMessage
- type OptionsSendPhoto
- func (o OptionsSendPhoto) SetBusinessConnectionID(businessConnectionID string) OptionsSendPhoto
- func (o OptionsSendPhoto) SetCaption(caption string) OptionsSendPhoto
- func (o OptionsSendPhoto) SetCaptionEntities(entities []MessageEntity) OptionsSendPhoto
- func (o OptionsSendPhoto) SetDisableNotification(disable bool) OptionsSendPhoto
- func (o OptionsSendPhoto) SetHasSpiler(hasSpoiler bool) OptionsSendPhoto
- func (o OptionsSendPhoto) SetMessageThreadID(messageThreadID int64) OptionsSendPhoto
- func (o OptionsSendPhoto) SetParseMode(parseMode ParseMode) OptionsSendPhoto
- func (o OptionsSendPhoto) SetProtectContent(protect bool) OptionsSendPhoto
- func (o OptionsSendPhoto) SetReplyMarkup(replyMarkup any) OptionsSendPhoto
- func (o OptionsSendPhoto) SetReplyParameters(replyParameters ReplyParameters) OptionsSendPhoto
- type OptionsSendPoll
- func (o OptionsSendPoll) SetAllowsMultipleAnswers(allowsMultipleAnswers bool) OptionsSendPoll
- func (o OptionsSendPoll) SetBusinessConnectionID(businessConnectionID string) OptionsSendPoll
- func (o OptionsSendPoll) SetCloseDate(closeDate int) OptionsSendPoll
- func (o OptionsSendPoll) SetCorrectOptionID(correctOptionID int) OptionsSendPoll
- func (o OptionsSendPoll) SetDisableNotification(disable bool) OptionsSendPoll
- func (o OptionsSendPoll) SetExplanation(explanation string) OptionsSendPoll
- func (o OptionsSendPoll) SetExplanationEntities(entities []MessageEntity) OptionsSendPoll
- func (o OptionsSendPoll) SetExplanationParseMode(explanationParseMode string) OptionsSendPoll
- func (o OptionsSendPoll) SetIsAnonymous(isAnonymous bool) OptionsSendPoll
- func (o OptionsSendPoll) SetIsClosed(isClosed bool) OptionsSendPoll
- func (o OptionsSendPoll) SetMessageThreadID(messageThreadID int64) OptionsSendPoll
- func (o OptionsSendPoll) SetOpenPeriod(openPeriod int) OptionsSendPoll
- func (o OptionsSendPoll) SetProtectContent(protect bool) OptionsSendPoll
- func (o OptionsSendPoll) SetReplyMarkup(replyMarkup any) OptionsSendPoll
- func (o OptionsSendPoll) SetReplyParameters(replyParameters ReplyParameters) OptionsSendPoll
- func (o OptionsSendPoll) SetType(newType string) OptionsSendPoll
- type OptionsSendSticker
- func (o OptionsSendSticker) SetBusinessConnectionID(businessConnectionID string) OptionsSendSticker
- func (o OptionsSendSticker) SetDisableNotification(disable bool) OptionsSendSticker
- func (o OptionsSendSticker) SetEmoji(emoji string) OptionsSendSticker
- func (o OptionsSendSticker) SetMessageThreadID(messageThreadID int64) OptionsSendSticker
- func (o OptionsSendSticker) SetProtectContent(protect bool) OptionsSendSticker
- func (o OptionsSendSticker) SetReplyMarkup(replyMarkup any) OptionsSendSticker
- func (o OptionsSendSticker) SetReplyParameters(replyParameters ReplyParameters) OptionsSendSticker
- type OptionsSendVenue
- func (o OptionsSendVenue) SetBusinessConnectionID(businessConnectionID string) OptionsSendVenue
- func (o OptionsSendVenue) SetDisableNotification(disable bool) OptionsSendVenue
- func (o OptionsSendVenue) SetFoursquareID(foursquareID string) OptionsSendVenue
- func (o OptionsSendVenue) SetFoursquareType(foursquareType string) OptionsSendVenue
- func (o OptionsSendVenue) SetGooglePlaceID(googlePlaceID string) OptionsSendVenue
- func (o OptionsSendVenue) SetGooglePlaceType(googlePlaceType string) OptionsSendVenue
- func (o OptionsSendVenue) SetMessageThreadID(messageThreadID int64) OptionsSendVenue
- func (o OptionsSendVenue) SetProtectContent(protect bool) OptionsSendVenue
- func (o OptionsSendVenue) SetReplyMarkup(replyMarkup any) OptionsSendVenue
- func (o OptionsSendVenue) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVenue
- type OptionsSendVideo
- func (o OptionsSendVideo) SetBusinessConnectionID(businessConnectionID string) OptionsSendVideo
- func (o OptionsSendVideo) SetCaption(caption string) OptionsSendVideo
- func (o OptionsSendVideo) SetCaptionEntities(entities []MessageEntity) OptionsSendVideo
- func (o OptionsSendVideo) SetDisableNotification(disable bool) OptionsSendVideo
- func (o OptionsSendVideo) SetDuration(duration int) OptionsSendVideo
- func (o OptionsSendVideo) SetHasSpiler(hasSpoiler bool) OptionsSendVideo
- func (o OptionsSendVideo) SetHeight(height int) OptionsSendVideo
- func (o OptionsSendVideo) SetMessageThreadID(messageThreadID int64) OptionsSendVideo
- func (o OptionsSendVideo) SetParseMode(parseMode ParseMode) OptionsSendVideo
- func (o OptionsSendVideo) SetProtectContent(protect bool) OptionsSendVideo
- func (o OptionsSendVideo) SetReplyMarkup(replyMarkup any) OptionsSendVideo
- func (o OptionsSendVideo) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVideo
- func (o OptionsSendVideo) SetSupportsStreaming(supportsStreaming bool) OptionsSendVideo
- func (o OptionsSendVideo) SetThumbnail(thumbnail any) OptionsSendVideo
- func (o OptionsSendVideo) SetWidth(width int) OptionsSendVideo
- type OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetBusinessConnectionID(businessConnectionID string) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetDisableNotification(disable bool) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetDuration(duration int) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetLength(length int) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetMessageThreadID(messageThreadID int64) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetProtectContent(protect bool) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetReplyMarkup(replyMarkup any) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVideoNote
- func (o OptionsSendVideoNote) SetThumbnail(thumbnail any) OptionsSendVideoNote
- type OptionsSendVoice
- func (o OptionsSendVoice) SetBusinessConnectionID(businessConnectionID string) OptionsSendVoice
- func (o OptionsSendVoice) SetCaption(caption string) OptionsSendVoice
- func (o OptionsSendVoice) SetCaptionEntities(entities []MessageEntity) OptionsSendVoice
- func (o OptionsSendVoice) SetDisableNotification(disable bool) OptionsSendVoice
- func (o OptionsSendVoice) SetDuration(duration int) OptionsSendVoice
- func (o OptionsSendVoice) SetMessageThreadID(messageThreadID int64) OptionsSendVoice
- func (o OptionsSendVoice) SetParseMode(parseMode ParseMode) OptionsSendVoice
- func (o OptionsSendVoice) SetProtectContent(protect bool) OptionsSendVoice
- func (o OptionsSendVoice) SetReplyMarkup(replyMarkup any) OptionsSendVoice
- func (o OptionsSendVoice) SetReplyParameters(replyParameters ReplyParameters) OptionsSendVoice
- type OptionsSetChatMenuButton
- type OptionsSetChatPermissions
- type OptionsSetCustomEmojiStickerSetThumbnail
- type OptionsSetGameScore
- func (o OptionsSetGameScore) SetDisableEditMessage(disableEditMessage bool) OptionsSetGameScore
- func (o OptionsSetGameScore) SetForce(force bool) OptionsSetGameScore
- func (o OptionsSetGameScore) SetIDs(chatID ChatID, messageID int64) OptionsSetGameScore
- func (o OptionsSetGameScore) SetInlineMessageID(inlineMessageID string) OptionsSetGameScore
- type OptionsSetMessageReaction
- type OptionsSetMyCommands
- type OptionsSetMyDefaultAdministratorRights
- type OptionsSetMyDescription
- type OptionsSetMyName
- type OptionsSetMyShortDescription
- type OptionsSetStickerMaskPosition
- type OptionsSetStickerSetThumbnail
- type OptionsSetWebhook
- func (o OptionsSetWebhook) SetAllowedUpdates(allowedUpdates []UpdateType) OptionsSetWebhook
- func (o OptionsSetWebhook) SetCertificate(filepath string) OptionsSetWebhook
- func (o OptionsSetWebhook) SetDropPendingUpdates(drop bool) OptionsSetWebhook
- func (o OptionsSetWebhook) SetIPAddress(address string) OptionsSetWebhook
- func (o OptionsSetWebhook) SetMaxConnections(maxConnections int) OptionsSetWebhook
- func (o OptionsSetWebhook) SetSecretToken(token string) OptionsSetWebhook
- type OptionsStopMessageLiveLocation
- func (o OptionsStopMessageLiveLocation) SetIDs(chatID ChatID, messageID int64) OptionsStopMessageLiveLocation
- func (o OptionsStopMessageLiveLocation) SetInlineMessageID(inlineMessageID string) OptionsStopMessageLiveLocation
- func (o OptionsStopMessageLiveLocation) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsStopMessageLiveLocation
- type OptionsStopPoll
- type OptionsUnpinChatMessage
- type OrderInfo
- type ParseMode
- type PhotoSize
- type Poll
- type PollAnswer
- type PollOption
- type PreCheckoutQuery
- type ProximityAlertTriggered
- type ReactionCount
- type ReactionType
- type ReplyKeyboardMarkup
- func (m ReplyKeyboardMarkup) SetInputFieldPlaceholder(placeholder string) ReplyKeyboardMarkup
- func (m ReplyKeyboardMarkup) SetIsPersistent(persistent bool) ReplyKeyboardMarkup
- func (m ReplyKeyboardMarkup) SetOneTimeKeyboard(oneTimeKeyboard bool) ReplyKeyboardMarkup
- func (m ReplyKeyboardMarkup) SetResizeKeyboard(resizeKeyboard bool) ReplyKeyboardMarkup
- func (m ReplyKeyboardMarkup) SetSelective(selective bool) ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type ReplyParameters
- func (p ReplyParameters) SetAllowSendingWithoutReply(allowSendingWithoutReply bool) ReplyParameters
- func (p ReplyParameters) SetChatID(chatID ChatID) ReplyParameters
- func (p ReplyParameters) SetQuote(quote string) ReplyParameters
- func (p ReplyParameters) SetQuoteEntities(entities []MessageEntity) ReplyParameters
- func (p ReplyParameters) SetQuoteParseMode(parseMode ParseMode) ReplyParameters
- func (p ReplyParameters) SetQuotePosition(position int) ReplyParameters
- type SentWebAppMessage
- type SharedUser
- type ShippingAddress
- type ShippingOption
- type ShippingQuery
- type Sticker
- type StickerFormat
- type StickerSet
- type StickerType
- type Story
- type SuccessfulPayment
- type SwitchInlineQueryChosenChat
- func (c SwitchInlineQueryChosenChat) SetAllowBotChats(allow bool) SwitchInlineQueryChosenChat
- func (c SwitchInlineQueryChosenChat) SetAllowChannelChats(allow bool) SwitchInlineQueryChosenChat
- func (c SwitchInlineQueryChosenChat) SetAllowGroupChats(allow bool) SwitchInlineQueryChosenChat
- func (c SwitchInlineQueryChosenChat) SetAllowUserChats(allow bool) SwitchInlineQueryChosenChat
- func (c SwitchInlineQueryChosenChat) SetQuery(query string) SwitchInlineQueryChosenChat
- type TextQuote
- type ThumbnailMimeType
- type Update
- func (u *Update) GetChannelPost() (post *Message, edited bool)
- func (u *Update) GetFrom() *User
- func (u *Update) GetMessage() (message *Message, edited bool)
- func (u *Update) HasCallbackQuery() bool
- func (u *Update) HasChannelPost() bool
- func (u *Update) HasChatJoinRequest() bool
- func (u *Update) HasChatMember() bool
- func (u *Update) HasChosenInlineResult() bool
- func (u *Update) HasEditedChannelPost() bool
- func (u *Update) HasEditedMessage() bool
- func (u *Update) HasInlineQuery() bool
- func (u *Update) HasMessage() bool
- func (u *Update) HasMyChatMember() bool
- func (u *Update) HasPoll() bool
- func (u *Update) HasPollAnswer() bool
- func (u *Update) HasPreCheckoutQuery() bool
- func (u *Update) HasShippingQuery() bool
- type UpdateType
- type User
- type UserChatBoosts
- type UserProfilePhotos
- type UsersShared
- type Venue
- type Video
- type VideoChatEnded
- type VideoChatParticipantsInvited
- type VideoChatScheduled
- type VideoChatStarted
- type VideoMimeType
- type VideoNote
- type Voice
- type WebAppData
- type WebAppInfo
- type WebhookInfo
- type WriteAccessAllowed
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
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
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
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
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
type Bot ¶
type Bot struct { Verbose bool // print verbose log messages or not // contains filtered or unexported fields }
Bot struct
func (*Bot) AddCommandHandler ¶
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.
func (*Bot) AnswerCallbackQuery ¶
func (b *Bot) AnswerCallbackQuery(callbackQueryID string, options OptionsAnswerCallbackQuery) (result APIResponse[bool])
AnswerCallbackQuery answers a callback query.
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.
func (*Bot) AnswerPreCheckoutQuery ¶
func (b *Bot) AnswerPreCheckoutQuery(preCheckoutQueryID string, ok bool, errorMessage *string) (result APIResponse[bool])
AnswerPreCheckoutQuery answers a pre-checkout query.
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.
func (*Bot) AnswerWebAppQuery ¶
func (b *Bot) AnswerWebAppQuery(webAppQueryID string, res InlineQueryResult) (result APIResponse[SentWebAppMessage])
AnswerWebAppQuery answers a web app's query
func (*Bot) ApproveChatJoinRequest ¶
func (b *Bot) ApproveChatJoinRequest(chatID ChatID, userID int64) (result APIResponse[bool])
ApproveChatJoinRequest approves chat join request.
func (*Bot) BanChatMember ¶
func (b *Bot) BanChatMember(chatID ChatID, userID int64, options OptionsBanChatMember) (result APIResponse[bool])
BanChatMember bans a chat member.
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.
func (*Bot) Close ¶
func (b *Bot) Close() (result APIResponse[bool])
Close closes this bot from local Bot API server.
func (*Bot) CloseForumTopic ¶
func (b *Bot) CloseForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])
CloseForumTopic closes a forum topic.
func (*Bot) CloseGeneralForumTopic ¶
func (b *Bot) CloseGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
CloseGeneralForumTopic closes general forum topic.
func (*Bot) CopyMessage ¶
func (b *Bot) CopyMessage(chatID, fromChatID ChatID, messageID int64, options OptionsCopyMessage) (result APIResponse[MessageID])
CopyMessage copies a message.
func (*Bot) CopyMessages ¶
func (b *Bot) CopyMessages(chatID, fromChatID ChatID, messageIDs []int64, options OptionsCopyMessages) (result APIResponse[[]MessageID])
CopyMessages copies messages.
func (*Bot) CreateChatInviteLink ¶
func (b *Bot) CreateChatInviteLink(chatID ChatID, options OptionsCreateChatInviteLink) (result APIResponse[ChatInviteLink])
CreateChatInviteLink creates a chat invite link.
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.
func (*Bot) CreateInvoiceLink ¶
func (b *Bot) CreateInvoiceLink(title, description, payload, providerToken, currency string, prices []LabeledPrice, options OptionsCreateInvoiceLink) (result APIResponse[string])
CreateInvoiceLink creates a link for an invoice.
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.
func (*Bot) DeclineChatJoinRequest ¶
func (b *Bot) DeclineChatJoinRequest(chatID ChatID, userID int64) (result APIResponse[bool])
DeclineChatJoinRequest declines chat join request.
func (*Bot) DeleteChatPhoto ¶
func (b *Bot) DeleteChatPhoto(chatID ChatID) (result APIResponse[bool])
DeleteChatPhoto deletes a chat photo.
func (*Bot) DeleteChatStickerSet ¶
func (b *Bot) DeleteChatStickerSet(chatID ChatID) (result APIResponse[bool])
DeleteChatStickerSet deletes a chat sticker set.
func (*Bot) DeleteForumTopic ¶
func (b *Bot) DeleteForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])
DeleteForumTopic deletes a forum topic.
func (*Bot) DeleteMessage ¶
func (b *Bot) DeleteMessage(chatID ChatID, messageID int64) (result APIResponse[bool])
DeleteMessage deletes a message.
func (*Bot) DeleteMessages ¶
func (b *Bot) DeleteMessages(chatID ChatID, messageIDs []int64) (result APIResponse[bool])
DeleteMessages deletes messages.
func (*Bot) DeleteMyCommands ¶
func (b *Bot) DeleteMyCommands(options OptionsDeleteMyCommands) (result APIResponse[bool])
DeleteMyCommands deletes commands of this bot.
func (*Bot) DeleteStickerFromSet ¶
func (b *Bot) DeleteStickerFromSet(sticker string) (result APIResponse[bool])
DeleteStickerFromSet deletes a sticker from set.
func (*Bot) DeleteStickerSet ¶
func (b *Bot) DeleteStickerSet(name string) (result APIResponse[bool])
DeleteStickerSet deletes a sticker set.
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)
func (*Bot) EditChatInviteLink ¶
func (b *Bot) EditChatInviteLink(chatID ChatID, inviteLink string, options OptionsCreateChatInviteLink) (result APIResponse[ChatInviteLink])
EditChatInviteLink edits a chat invite link.
func (*Bot) EditForumTopic ¶
func (b *Bot) EditForumTopic(chatID ChatID, messageThreadID int64, options OptionsEditForumTopic) (result APIResponse[bool])
EditForumTopic edits a forum topic.
func (*Bot) EditGeneralForumTopic ¶
func (b *Bot) EditGeneralForumTopic(chatID ChatID, name string) (result APIResponse[bool])
EditGeneralForumTopic edites general forum topic.
func (*Bot) EditMessageCaption ¶
func (b *Bot) EditMessageCaption(options OptionsEditMessageCaption) (result APIResponseMessageOrBool)
EditMessageCaption edits caption of a message.
func (*Bot) EditMessageLiveLocation ¶
func (b *Bot) EditMessageLiveLocation(latitude, longitude float32, options OptionsEditMessageLiveLocation) (result APIResponseMessageOrBool)
EditMessageLiveLocation edits live location of a message.
func (*Bot) EditMessageMedia ¶
func (b *Bot) EditMessageMedia(media InputMedia, options OptionsEditMessageMedia) (result APIResponseMessageOrBool)
EditMessageMedia edites a media message.
func (*Bot) EditMessageReplyMarkup ¶
func (b *Bot) EditMessageReplyMarkup(options OptionsEditMessageReplyMarkup) (result APIResponseMessageOrBool)
EditMessageReplyMarkup edits reply markup of a message.
func (*Bot) EditMessageText ¶
func (b *Bot) EditMessageText(text string, options OptionsEditMessageText) (result APIResponseMessageOrBool)
EditMessageText edits text of a message.
func (*Bot) ExportChatInviteLink ¶
func (b *Bot) ExportChatInviteLink(chatID ChatID) (result APIResponse[string])
ExportChatInviteLink exports a chat invite link.
func (*Bot) ForwardMessage ¶
func (b *Bot) ForwardMessage(chatID, fromChatID ChatID, messageID int64, options OptionsForwardMessage) (result APIResponse[Message])
ForwardMessage forwards a message.
func (*Bot) ForwardMessages ¶
func (b *Bot) ForwardMessages(chatID, fromChatID ChatID, messageIDs []int64, options OptionsForwardMessage) (result APIResponse[[]MessageID])
ForwardMessages forwards messages.
func (*Bot) GetBusinessConnection ¶ added in v0.10.6
func (b *Bot) GetBusinessConnection(businessConnectionID string) (result APIResponse[BusinessConnection])
GetBusinessConnection gets a business connection.
func (*Bot) GetChat ¶
func (b *Bot) GetChat(chatID ChatID) (result APIResponse[Chat])
GetChat gets a chat.
func (*Bot) GetChatAdministrators ¶
func (b *Bot) GetChatAdministrators(chatID ChatID) (result APIResponse[[]ChatMember])
GetChatAdministrators gets chat administrators.
func (*Bot) GetChatMember ¶
func (b *Bot) GetChatMember(chatID ChatID, userID int64) (result APIResponse[ChatMember])
GetChatMember gets a chat member.
func (*Bot) GetChatMemberCount ¶
func (b *Bot) GetChatMemberCount(chatID ChatID) (result APIResponse[int])
GetChatMemberCount gets chat members' count.
func (*Bot) GetChatMenuButton ¶
func (b *Bot) GetChatMenuButton(options OptionsGetChatMenuButton) (result APIResponse[MenuButton])
GetChatMenuButton fetches current chat menu button.
func (*Bot) GetCustomEmojiStickers ¶
func (b *Bot) GetCustomEmojiStickers(customEmojiIDs []string) (result APIResponse[[]Sticker])
GetCustomEmojiStickers gets custom emoji stickers.
func (*Bot) GetFile ¶
func (b *Bot) GetFile(fileID string) (result APIResponse[File])
GetFile gets file info and prepare for download.
func (*Bot) GetFileURL ¶
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.
func (*Bot) GetMyCommands ¶
func (b *Bot) GetMyCommands(options OptionsGetMyCommands) (result APIResponse[[]BotCommand])
GetMyCommands fetches commands of this bot.
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.
func (*Bot) GetMyName ¶
func (b *Bot) GetMyName(options OptionsGetMyName) (result APIResponse[BotName])
GetMyName fetches the bot's name.
func (*Bot) GetMyShortDescription ¶
func (b *Bot) GetMyShortDescription(options OptionsGetMyShortDescription) (result APIResponse[BotShortDescription])
GetMyShortDescription gets the bot's short description.
func (*Bot) GetStickerSet ¶
func (b *Bot) GetStickerSet(name string) (result APIResponse[StickerSet])
GetStickerSet gets a sticker set.
func (*Bot) GetUpdates ¶
func (b *Bot) GetUpdates(options OptionsGetUpdates) (result APIResponse[[]Update])
GetUpdates retrieves updates from Telegram bot API.
func (*Bot) GetUserChatBoosts ¶
func (b *Bot) GetUserChatBoosts(chatID ChatID, userID int64) (result APIResponse[UserChatBoosts])
GetUserChatBoosts gets boosts of a user.
func (*Bot) GetUserProfilePhotos ¶
func (b *Bot) GetUserProfilePhotos(userID int64, options OptionsGetUserProfilePhotos) (result APIResponse[UserProfilePhotos])
GetUserProfilePhotos gets user profile photos.
func (*Bot) GetWebhookInfo ¶
func (b *Bot) GetWebhookInfo() (result APIResponse[WebhookInfo])
GetWebhookInfo gets webhook info for this bot.
func (*Bot) HideGeneralForumTopic ¶
func (b *Bot) HideGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
HideGeneralForumTopic hides general forum topic.
func (*Bot) LeaveChat ¶
func (b *Bot) LeaveChat(chatID ChatID) (result APIResponse[bool])
LeaveChat leaves a chat.
func (*Bot) LogOut ¶
func (b *Bot) LogOut() (result APIResponse[bool])
LogOut logs this bot from cloud Bot API server.
func (*Bot) PinChatMessage ¶
func (b *Bot) PinChatMessage(chatID ChatID, messageID int64, options OptionsPinChatMessage) (result APIResponse[bool])
PinChatMessage pins a chat message.
func (*Bot) PromoteChatMember ¶
func (b *Bot) PromoteChatMember(chatID ChatID, userID int64, options OptionsPromoteChatMember) (result APIResponse[bool])
PromoteChatMember promotes a chat member.
func (*Bot) ReopenForumTopic ¶
func (b *Bot) ReopenForumTopic(chatID ChatID, messageThreadID int64) (result APIResponse[bool])
ReopenForumTopic reopens a forum topic.
func (*Bot) ReopenGeneralForumTopic ¶
func (b *Bot) ReopenGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
ReopenGeneralForumTopic reopens general forum topic.
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.
func (*Bot) RestrictChatMember ¶
func (b *Bot) RestrictChatMember(chatID ChatID, userID int64, permissions ChatPermissions, options OptionsRestrictChatMember) (result APIResponse[bool])
RestrictChatMember restricts a chat member.
func (*Bot) RevokeChatInviteLink ¶
func (b *Bot) RevokeChatInviteLink(chatID ChatID, inviteLink string) (result APIResponse[ChatInviteLink])
RevokeChatInviteLink revoks a chat invite link.
func (*Bot) SendAnimation ¶
func (b *Bot) SendAnimation(chatID ChatID, animation InputFile, options OptionsSendAnimation) (result APIResponse[Message])
SendAnimation sends an animation.
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)
func (*Bot) SendChatAction ¶
func (b *Bot) SendChatAction(chatID ChatID, action ChatAction, options OptionsSendChatAction) (result APIResponse[bool])
SendChatAction sends chat actions.
func (*Bot) SendContact ¶
func (b *Bot) SendContact(chatID ChatID, phoneNumber, firstName string, options OptionsSendContact) (result APIResponse[Message])
SendContact sends contacts.
func (*Bot) SendDice ¶
func (b *Bot) SendDice(chatID ChatID, options OptionsSendDice) (result APIResponse[Message])
SendDice sends a random dice.
func (*Bot) SendDocument ¶
func (b *Bot) SendDocument(chatID ChatID, document InputFile, options OptionsSendDocument) (result APIResponse[Message])
SendDocument sends a general file.
func (*Bot) SendGame ¶
func (b *Bot) SendGame(chatID ChatID, gameShortName string, options OptionsSendGame) (result APIResponse[Message])
SendGame sends a game.
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.
func (*Bot) SendLocation ¶
func (b *Bot) SendLocation(chatID ChatID, latitude, longitude float32, options OptionsSendLocation) (result APIResponse[Message])
SendLocation sends locations.
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.
func (*Bot) SendMessage ¶
func (b *Bot) SendMessage(chatID ChatID, text string, options OptionsSendMessage) (result APIResponse[Message])
SendMessage sends a message to the bot.
func (*Bot) SendPhoto ¶
func (b *Bot) SendPhoto(chatID ChatID, photo InputFile, options OptionsSendPhoto) (result APIResponse[Message])
SendPhoto sends a photo.
func (*Bot) SendPoll ¶
func (b *Bot) SendPoll(chatID ChatID, question string, pollOptions []string, options OptionsSendPoll) (result APIResponse[Message])
SendPoll sends a poll.
func (*Bot) SendSticker ¶
func (b *Bot) SendSticker(chatID ChatID, sticker InputFile, options OptionsSendSticker) (result APIResponse[Message])
SendSticker sends a sticker.
func (*Bot) SendVenue ¶
func (b *Bot) SendVenue(chatID ChatID, latitude, longitude float32, title, address string, options OptionsSendVenue) (result APIResponse[Message])
SendVenue sends venues.
func (*Bot) SendVideo ¶
func (b *Bot) SendVideo(chatID ChatID, video InputFile, options OptionsSendVideo) (result APIResponse[Message])
SendVideo sends a video file.
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)
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))
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.
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.
func (*Bot) SetChatPermissions ¶
func (b *Bot) SetChatPermissions(chatID ChatID, permissions ChatPermissions, options OptionsSetChatPermissions) (result APIResponse[bool])
SetChatPermissions sets permissions of a chat.
func (*Bot) SetChatPhoto ¶
func (b *Bot) SetChatPhoto(chatID ChatID, photo InputFile) (result APIResponse[bool])
SetChatPhoto sets a chat photo.
func (*Bot) SetChatStickerSet ¶
func (b *Bot) SetChatStickerSet(chatID ChatID, stickerSetName string) (result APIResponse[bool])
SetChatStickerSet sets a chat sticker set.
func (*Bot) SetChatTitle ¶
func (b *Bot) SetChatTitle(chatID ChatID, title string) (result APIResponse[bool])
SetChatTitle sets a chat title.
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.
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 ¶
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.
func (*Bot) SetMyCommands ¶
func (b *Bot) SetMyCommands(commands []BotCommand, options OptionsSetMyCommands) (result APIResponse[bool])
SetMyCommands sets commands of this bot.
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.
func (*Bot) SetMyName ¶
func (b *Bot) SetMyName(name string, options OptionsSetMyName) (result APIResponse[bool])
SetMyName changes the bot's name.
func (*Bot) SetMyShortDescription ¶
func (b *Bot) SetMyShortDescription(options OptionsSetMyShortDescription) (result APIResponse[bool])
SetMyShortDescription sets the bot's short description.
func (*Bot) SetNoMatchingCommandHandler ¶
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 ¶
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.
func (*Bot) SetStickerKeywords ¶
func (b *Bot) SetStickerKeywords(sticker string, keywords []string) (result APIResponse[bool])
SetStickerKeywords sets the keywords of sticker.
func (*Bot) SetStickerMaskPosition ¶
func (b *Bot) SetStickerMaskPosition(sticker string, options OptionsSetStickerMaskPosition) (result APIResponse[bool])
SetStickerMaskPosition sets mask position of sticker.
func (*Bot) SetStickerPositionInSet ¶
func (b *Bot) SetStickerPositionInSet(sticker string, position int) (result APIResponse[bool])
SetStickerPositionInSet sets sticker position in set.
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.
func (*Bot) SetStickerSetTitle ¶
func (b *Bot) SetStickerSetTitle(name, title string) (result APIResponse[bool])
SetStickerSetTitle sets the title of sticker set.
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.
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.
func (*Bot) StopMessageLiveLocation ¶
func (b *Bot) StopMessageLiveLocation(options OptionsStopMessageLiveLocation) (result APIResponseMessageOrBool)
StopMessageLiveLocation stops live location of a message.
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.
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.
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.
func (*Bot) UnhideGeneralForumTopic ¶
func (b *Bot) UnhideGeneralForumTopic(chatID ChatID) (result APIResponse[bool])
UnhideGeneralForumTopic unhides general forum topic.
func (*Bot) UnpinAllChatMessages ¶
func (b *Bot) UnpinAllChatMessages(chatID ChatID) (result APIResponse[bool])
UnpinAllChatMessages unpins all chat messages.
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) UnpinAllGeneralForumTopicMessages ¶
func (b *Bot) UnpinAllGeneralForumTopicMessages(chatID ChatID) (result APIResponse[bool])
https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
func (*Bot) UnpinChatMessage ¶
func (b *Bot) UnpinChatMessage(chatID ChatID, options OptionsUnpinChatMessage) (result APIResponse[bool])
UnpinChatMessage unpins a chat message.
func (*Bot) UploadStickerFile ¶
func (b *Bot) UploadStickerFile(userID int64, sticker InputFile, stickerFormat StickerFormat) (result APIResponse[File])
UploadStickerFile uploads a sticker file.
type BotCommand ¶
BotCommand is a struct of a bot command
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
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
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
type BotName ¶
type BotName struct {
Name string `json:"name"`
}
BotName is a struct of a bot's name
type BotShortDescription ¶
type BotShortDescription struct {
ShortDescription string `json:"short_description"`
}
BotShortDescription is a struct of a bot's short description
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
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
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
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
type BusinessOpeningHours ¶ added in v0.10.6
type BusinessOpeningHours struct { TimeZoneName string `json:"time_zone_name"` OpeningHours []BusinessOpeningHoursInterval `json:"opening_hours"` }
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 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
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
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
NOTE: Can be generated with NewChatAdministratorRights() function in types_helper.go
https://core.telegram.org/bots/api#chatadministratorrights
func NewChatAdministratorRights ¶ added in v0.10.7
func NewChatAdministratorRights(isAnonymous, canManageChat, canDeleteMessages, canManageVideoChats, canRestrictMembers, canPromoteMembers, canChangeInfo, canInviteUsers, canPostStories, canEditStories, canDeleteStories bool) ChatAdministratorRights
NewChatAdministratorRights returns a new ChatAdministratorRights.
func (ChatAdministratorRights) SetCanEditMessages ¶ added in v0.10.7
func (r ChatAdministratorRights) SetCanEditMessages(canEditMessages bool) ChatAdministratorRights
SetCanEditMessages sets the `can_edit_messages` value of ChatAdministratorRights.
func (ChatAdministratorRights) SetCanManageTopics ¶ added in v0.10.7
func (r ChatAdministratorRights) SetCanManageTopics(canManageTopics bool) ChatAdministratorRights
SetCanManageTopics sets the `can_manage_topics` value of ChatAdministratorRights.
func (ChatAdministratorRights) SetCanPinMessages ¶ added in v0.10.7
func (r ChatAdministratorRights) SetCanPinMessages(canPinMessages bool) ChatAdministratorRights
SetCanPinMessages sets the `can_pin_messages` value of ChatAdministratorRights.
func (ChatAdministratorRights) SetCanPostMessages ¶ added in v0.10.7
func (r ChatAdministratorRights) SetCanPostMessages(canPostMessages bool) ChatAdministratorRights
SetCanPostMessages sets the `can_post_messages` value of ChatAdministratorRights.
type 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
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
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
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 ¶
ChatBoostUpdated is a struct for an added or changed boost
type ChatID ¶
type ChatID any
ChatID can be `Message.Chat.Id`, or target channel name (in string, eg. "@channelusername")
type ChatInviteLink ¶
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
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
type ChatLocation ¶
ChatLocation is a struct of chat location
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
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.
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.
type ChatMemberLeft ¶
ChatMemberLeft is a struct of a chat member who left.
type ChatMemberMember ¶
type ChatMemberMember struct { Status string `json:"status"` // = "member" User User `json:"user"` }
ChatMemberMember is a struct of a chat member.
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.
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
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
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
NOTE: Can be generated with NewChatPermissions() function in types_helper.go
https://core.telegram.org/bots/api#chatpermissions
func NewChatPermissions ¶ added in v0.10.7
func NewChatPermissions() ChatPermissions
NewChatPermissions returns a new ChatPermissions. (all permissions are false)
func (ChatPermissions) SetCanAddWebPagePreviews ¶ added in v0.10.7
func (p ChatPermissions) SetCanAddWebPagePreviews(can bool) ChatPermissions
SetCanAddWebPagePreviews sets the `can_add_web_page_previews` value of ChatPermissions.
func (ChatPermissions) SetCanChangeInfo ¶ added in v0.10.7
func (p ChatPermissions) SetCanChangeInfo(can bool) ChatPermissions
SetCanChangeInfo sets the `can_change_info` value of ChatPermissions.
func (ChatPermissions) SetCanInviteUsers ¶ added in v0.10.7
func (p ChatPermissions) SetCanInviteUsers(can bool) ChatPermissions
SetCanInviteUsers sets the `can_invite_users` value of ChatPermissions.
func (ChatPermissions) SetCanManageTopics ¶ added in v0.10.7
func (p ChatPermissions) SetCanManageTopics(can bool) ChatPermissions
SetCanManageTopics sets the `can_manage_topics` value of ChatPermissions.
func (ChatPermissions) SetCanPinMessages ¶ added in v0.10.7
func (p ChatPermissions) SetCanPinMessages(can bool) ChatPermissions
SetCanPinMessages sets the `can_pin_messages` value of ChatPermissions.
func (ChatPermissions) SetCanSendAudios ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendAudios(can bool) ChatPermissions
SetCanSendAudios sets the `can_send_audios` value of ChatPermissions.
func (ChatPermissions) SetCanSendDocuments ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendDocuments(can bool) ChatPermissions
SetCanSendDocuments sets the `can_send_documents` value of ChatPermissions.
func (ChatPermissions) SetCanSendMessages ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendMessages(can bool) ChatPermissions
SetCanSendMessages sets the `can_send_messages` value of ChatPermissions.
func (ChatPermissions) SetCanSendOtherMessages ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendOtherMessages(can bool) ChatPermissions
SetCanSendOtherMessages sets the `can_send_other_messages` value of ChatPermissions.
func (ChatPermissions) SetCanSendPhotos ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendPhotos(can bool) ChatPermissions
SetCanSendPhotos sets the `can_send_photos` value of ChatPermissions.
func (ChatPermissions) SetCanSendPolls ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendPolls(can bool) ChatPermissions
SetCanSendPolls sets the `can_send_polls` value of ChatPermissions.
func (ChatPermissions) SetCanSendVideoNotes ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendVideoNotes(can bool) ChatPermissions
SetCanSendVideoNotes sets the `can_send_video_notes` value of ChatPermissions.
func (ChatPermissions) SetCanSendVideos ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendVideos(can bool) ChatPermissions
SetCanSendVideos sets the `can_send_videos` value of ChatPermissions.
func (ChatPermissions) SetCanSendVoiceNotes ¶ added in v0.10.7
func (p ChatPermissions) SetCanSendVoiceNotes(can bool) ChatPermissions
SetCanSendVoiceNotes sets the `can_send_voice_notes` value of ChatPermissions.
type ChatPhoto ¶
type ChatPhoto struct { SmallFileID string `json:"small_file_id"` SmallFileUniqueID string `json:"small_file_unique_id"` BigFileID string `json:"big_file_id"` BigFileUniqueID string `json:"big_file_unique_id"` }
ChatPhoto is a struct for a chat photo
type ChatShared ¶
type ChatShared struct {}
ChatShared is a struct for a chat which shared the message.
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
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
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
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
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
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
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
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.
type ForumTopicClosed ¶
type ForumTopicClosed struct{}
ForumTopicClosed is a struct for a closed forum topic in the chat.
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.
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.
type ForumTopicReopened ¶
type ForumTopicReopened struct{}
ForumTopicReopened is a struct for a reopened forum topic in the chat.
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
type GameHighScore ¶
type GameHighScore struct { Position int `json:"position"` User User `json:"user"` Score int `json:"score"` }
GameHighScore is a struct of GameHighScore
type GeneralForumTopicHidden ¶
type GeneralForumTopicHidden struct{}
GeneralForumTopicHidden is a struct for a hidden general forum topic in the chat.
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
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
type GiveawayCreated ¶
type GiveawayCreated struct{}
GiveawayCreated struct for service message about the creation of giveaway
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
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
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
NOTE: Can be generated with NewInlineKeyboardButton() function in types_helper.go
https://core.telegram.org/bots/api#inlinekeyboardbutton
func NewInlineKeyboardButton ¶ added in v0.10.7
func NewInlineKeyboardButton(text string) InlineKeyboardButton
NewInlineKeyboardButton returns a new InlineKeyboardButton with given text.
func NewInlineKeyboardButtonsAsColumnsWithCallbackData ¶
func NewInlineKeyboardButtonsAsColumnsWithCallbackData(values map[string]string) []InlineKeyboardButton
NewInlineKeyboardButtonsAsColumnsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons (as columns) with callback data
func NewInlineKeyboardButtonsWithCallbackData ¶
func NewInlineKeyboardButtonsWithCallbackData(values map[string]string) []InlineKeyboardButton
NewInlineKeyboardButtonsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons with callback data
func NewInlineKeyboardButtonsWithSwitchInlineQuery ¶
func NewInlineKeyboardButtonsWithSwitchInlineQuery(values map[string]string) []InlineKeyboardButton
NewInlineKeyboardButtonsWithSwitchInlineQuery is a helper function for generating an array of InlineKeyboardButtons with switch inline query
func NewInlineKeyboardButtonsWithURL ¶
func NewInlineKeyboardButtonsWithURL(values map[string]string) []InlineKeyboardButton
NewInlineKeyboardButtonsWithURL is a helper function for generating an array of InlineKeyboardButtons with urls
func (InlineKeyboardButton) SetCallbackData ¶ added in v0.10.7
func (b InlineKeyboardButton) SetCallbackData(data string) InlineKeyboardButton
SetCallbackData sets the `callback_data` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetCallbackGame ¶ added in v0.10.7
func (b InlineKeyboardButton) SetCallbackGame(callbackGame CallbackGame) InlineKeyboardButton
SetCallbackGame sets the `callback_game` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetLoginURL ¶ added in v0.10.7
func (b InlineKeyboardButton) SetLoginURL(loginURL LoginURL) InlineKeyboardButton
SetLoginURL sets the `login_url` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetPay ¶ added in v0.10.7
func (b InlineKeyboardButton) SetPay(pay bool) InlineKeyboardButton
SetPay sets the `pay` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetSwichInlineQuery ¶ added in v0.10.7
func (b InlineKeyboardButton) SetSwichInlineQuery(query string) InlineKeyboardButton
SetSwichInlineQuery sets the `switch_inline_query` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetSwichInlineQueryChosenChat ¶ added in v0.10.7
func (b InlineKeyboardButton) SetSwichInlineQueryChosenChat(chosenChat SwitchInlineQueryChosenChat) InlineKeyboardButton
SetSwichInlineQueryChosenChat sets the `switch_inline_query_chosen_chat` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetSwichInlineQueryCurrentChat ¶ added in v0.10.7
func (b InlineKeyboardButton) SetSwichInlineQueryCurrentChat(query string) InlineKeyboardButton
SetSwichInlineQueryCurrentChat sets the `switch_inline_query_current_chat` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetURL ¶ added in v0.10.7
func (b InlineKeyboardButton) SetURL(url string) InlineKeyboardButton
SetURL sets the `url` value of InlineKeyboardButton.
func (InlineKeyboardButton) SetWebApp ¶ added in v0.10.7
func (b InlineKeyboardButton) SetWebApp(webApp WebAppInfo) InlineKeyboardButton
SetWebApp sets the `web_app` value of InlineKeyboardButton.
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard"`
}
InlineKeyboardMarkup is a struct for InlineKeyboardMarkup
NOTE: Can be generated with NewInlineKeyboardMarkup() function in types_helper.go
https://core.telegram.org/bots/api#inlinekeyboardmarkup
func NewInlineKeyboardMarkup ¶ added in v0.10.7
func NewInlineKeyboardMarkup(keyboard [][]InlineKeyboardButton) InlineKeyboardMarkup
NewInlineKeyboardMarkup returns a new InlineKeyboardMarkup with given rows of keyboard buttons.
type InlineQuery ¶
type InlineQuery struct { ID string `json:"id"` From User `json:"from"` Query string `json:"query"` Offset string `json:"offset"` ChatType *string `json:"chat_type,omitempty"` Location *Location `json:"location,omitempty"` }
InlineQuery is a struct of an inline query
type InlineQueryResult ¶
type InlineQueryResult struct { Type InlineQueryResultType `json:"type"` ID string `json:"id"` }
InlineQueryResult is a struct for inline query results
NOTE: Can be generated with NewInlineQueryResult*() functions in types_helper.go
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.
func (InlineQueryResultArticle) SetDescription ¶ added in v0.10.7
func (r InlineQueryResultArticle) SetDescription(description string) InlineQueryResultArticle
SetDescription sets the `description` value of InlineQueryResultArticle.
func (InlineQueryResultArticle) SetHideURL ¶ added in v0.10.7
func (r InlineQueryResultArticle) SetHideURL(hideURL bool) InlineQueryResultArticle
SetHideURL sets the `hide_url` value of InlineQueryResultArticle.
func (InlineQueryResultArticle) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultArticle) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultArticle
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultArticle.
func (InlineQueryResultArticle) SetThumbnailHeight ¶ added in v0.10.7
func (r InlineQueryResultArticle) SetThumbnailHeight(height int) InlineQueryResultArticle
SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultArticle.
func (InlineQueryResultArticle) SetThumbnailURL ¶ added in v0.10.7
func (r InlineQueryResultArticle) SetThumbnailURL(thumbnailURL string) InlineQueryResultArticle
SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultArticle.
func (InlineQueryResultArticle) SetThumbnailWidth ¶ added in v0.10.7
func (r InlineQueryResultArticle) SetThumbnailWidth(width int) InlineQueryResultArticle
SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultArticle.
func (InlineQueryResultArticle) SetURL ¶ added in v0.10.7
func (r InlineQueryResultArticle) SetURL(url string) InlineQueryResultArticle
SetURL sets the `url` value of 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.
func (InlineQueryResultAudio) SetAudioDuration ¶ added in v0.10.7
func (r InlineQueryResultAudio) SetAudioDuration(duration int) InlineQueryResultAudio
SetAudioDuration sets the `audio_duration` value of InlineQueryResultAudio.
func (InlineQueryResultAudio) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultAudio) SetCaption(caption string) InlineQueryResultAudio
SetCaption sets the `caption` value of InlineQueryResultAudio.
func (InlineQueryResultAudio) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultAudio) SetCaptionEntities(entities []MessageEntity) InlineQueryResultAudio
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultAudio.
func (InlineQueryResultAudio) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultAudio) SetInputMessageContent(content InputMessageContent) InlineQueryResultAudio
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultAudio.
func (InlineQueryResultAudio) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultAudio) SetParseMode(parseMode ParseMode) InlineQueryResultAudio
SetParseMode sets the `parse_mode` value of InlineQueryResultAudio.
func (InlineQueryResultAudio) SetPerformer ¶ added in v0.10.7
func (r InlineQueryResultAudio) SetPerformer(performer string) InlineQueryResultAudio
SetPerformer sets the `performer` value of InlineQueryResultAudio.
func (InlineQueryResultAudio) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultAudio) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultAudio
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultAudio.
type InlineQueryResultCachedAudio ¶
type InlineQueryResultCachedAudio struct { InlineQueryResult AudioFileID string `json:"audio_file_id"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedAudio is a struct of InlineQueryResultCachedAudio
func NewInlineQueryResultCachedAudio ¶
func NewInlineQueryResultCachedAudio(audioFileID string) (newAudio InlineQueryResultCachedAudio, generatedID *string)
NewInlineQueryResultCachedAudio is a helper function for generating a new InlineQueryResultCachedAudio.
https://core.telegram.org/bots/api#inlinequeryresultcachedaudio
func (InlineQueryResultCachedAudio) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultCachedAudio) SetCaption(caption string) InlineQueryResultCachedAudio
SetCaption sets the `caption` value of InlineQueryResultCachedAudio.
func (InlineQueryResultCachedAudio) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultCachedAudio) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedAudio
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedAudio.
func (InlineQueryResultCachedAudio) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedAudio) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedAudio
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedAudio.
func (InlineQueryResultCachedAudio) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultCachedAudio) SetParseMode(parseMode ParseMode) InlineQueryResultCachedAudio
SetParseMode sets the `parse_mode` value of InlineQueryResultCachedAudio.
func (InlineQueryResultCachedAudio) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedAudio) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedAudio
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedAudio.
type InlineQueryResultCachedDocument ¶
type InlineQueryResultCachedDocument struct { InlineQueryResult Title string `json:"title"` DocumentFileID string `json:"document_file_id"` Description *string `json:"description,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedDocument is a struct of InlineQueryResultCachedDocument
func NewInlineQueryResultCachedDocument ¶
func NewInlineQueryResultCachedDocument(title, documentFileID string) (newDocument InlineQueryResultCachedDocument, generatedID *string)
NewInlineQueryResultCachedDocument is a helper function for generating a new InlineQueryResultCachedDocument.
https://core.telegram.org/bots/api#inlinequeryresultcacheddocument
func (InlineQueryResultCachedDocument) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultCachedDocument) SetCaption(caption string) InlineQueryResultCachedDocument
SetCaption sets the `caption` value of InlineQueryResultCachedDocument.
func (InlineQueryResultCachedDocument) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultCachedDocument) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedDocument
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedDocument.
func (InlineQueryResultCachedDocument) SetDescription ¶ added in v0.10.7
func (r InlineQueryResultCachedDocument) SetDescription(description string) InlineQueryResultCachedDocument
SetDescription sets the `description` value of InlineQueryResultCachedDocument.
func (InlineQueryResultCachedDocument) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedDocument) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedDocument
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedDocument.
func (InlineQueryResultCachedDocument) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultCachedDocument) SetParseMode(parseMode ParseMode) InlineQueryResultCachedDocument
SetParseMode sets the `parse_mode` value of InlineQueryResultCachedDocument.
func (InlineQueryResultCachedDocument) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedDocument) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedDocument
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedDocument.
type InlineQueryResultCachedGif ¶
type InlineQueryResultCachedGif struct { InlineQueryResult GifFileID string `json:"gif_file_id"` Title *string `json:"title,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedGif is a struct of InlineQueryResultCachedGif
func NewInlineQueryResultCachedGif ¶
func NewInlineQueryResultCachedGif(gifFileID string) (newGif InlineQueryResultCachedGif, generatedID *string)
NewInlineQueryResultCachedGif is a helper function for generating a new InlineQueryResultCachedGif.
https://core.telegram.org/bots/api#inlinequeryresultcachedgif
func (InlineQueryResultCachedGif) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultCachedGif) SetCaption(caption string) InlineQueryResultCachedGif
SetCaption sets the `caption` value of InlineQueryResultCachedGif.
func (InlineQueryResultCachedGif) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultCachedGif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedGif
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedGif.
func (InlineQueryResultCachedGif) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedGif) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedGif
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedGif.
func (InlineQueryResultCachedGif) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultCachedGif) SetParseMode(parseMode ParseMode) InlineQueryResultCachedGif
SetParseMode sets the `parse_mode` value of InlineQueryResultCachedGif.
func (InlineQueryResultCachedGif) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedGif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedGif
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedGif.
func (InlineQueryResultCachedGif) SetTitle ¶ added in v0.10.7
func (r InlineQueryResultCachedGif) SetTitle(title string) InlineQueryResultCachedGif
SetTitle sets the `title` value of InlineQueryResultCachedGif.
type InlineQueryResultCachedMpeg4Gif ¶
type InlineQueryResultCachedMpeg4Gif struct { InlineQueryResult Mpeg4FileID string `json:"mpeg4_file_id"` Title *string `json:"title,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedMpeg4Gif is a struct of InlineQueryResultCachedMpeg4Gif
func NewInlineQueryResultCachedMpeg4Gif ¶
func NewInlineQueryResultCachedMpeg4Gif(mpeg4FileID string) (newMpeg4Gif InlineQueryResultCachedMpeg4Gif, generatedID *string)
NewInlineQueryResultCachedMpeg4Gif is a helper function for generating a new InlineQueryResultCachedMpeg4Gif.
https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif
func (InlineQueryResultCachedMpeg4Gif) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultCachedMpeg4Gif) SetCaption(caption string) InlineQueryResultCachedMpeg4Gif
SetCaption sets the `caption` value of InlineQueryResultCachedMpeg4Gif.
func (InlineQueryResultCachedMpeg4Gif) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultCachedMpeg4Gif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedMpeg4Gif
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedMpeg4Gif.
func (InlineQueryResultCachedMpeg4Gif) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedMpeg4Gif) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedMpeg4Gif
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedMpeg4Gif.
func (InlineQueryResultCachedMpeg4Gif) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultCachedMpeg4Gif) SetParseMode(parseMode ParseMode) InlineQueryResultCachedMpeg4Gif
SetParseMode sets the `parse_mode` value of InlineQueryResultCachedMpeg4Gif.
func (InlineQueryResultCachedMpeg4Gif) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedMpeg4Gif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedMpeg4Gif
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedMpeg4Gif.
func (InlineQueryResultCachedMpeg4Gif) SetTitle ¶ added in v0.10.7
func (r InlineQueryResultCachedMpeg4Gif) SetTitle(title string) InlineQueryResultCachedMpeg4Gif
SetTitle sets the `title` value of InlineQueryResultCachedMpeg4Gif.
type InlineQueryResultCachedPhoto ¶
type InlineQueryResultCachedPhoto struct { InlineQueryResult PhotoFileID string `json:"photo_file_id"` Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedPhoto is a struct of InlineQueryResultCachedPhoto
func NewInlineQueryResultCachedPhoto ¶
func NewInlineQueryResultCachedPhoto(photoFileID string) (newPhoto InlineQueryResultCachedPhoto, generatedID *string)
NewInlineQueryResultCachedPhoto is a helper function for generating a new InlineQueryResultCachedPhoto.
https://core.telegram.org/bots/api#inlinequeryresultcachedphoto
func (InlineQueryResultCachedPhoto) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultCachedPhoto) SetCaption(caption string) InlineQueryResultCachedPhoto
SetCaption sets the `caption` value of InlineQueryResultCachedPhoto.
func (InlineQueryResultCachedPhoto) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultCachedPhoto) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedPhoto
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedPhoto.
func (InlineQueryResultCachedPhoto) SetDescription ¶ added in v0.10.7
func (r InlineQueryResultCachedPhoto) SetDescription(description string) InlineQueryResultCachedPhoto
SetDescription sets the `description` value of InlineQueryResultCachedPhoto.
func (InlineQueryResultCachedPhoto) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedPhoto) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedPhoto
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedPhoto.
func (InlineQueryResultCachedPhoto) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultCachedPhoto) SetParseMode(parseMode ParseMode) InlineQueryResultCachedPhoto
SetParseMode sets the `parse_mode` value of InlineQueryResultCachedPhoto.
func (InlineQueryResultCachedPhoto) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedPhoto) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedPhoto
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedPhoto.
func (InlineQueryResultCachedPhoto) SetTitle ¶ added in v0.10.7
func (r InlineQueryResultCachedPhoto) SetTitle(title string) InlineQueryResultCachedPhoto
SetTitle sets the `title` value of InlineQueryResultCachedPhoto.
type InlineQueryResultCachedSticker ¶
type InlineQueryResultCachedSticker struct { InlineQueryResult StickerFileID string `json:"sticker_file_id"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedSticker is a struct of InlineQueryResultCachedSticker
func NewInlineQueryResultCachedSticker ¶
func NewInlineQueryResultCachedSticker(stickerFileID string) (newSticker InlineQueryResultCachedSticker, generatedID *string)
NewInlineQueryResultCachedSticker is a helper function for generating a new InlineQueryResultCachedSticker.
https://core.telegram.org/bots/api#inlinequeryresultcachedsticker
func (InlineQueryResultCachedSticker) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedSticker) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedSticker
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedSticker.
func (InlineQueryResultCachedSticker) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedSticker) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedSticker
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedSticker.
type InlineQueryResultCachedVideo ¶
type InlineQueryResultCachedVideo struct { InlineQueryResult VideoFileID string `json:"video_file_id"` Title string `json:"title"` Description *string `json:"description,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedVideo is a struct of InlineQueryResultCachedVideo
func NewInlineQueryResultCachedVideo ¶
func NewInlineQueryResultCachedVideo(title, videoFileID string) (newVideo InlineQueryResultCachedVideo, generatedID *string)
NewInlineQueryResultCachedVideo is a helper function for generating a new InlineQueryResultCachedVideo.
https://core.telegram.org/bots/api#inlinequeryresultcachedvideo
func (InlineQueryResultCachedVideo) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultCachedVideo) SetCaption(caption string) InlineQueryResultCachedVideo
SetCaption sets the `caption` value of InlineQueryResultCachedVideo.
func (InlineQueryResultCachedVideo) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultCachedVideo) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedVideo
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedVideo.
func (InlineQueryResultCachedVideo) SetDescription ¶ added in v0.10.7
func (r InlineQueryResultCachedVideo) SetDescription(description string) InlineQueryResultCachedVideo
SetDescription sets the `description` value of InlineQueryResultCachedVideo.
func (InlineQueryResultCachedVideo) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedVideo) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedVideo
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedVideo.
func (InlineQueryResultCachedVideo) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultCachedVideo) SetParseMode(parseMode ParseMode) InlineQueryResultCachedVideo
SetParseMode sets the `parse_mode` value of InlineQueryResultCachedVideo.
func (InlineQueryResultCachedVideo) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedVideo) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedVideo
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedVideo.
type InlineQueryResultCachedVoice ¶
type InlineQueryResultCachedVoice struct { InlineQueryResult VoiceFileID string `json:"voice_file_id"` Title string `json:"title"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultCachedVoice is a struct of InlineQueryResultCachedVoice
func NewInlineQueryResultCachedVoice ¶
func NewInlineQueryResultCachedVoice(title, voiceFileID string) (newVoice InlineQueryResultCachedVoice, generatedID *string)
NewInlineQueryResultCachedVoice is a helper function for generating a new InlineQueryResultCachedVoice.
https://core.telegram.org/bots/api#inlinequeryresultcachedvoice
func (InlineQueryResultCachedVoice) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultCachedVoice) SetCaption(caption string) InlineQueryResultCachedVoice
SetCaption sets the `caption` value of InlineQueryResultCachedVoice.
func (InlineQueryResultCachedVoice) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultCachedVoice) SetCaptionEntities(entities []MessageEntity) InlineQueryResultCachedVoice
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultCachedVoice.
func (InlineQueryResultCachedVoice) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultCachedVoice) SetInputMessageContent(content InputMessageContent) InlineQueryResultCachedVoice
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultCachedVoice.
func (InlineQueryResultCachedVoice) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultCachedVoice) SetParseMode(parseMode ParseMode) InlineQueryResultCachedVoice
SetParseMode sets the `parse_mode` value of InlineQueryResultCachedVoice.
func (InlineQueryResultCachedVoice) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultCachedVoice) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultCachedVoice
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultCachedVoice.
type InlineQueryResultContact ¶
type InlineQueryResultContact struct { InlineQueryResult PhoneNumber string `json:"phone_number"` FirstName string `json:"first_name"` LastName *string `json:"last_name,omitempty"` VCard *string `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` ThumbnailURL *string `json:"thumbnail_url,omitempty"` ThumbnailWidth *int `json:"thumbnail_width,omitempty"` ThumbnailHeight *int `json:"thumbnail_height,omitempty"` }
InlineQueryResultContact is a struct of InlineQueryResultContact
func NewInlineQueryResultContact ¶
func NewInlineQueryResultContact(phoneNumber, firstName string) (newContact InlineQueryResultContact, generatedID *string)
NewInlineQueryResultContact is a helper function for generating a new InlineQueryResultContact.
func (InlineQueryResultContact) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultContact) SetInputMessageContent(content InputMessageContent) InlineQueryResultContact
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultContact.
func (InlineQueryResultContact) SetLastName ¶ added in v0.10.7
func (r InlineQueryResultContact) SetLastName(lastName string) InlineQueryResultContact
SetLastName sets the `last_name` value of InlineQueryResultContact.
func (InlineQueryResultContact) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultContact) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultContact
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultContact.
func (InlineQueryResultContact) SetThumbnailHeight ¶ added in v0.10.7
func (r InlineQueryResultContact) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultContact
SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultContact.
func (InlineQueryResultContact) SetThumbnailURL ¶ added in v0.10.7
func (r InlineQueryResultContact) SetThumbnailURL(thumbnailURL string) InlineQueryResultContact
SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultContact.
func (InlineQueryResultContact) SetThumbnailWidth ¶ added in v0.10.7
func (r InlineQueryResultContact) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultContact
SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultContact.
func (InlineQueryResultContact) SetVCard ¶ added in v0.10.7
func (r InlineQueryResultContact) SetVCard(vCard string) InlineQueryResultContact
SetVCard sets the `vcard` value of InlineQueryResultContact.
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct { InlineQueryResult Title string `json:"title"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` DocumentURL string `json:"document_url"` MimeType DocumentMimeType `json:"mime_type"` Description *string `json:"description,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` ThumbnailURL *string `json:"thumbnail_url,omitempty"` ThumbnailWidth *int `json:"thumbnail_width,omitempty"` ThumbnailHeight *int `json:"thumbnail_height,omitempty"` }
InlineQueryResultDocument is a struct of InlineQueryResultDocument
func NewInlineQueryResultDocument ¶
func NewInlineQueryResultDocument(documentURL, title string, mimeType DocumentMimeType) (newDocument InlineQueryResultDocument, generatedID *string)
NewInlineQueryResultDocument is a helper function for generating a new InlineQueryResultDocument.
https://core.telegram.org/bots/api#inlinequeryresultdocument
func (InlineQueryResultDocument) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetCaption(caption string) InlineQueryResultDocument
SetCaption sets the `caption` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetCaptionEntities(entities []MessageEntity) InlineQueryResultDocument
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetDescription ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetDescription(description string) InlineQueryResultDocument
SetDescription sets the `description` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetInputMessageContent(content InputMessageContent) InlineQueryResultDocument
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetParseMode(parseMode ParseMode) InlineQueryResultDocument
SetParseMode sets the `parse_mode` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultDocument
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetThumbnailHeight ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultDocument
SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetThumbnailURL ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetThumbnailURL(thumbnailURL string) InlineQueryResultDocument
SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultDocument.
func (InlineQueryResultDocument) SetThumbnailWidth ¶ added in v0.10.7
func (r InlineQueryResultDocument) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultDocument
SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultDocument.
type InlineQueryResultGame ¶
type InlineQueryResultGame struct { InlineQueryResult GameShortName string `json:"game_short_name"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
InlineQueryResultGame is a struct of InlineQueryResultGame
func NewInlineQueryResultGame ¶ added in v0.10.7
func NewInlineQueryResultGame(shortName string) (newGame InlineQueryResultGame, generatedID *string)
NewInlineQueryResultGame is a helper function for generating a new InlineQueryResultGame.
func (InlineQueryResultGame) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultGame) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultGame
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultGame.
type InlineQueryResultGif ¶
type InlineQueryResultGif struct { InlineQueryResult GifURL string `json:"gif_url"` GifWidth *int `json:"gif_width,omitempty"` GifHeight *int `json:"gif_height,omitempty"` GifDuration *int `json:"gif_duration,omitempty"` ThumbnailURL string `json:"thumbnail_url"` ThumbnailMimeType *ThumbnailMimeType `json:"thumbnail_mime_type,omitempty"` Title *string `json:"title,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` 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.
func (InlineQueryResultGif) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultGif) SetCaption(caption string) InlineQueryResultGif
SetCaption sets the `caption` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultGif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultGif
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetGifDuration ¶ added in v0.10.7
func (r InlineQueryResultGif) SetGifDuration(duration int) InlineQueryResultGif
SetGifDuration sets the `gif_duration` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetGifHeight ¶ added in v0.10.7
func (r InlineQueryResultGif) SetGifHeight(height int) InlineQueryResultGif
SetGifHeight sets the `gif_height` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetGifWidth ¶ added in v0.10.7
func (r InlineQueryResultGif) SetGifWidth(width int) InlineQueryResultGif
SetGifWidth sets the `gif_width` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultGif) SetInputMessageContent(content InputMessageContent) InlineQueryResultGif
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultGif) SetParseMode(parseMode ParseMode) InlineQueryResultGif
SetParseMode sets the `parse_mode` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultGif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultGif
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetThumbnailMimeType ¶ added in v0.10.7
func (r InlineQueryResultGif) SetThumbnailMimeType(mimeType ThumbnailMimeType) InlineQueryResultGif
SetThumbnailMimeType sets the `thumbnail_mime_type` value of InlineQueryResultGif.
func (InlineQueryResultGif) SetTitle ¶ added in v0.10.7
func (r InlineQueryResultGif) SetTitle(title string) InlineQueryResultGif
SetTitle sets the `title` value of InlineQueryResultGif.
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct { InlineQueryResult Latitude float32 `json:"latitude"` Longitude float32 `json:"longitude"` Title string `json:"title"` HorizontalAccuracy *float32 `json:"horizontal_accuracy,omitempty"` LivePeriod *int `json:"live_period,omitempty"` Heading *int `json:"heading,omitempty"` ProximityAlertRadius *int `json:"proximity_alert_radius,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` ThumbnailURL *string `json:"thumbnail_url,omitempty"` ThumbnailWidth *int `json:"thumbnail_width,omitempty"` ThumbnailHeight *int `json:"thumbnail_height,omitempty"` }
InlineQueryResultLocation is a struct of InlineQueryResultLocation
func NewInlineQueryResultLocation ¶
func NewInlineQueryResultLocation(latitude, longitude float32, title string) (newLocation InlineQueryResultLocation, generatedID *string)
NewInlineQueryResultLocation is a helper function for generating a new InlineQueryResultLocation.
https://core.telegram.org/bots/api#inlinequeryresultlocation
func (InlineQueryResultLocation) SetHeading ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetHeading(heading int) InlineQueryResultLocation
SetHeading sets the `heading` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetHorizontalAccuracy ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetHorizontalAccuracy(horizontalAccuracy float32) InlineQueryResultLocation
SetHorizontalAccuracy sets the `horizontal_accuracy` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetInputMessageContent(content InputMessageContent) InlineQueryResultLocation
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetLivePeriod ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetLivePeriod(livePeriod int) InlineQueryResultLocation
SetLivePeriod sets the `live_period` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetProximityAlertRadius ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetProximityAlertRadius(radius int) InlineQueryResultLocation
SetProximityAlertRadius sets the `proximity_alert_radius` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultLocation
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetThumbnailHeight ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultLocation
SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetThumbnailURL ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetThumbnailURL(thumbnailURL string) InlineQueryResultLocation
SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultLocation.
func (InlineQueryResultLocation) SetThumbnailWidth ¶ added in v0.10.7
func (r InlineQueryResultLocation) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultLocation
SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultLocation.
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct { InlineQueryResult Mpeg4URL string `json:"mpeg4_url"` Mpeg4Width *int `json:"mpeg4_width,omitempty"` Mpeg4Height *int `json:"mpeg4_height,omitempty"` Mpeg4Duration *int `json:"mpeg4_duration,omitempty"` ThumbnailURL string `json:"thumbnail_url"` ThumbnailMimeType *ThumbnailMimeType `json:"thumbnail_mime_type,omitempty"` Title *string `json:"title,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultMpeg4Gif is a struct for InlineQueryResultMpeg4Gif
func NewInlineQueryResultMpeg4Gif ¶
func NewInlineQueryResultMpeg4Gif(mpeg4URL, thumbnailURL string) (newMpeg4Gif InlineQueryResultMpeg4Gif, generatedID *string)
NewInlineQueryResultMpeg4Gif is a helper function for generating a new InlineQueryResultMpeg4Gif.
Mpeg4 must be in H.264/MPEG-4 AVC video(wihout sound) format, < 1MB.
https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
func (InlineQueryResultMpeg4Gif) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetCaption(caption string) InlineQueryResultMpeg4Gif
SetCaption sets the `caption` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetCaptionEntities(entities []MessageEntity) InlineQueryResultMpeg4Gif
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetInputMessageContent(content InputMessageContent) InlineQueryResultMpeg4Gif
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetMpeg4Duration ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetMpeg4Duration(duration int) InlineQueryResultMpeg4Gif
SetMpeg4Duration sets the `mpeg4_duration` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetMpeg4Height ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetMpeg4Height(height int) InlineQueryResultMpeg4Gif
SetMpeg4Height sets the `mpeg4_height` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetMpeg4Width ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetMpeg4Width(width int) InlineQueryResultMpeg4Gif
SetMpeg4Width sets the `mpeg4_width` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetParseMode(parseMode ParseMode) InlineQueryResultMpeg4Gif
SetParseMode sets the `parse_mode` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultMpeg4Gif
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetThumbnailMimeType ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetThumbnailMimeType(mimeType ThumbnailMimeType) InlineQueryResultMpeg4Gif
SetThumbnailMimeType sets the `thumbnail_mime_type` value of InlineQueryResultMpeg4Gif.
func (InlineQueryResultMpeg4Gif) SetTitle ¶ added in v0.10.7
func (r InlineQueryResultMpeg4Gif) SetTitle(title string) InlineQueryResultMpeg4Gif
SetTitle sets the `title` value of InlineQueryResultMpeg4Gif.
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct { InlineQueryResult PhotoURL string `json:"photo_url"` PhotoWidth *int `json:"photo_width,omitempty"` PhotoHeight *int `json:"photo_height,omitempty"` ThumbnailURL string `json:"thumbnail_url"` Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` 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.
func (InlineQueryResultPhoto) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetCaption(caption string) InlineQueryResultPhoto
SetCaption sets the `caption` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetCaptionEntities(entities []MessageEntity) InlineQueryResultPhoto
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetDescription ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetDescription(description string) InlineQueryResultPhoto
SetDescription sets the `description` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetInputMessageContent(content InputMessageContent) InlineQueryResultPhoto
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetParseMode(parseMode ParseMode) InlineQueryResultPhoto
SetParseMode sets the `parse_mode` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetPhotoHeight ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetPhotoHeight(height int) InlineQueryResultPhoto
SetPhotoHeight sets the `photo_height` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetPhotoWidth ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetPhotoWidth(width int) InlineQueryResultPhoto
SetPhotoWidth sets the `photo_width` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultPhoto
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultPhoto.
func (InlineQueryResultPhoto) SetTitle ¶ added in v0.10.7
func (r InlineQueryResultPhoto) SetTitle(title string) InlineQueryResultPhoto
SetTitle sets the `title` value of InlineQueryResultPhoto.
type InlineQueryResultType ¶
type InlineQueryResultType string
InlineQueryResultType is a type of inline query result
const ( InlineQueryResultTypeArticle InlineQueryResultType = "article" InlineQueryResultTypePhoto InlineQueryResultType = "photo" InlineQueryResultTypeGif InlineQueryResultType = "gif" InlineQueryResultTypeMpeg4Gif InlineQueryResultType = "mpeg4_gif" InlineQueryResultTypeVideo InlineQueryResultType = "video" InlineQueryResultTypeAudio InlineQueryResultType = "audio" InlineQueryResultTypeVoice InlineQueryResultType = "voice" InlineQueryResultTypeDocument InlineQueryResultType = "document" InlineQueryResultTypeLocation InlineQueryResultType = "location" InlineQueryResultTypeVenue InlineQueryResultType = "venue" InlineQueryResultTypeContact InlineQueryResultType = "contact" InlineQueryResultTypeSticker InlineQueryResultType = "sticker" InlineQueryResultTypeGame InlineQueryResultType = "game" )
InlineQueryResultType strings
type InlineQueryResultVenue ¶
type InlineQueryResultVenue struct { InlineQueryResult Latitude float32 `json:"latitude"` Longitude float32 `json:"longitude"` Title string `json:"title"` Address string `json:"address"` FoursquareID *string `json:"foursquare_id,omitempty"` FoursquareType *string `json:"foursquare_type,omitempty"` GooglePlaceID *string `json:"google_place_id,omitempty"` GooglePlaceType *string `json:"google_place_type,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` ThumbnailURL *string `json:"thumbnail_url,omitempty"` ThumbnailWidth *int `json:"thumbnail_width,omitempty"` ThumbnailHeight *int `json:"thumbnail_height,omitempty"` }
InlineQueryResultVenue is a struct of InlineQueryResultVenue
func NewInlineQueryResultVenue ¶
func NewInlineQueryResultVenue(latitude, longitude float32, title, address string) (newVenue InlineQueryResultVenue, generatedID *string)
NewInlineQueryResultVenue is a helper function for generating a new InlineQueryResultVenue.
func (InlineQueryResultVenue) SetFoursquareID ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetFoursquareID(foursquareID string) InlineQueryResultVenue
SetFoursquareID sets the `foursquare_id` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetFoursquareType ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetFoursquareType(foursquareType string) InlineQueryResultVenue
SetFoursquareType sets the `foursquare_type` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetGooglePlaceID ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetGooglePlaceID(googlePlaceID string) InlineQueryResultVenue
SetGooglePlaceID sets the `google_place_id` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetGooglePlaceType ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetGooglePlaceType(googlePlaceType string) InlineQueryResultVenue
SetGooglePlaceType sets the `google_place_type` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetInputMessageContent(content InputMessageContent) InlineQueryResultVenue
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultVenue
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetThumbnailHeight ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetThumbnailHeight(thumbnailHeight int) InlineQueryResultVenue
SetThumbnailHeight sets the `thumbnail_height` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetThumbnailURL ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetThumbnailURL(thumbnailURL string) InlineQueryResultVenue
SetThumbnailURL sets the `thumbnail_url` value of InlineQueryResultVenue.
func (InlineQueryResultVenue) SetThumbnailWidth ¶ added in v0.10.7
func (r InlineQueryResultVenue) SetThumbnailWidth(thumbnailWidth int) InlineQueryResultVenue
SetThumbnailWidth sets the `thumbnail_width` value of InlineQueryResultVenue.
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct { InlineQueryResult VideoURL string `json:"video_url"` MimeType VideoMimeType `json:"mime_type"` ThumbnailURL string `json:"thumbnail_url"` Title string `json:"title"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` 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.
func (InlineQueryResultVideo) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetCaption(caption string) InlineQueryResultVideo
SetCaption sets the `caption` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetCaptionEntities(entities []MessageEntity) InlineQueryResultVideo
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetDescription ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetDescription(description string) InlineQueryResultVideo
SetDescription sets the `description` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetInputMessageContent(content InputMessageContent) InlineQueryResultVideo
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetParseMode(parseMode ParseMode) InlineQueryResultVideo
SetParseMode sets the `parse_mode` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultVideo
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetVideoDuration ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetVideoDuration(duration int) InlineQueryResultVideo
SetVideoDuration sets the `video_duration` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetVideoHeight ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetVideoHeight(height int) InlineQueryResultVideo
SetVideoHeight sets the `video_height` value of InlineQueryResultVideo.
func (InlineQueryResultVideo) SetVideoWidth ¶ added in v0.10.7
func (r InlineQueryResultVideo) SetVideoWidth(width int) InlineQueryResultVideo
SetVideoWidth sets the `video_width` value of InlineQueryResultVideo.
type InlineQueryResultVoice ¶
type InlineQueryResultVoice struct { InlineQueryResult VoiceURL string `json:"voice_url"` Title string `json:"title"` Caption *string `json:"caption,omitempty"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` VoiceDuration *int `json:"voice_duration,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"` }
InlineQueryResultVoice is a struct of InlineQueryResultVoice
func NewInlineQueryResultVoice ¶
func NewInlineQueryResultVoice(voiceURL, title string) (newVoice InlineQueryResultVoice, generatedID *string)
NewInlineQueryResultVoice is a helper function for generating a new InlineQueryResultVoice.
func (InlineQueryResultVoice) SetCaption ¶ added in v0.10.7
func (r InlineQueryResultVoice) SetCaption(caption string) InlineQueryResultVoice
SetCaption sets the `caption` value of InlineQueryResultVoice.
func (InlineQueryResultVoice) SetCaptionEntities ¶ added in v0.10.7
func (r InlineQueryResultVoice) SetCaptionEntities(entities []MessageEntity) InlineQueryResultVoice
SetCaptionEntities sets the `caption_entities` value of InlineQueryResultVoice.
func (InlineQueryResultVoice) SetInputMessageContent ¶ added in v0.10.7
func (r InlineQueryResultVoice) SetInputMessageContent(content InputMessageContent) InlineQueryResultVoice
SetInputMessageContent sets the `input_message_content` value of InlineQueryResultVoice.
func (InlineQueryResultVoice) SetParseMode ¶ added in v0.10.7
func (r InlineQueryResultVoice) SetParseMode(parseMode ParseMode) InlineQueryResultVoice
SetParseMode sets the `parse_mode` value of InlineQueryResultVoice.
func (InlineQueryResultVoice) SetReplyMarkup ¶ added in v0.10.7
func (r InlineQueryResultVoice) SetReplyMarkup(markup InlineKeyboardMarkup) InlineQueryResultVoice
SetReplyMarkup sets the `reply_markup` value of InlineQueryResultVoice.
func (InlineQueryResultVoice) SetVoiceDuration ¶ added in v0.10.7
func (r InlineQueryResultVoice) SetVoiceDuration(duration int) InlineQueryResultVoice
SetVoiceDuration sets the `voice_duration` value of InlineQueryResultVoice.
type InlineQueryResultsButton ¶
type InlineQueryResultsButton struct { Text string `json:"text"` WebApp *WebAppInfo `json:"web_app,omitempty"` StartParameter *string `json:"start_parameter,omitempty"` }
InlineQueryResultsButton is a struct for inline query results button
https://core.telegram.org/bots/api#inlinequeryresultsbutton
func NewInlineQueryResultsButton ¶ added in v0.10.7
func NewInlineQueryResultsButton(text string) InlineQueryResultsButton
NewInlineQueryResultsButton returns a new InlineQueryResultsButton with given text.
func (InlineQueryResultsButton) SetStartParameter ¶ added in v0.10.7
func (b InlineQueryResultsButton) SetStartParameter(startParameter string) InlineQueryResultsButton
SetStartParameter sets the `start_parameter` value of InlineQueryResultsButton.
func (InlineQueryResultsButton) SetWebApp ¶ added in v0.10.7
func (b InlineQueryResultsButton) SetWebApp(webApp WebAppInfo) InlineQueryResultsButton
SetWebApp sets the `web_app` value of InlineQueryResultsButton.
type InputContactMessageContent ¶
type InputContactMessageContent struct { InputMessageContent PhoneNumber string `json:"phone_number"` FirstName string `json:"first_name"` LastName *string `json:"last_name,omitempty"` VCard *string `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard }
InputContactMessageContent is a struct of InputContactMessageContent
func NewInputContactMessageContent ¶ added in v0.10.7
func NewInputContactMessageContent(phoneNumber, firstName string) InputContactMessageContent
NewInputContactMessageContent returns a new InputContactMessageContent.
func (InputContactMessageContent) SetLastName ¶ added in v0.10.7
func (c InputContactMessageContent) SetLastName(lastName string) InputContactMessageContent
SetLastName sets the `last_name` value of InputContactMessageContent.
func (InputContactMessageContent) SetVCard ¶ added in v0.10.7
func (c InputContactMessageContent) SetVCard(vCard string) InputContactMessageContent
SetVCard sets the `vcard` value of InputContactMessageContent.
type InputFile ¶
InputFile represents contents of a file to be uploaded.
NOTE: Can be generated with NewInputFileFromXXX() functions in types_helper.go
https://core.telegram.org/bots/api#inputfile
func NewInputFileFromBytes ¶ added in v0.10.7
NewInputFileFromBytes generates an InputFile from given bytes array
func NewInputFileFromFileID ¶ added in v0.10.7
NewInputFileFromFileID generates an InputFile from given file id
func NewInputFileFromFilepath ¶ added in v0.10.7
NewInputFileFromFilepath generates an InputFile from given filepath
func NewInputFileFromURL ¶ added in v0.10.7
NewInputFileFromURL generates an InputFile from given url
type InputInvoiceMessageContent ¶
type InputInvoiceMessageContent struct { InputMessageContent Title string `json:"title"` Description string `json:"description"` Payload string `json:"payload"` ProviderToken string `json:"provider_token"` Currency string `json:"currency"` Prices []LabeledPrice `json:"prices"` MaxTipAmount *int `json:"max_tip_amount,omitempty"` SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"` ProviderData *string `json:"provider_data,omitempty"` PhotoURL *string `json:"photo_url,omitempty"` PhotoSize *int `json:"photo_size,omitempty"` PhotoWidth *int `json:"photo_width,omitempty"` PhotoHeight *int `json:"photo_height,omitempty"` NeedName *bool `json:"need_name,omitempty"` NeedPhoneNumber *bool `json:"need_phone_number,omitempty"` NeedEmail *bool `json:"need_email,omitempty"` NeedShippingAddress *bool `json:"need_shipping_address,omitempty"` SendPhoneNumberToProvider *bool `json:"send_phone_number_to_provider,omitempty"` SendEmailToProvider *bool `json:"send_email_to_provider,omitempty"` IsFlexible *bool `json:"is_flexible,omitempty"` }
InputInvoiceMessageContent is a struct of InputInvoiceMessageContent
func NewInputInvoiceMessageContent ¶ added in v0.10.7
func NewInputInvoiceMessageContent(title, description, payload, providerToken, currency string, prices []LabeledPrice) InputInvoiceMessageContent
NewInputInvoiceMessageContent returns a new InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetIsFlexible ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetIsFlexible(isFlexible bool) InputInvoiceMessageContent
SetIsFlexible sets the `is_flexible` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetMaxTipAmount ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetMaxTipAmount(amount int) InputInvoiceMessageContent
SetMaxTipAmount sets the `max_tip_amount` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetNeedEmail ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetNeedEmail(needEmail bool) InputInvoiceMessageContent
SetNeedEmail sets the `need_email` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetNeedName ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetNeedName(needName bool) InputInvoiceMessageContent
SetNeedName sets the `need_name` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetNeedPhoneNumber ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetNeedPhoneNumber(needPhoneNumber bool) InputInvoiceMessageContent
SetNeedPhoneNumber sets the `need_phone_number` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetNeedShippingAddress ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetNeedShippingAddress(needShippingAddress bool) InputInvoiceMessageContent
SetNeedShippingAddress sets the `need_shipping_address` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetPhotoHeight ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetPhotoHeight(photoHeight int) InputInvoiceMessageContent
SetPhotoHeight sets the `photo_height` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetPhotoSize ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetPhotoSize(photoSize int) InputInvoiceMessageContent
SetPhotoSize sets the `photo_size` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetPhotoURL ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetPhotoURL(photoURL string) InputInvoiceMessageContent
SetPhotoURL sets the `photo_url` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetPhotoWidth ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetPhotoWidth(photoWidth int) InputInvoiceMessageContent
SetPhotoWidth sets the `photo_width` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetProviderData ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetProviderData(providerData string) InputInvoiceMessageContent
SetProviderData sets the `provider_data` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetSendEmailToProvider ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetSendEmailToProvider(sendEmailToProvider bool) InputInvoiceMessageContent
SetSendEmailToProvider sets the `send_email_to_provider` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetSendPhoneNumberToProvider ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) InputInvoiceMessageContent
SetSendPhoneNumberToProvider sets the `send_phone_number_to_provider` value of InputInvoiceMessageContent.
func (InputInvoiceMessageContent) SetSuggestedTipAmounts ¶ added in v0.10.7
func (c InputInvoiceMessageContent) SetSuggestedTipAmounts(amounts []int) InputInvoiceMessageContent
SetSuggestedTipAmounts sets the `suggested_tip_amounts` value of InputInvoiceMessageContent.
type InputLocationMessageContent ¶
type InputLocationMessageContent struct { InputMessageContent Latitude float32 `json:"latitude"` Longitude float32 `json:"longitude"` HorizontalAccuracy *float32 `json:"horizontal_accuracy,omitempty"` LivePeriod *int `json:"live_period,omitempty"` Heading *int `json:"heading,omitempty"` ProximityAlertRadius *int `json:"proximity_alert_radius,omitempty"` }
InputLocationMessageContent is a struct of InputLocationMessageContent
func NewInputLocationMessageContent ¶ added in v0.10.7
func NewInputLocationMessageContent(latitude, longitude float32) InputLocationMessageContent
NewInputLocationMessageContent returns a new InputLocationMessageContent.
func (InputLocationMessageContent) SetHeading ¶ added in v0.10.7
func (c InputLocationMessageContent) SetHeading(heading int) InputLocationMessageContent
SetHeading sets the `heading` value of InputLocationMessageContent.
func (InputLocationMessageContent) SetHorizontalAccuracy ¶ added in v0.10.7
func (c InputLocationMessageContent) SetHorizontalAccuracy(horizontalAccuracy float32) InputLocationMessageContent
SetHorizontalAccuracy sets the `horizontal_accuracy` value of InputLocationMessageContent.
func (InputLocationMessageContent) SetLivePeriod ¶ added in v0.10.7
func (c InputLocationMessageContent) SetLivePeriod(livePeriod int) InputLocationMessageContent
SetLivePeriod sets the `live_period` value of InputLocationMessageContent.
func (InputLocationMessageContent) SetProximityAlertRadius ¶ added in v0.10.7
func (c InputLocationMessageContent) SetProximityAlertRadius(radius int) InputLocationMessageContent
SetProximityAlertRadius sets the `proximity_alert_radius` value of InputLocationMessageContent.
type InputMedia ¶
type InputMedia 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.
NOTE: Can be generated with NewInputMedia() function in types_helper.go
https://core.telegram.org/bots/api#inputmedia
func NewInputMedia ¶ added in v0.10.7
func NewInputMedia(typ InputMediaType, media string) InputMedia
NewInputMedia returns a new InputMedia.
func (*InputMedia) SetCaption ¶ added in v0.10.7
func (m *InputMedia) SetCaption(caption string) *InputMedia
SetCaption sets the `caption` value of InputMedia.
func (InputMedia) SetCaptionEntities ¶ added in v0.10.7
func (m InputMedia) SetCaptionEntities(entities []MessageEntity) InputMedia
SetCaptionEntities sets the `caption_entities` value of InputMedia.
func (InputMedia) SetDisableContentTypeDetection ¶ added in v0.10.7
func (m InputMedia) SetDisableContentTypeDetection(disableContentTypeDetection bool) InputMedia
SetDisableContentTypeDetection sets the `disable_content_type_detection` value of InputMedia.
func (InputMedia) SetDuration ¶ added in v0.10.7
func (m InputMedia) SetDuration(duration int) InputMedia
SetDuration sets the `duration` value of InputMedia.
func (InputMedia) SetHasSpoiler ¶ added in v0.10.7
func (m InputMedia) SetHasSpoiler(hasSpoiler bool) InputMedia
SetHasSpoiler sets the `has_spoiler` value of InputMedia.
func (InputMedia) SetHeight ¶ added in v0.10.7
func (m InputMedia) SetHeight(height int) InputMedia
SetHeight sets the `height` value of InputMedia.
func (InputMedia) SetParseMode ¶ added in v0.10.7
func (m InputMedia) SetParseMode(parseMode ParseMode) InputMedia
SetParseMode sets the `parse_mode` value of InputMedia.
func (InputMedia) SetPerformer ¶ added in v0.10.7
func (m InputMedia) SetPerformer(performer string) InputMedia
SetPerformer sets the `performer` value of InputMedia.
func (InputMedia) SetSupportsStreaming ¶ added in v0.10.7
func (m InputMedia) SetSupportsStreaming(supportsStreaming bool) InputMedia
SetSupportsStreaming sets the `supports_streaming` value of InputMedia.
func (InputMedia) SetThumbnail ¶ added in v0.10.7
func (m InputMedia) SetThumbnail(thumbnail InputFile) InputMedia
SetThumbnail sets the `thumbnail` value of InputMedia.
func (InputMedia) SetTitle ¶ added in v0.10.7
func (m InputMedia) SetTitle(title string) InputMedia
SetTitle sets the `title` value of InputMedia.
func (InputMedia) SetWidth ¶ added in v0.10.7
func (m InputMedia) SetWidth(width int) InputMedia
SetWidth sets the `width` value of InputMedia.
type InputMediaType ¶
type InputMediaType string
InputMediaType is a type of InputMedia
const ( InputMediaAnimation InputMediaType = "animation" // https://core.telegram.org/bots/api#inputmediaanimation InputMediaDocument InputMediaType = "document" // https://core.telegram.org/bots/api#inputmediadocument InputMediaAudio InputMediaType = "audio" // https://core.telegram.org/bots/api#inputmediaaudio InputMediaPhoto InputMediaType = "photo" // https://core.telegram.org/bots/api#inputmediaphoto InputMediaVideo InputMediaType = "video" // https://core.telegram.org/bots/api#inputmediavideo )
InputMediaType strings
type InputMessageContent ¶
type InputMessageContent any
InputMessageContent is a generic type of input message content types
(can be one of `InputTextMessageContent`, `InputLocationMessageContent`, `InputVenueMessageContent`, `InputContactMessageContent`, or `InputInvoiceMessageContent`)
NOTE: Can be generated with NewInput*MessageContent() function in types_helper.go
type InputSticker ¶
type InputSticker struct { Sticker any `json:"sticker"` // InputFile or `file_id` Format StickerFormat `json:"format"` // "static" for .webp or .png, "animated" for .tgs, "video" for .webm EmojiList []string `json:"emoji_list"` MaskPosition *MaskPosition `json:"mask_position,omitempty"` Keywords []string `json:"keywords,omitempty"` }
InputSticker is a struct for a sticker
NOTE: Can be generated with NewInputSticker() function in types_helper.go
https://core.telegram.org/bots/api#inputsticker
func NewInputSticker ¶ added in v0.10.7
func NewInputSticker(sticker any, format StickerFormat, emojiList []string) InputSticker
NewInputSticker returns a new InputSticker.
func (InputSticker) SetKeywords ¶ added in v0.10.7
func (s InputSticker) SetKeywords(keywords []string) InputSticker
SetKeywords sets the `keywords` value of InputSticker.
func (InputSticker) SetMaskPosition ¶ added in v0.10.7
func (s InputSticker) SetMaskPosition(maskPosition MaskPosition) InputSticker
SetMaskPosition sets the `mask_position` value of InputSticker.
type InputTextMessageContent ¶
type InputTextMessageContent struct { InputMessageContent MessageText string `json:"message_text"` ParseMode *ParseMode `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"` }
InputTextMessageContent is a struct of InputTextMessageContent
func NewInputTextMessageContent ¶ added in v0.10.7
func NewInputTextMessageContent(text string) InputTextMessageContent
NewInputTextMessageContent returns a new InputTextMessageContent with given text.
func (InputTextMessageContent) SetCaptionEntities ¶ added in v0.10.7
func (c InputTextMessageContent) SetCaptionEntities(entities []MessageEntity) InputTextMessageContent
SetCaptionEntities sets the `caption_entities` value of InputTextMessageContent.
func (InputTextMessageContent) SetLinkPreviewOptions ¶ added in v0.10.7
func (c InputTextMessageContent) SetLinkPreviewOptions(options LinkPreviewOptions) InputTextMessageContent
SetLinkPreviewOptions sets the `link_preview_options` value of InputTextMessageContent.
func (InputTextMessageContent) SetParseMode ¶ added in v0.10.7
func (c InputTextMessageContent) SetParseMode(parseMode ParseMode) InputTextMessageContent
SetParseMode sets the `parse_mode` value of InputTextMessageContent.
type InputVenueMessageContent ¶
type InputVenueMessageContent struct { InputMessageContent Latitude float32 `json:"latitude"` Longitude float32 `json:"longitude"` Title string `json:"title"` Address string `json:"address"` FoursquareID *string `json:"foursquare_id,omitempty"` FoursquareType *string `json:"foursquare_type,omitempty"` GooglePlaceID *string `json:"google_place_id,omitempty"` GooglePlaceType *string `json:"google_place_type,omitempty"` }
InputVenueMessageContent is a struct of InputVenueMessageContent
func NewInputVenueMessageContent ¶ added in v0.10.7
func NewInputVenueMessageContent(latitude, longitude float32, title, address string) InputVenueMessageContent
NewInputVenueMessageContent returns a new InputVenueMessageContent.
func (InputVenueMessageContent) SetFoursquareID ¶ added in v0.10.7
func (c InputVenueMessageContent) SetFoursquareID(foursquareID string) InputVenueMessageContent
SetFoursquareID sets the `foursquare_id` value of InputVenueMessageContent.
func (InputVenueMessageContent) SetFoursquareType ¶ added in v0.10.7
func (c InputVenueMessageContent) SetFoursquareType(foursquareType string) InputVenueMessageContent
SetFoursquareType sets the `foursquare_type` value of InputVenueMessageContent.
func (InputVenueMessageContent) SetGooglePlaceID ¶ added in v0.10.7
func (c InputVenueMessageContent) SetGooglePlaceID(googlePlaceID string) InputVenueMessageContent
SetGooglePlaceID sets the `google_place_id` value of InputVenueMessageContent.
func (InputVenueMessageContent) SetGooglePlaceType ¶ added in v0.10.7
func (c InputVenueMessageContent) SetGooglePlaceType(googlePlaceType string) InputVenueMessageContent
SetGooglePlaceType sets the `google_place_type` value of InputVenueMessageContent.
type Invoice ¶
type Invoice struct { Title string `json:"title"` Description string `json:"description"` StartParameter string `json:"start_parameter"` Currency string `json:"currency"` // https://core.telegram.org/bots/payments#supported-currencies TotalAmount int `json:"total_amount"` // https://core.telegram.org/bots/payments/currencies.json }
Invoice is a struct of Invoice
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
NOTE: Can be generated with NewKeyboardButton() function in types_helper.go
https://core.telegram.org/bots/api#keyboardbutton
func NewKeyboardButton ¶ added in v0.10.7
func NewKeyboardButton(text string) KeyboardButton
NewKeyboardButton returns a new KeyboardButton.
func NewKeyboardButtons ¶
func NewKeyboardButtons(texts ...string) []KeyboardButton
NewKeyboardButtons is a helper function for generating an array of KeyboardButtons
func (KeyboardButton) SetRequestChat ¶ added in v0.10.7
func (b KeyboardButton) SetRequestChat(requestChat KeyboardButtonRequestChat) KeyboardButton
SetRequestChat sets the `request_chat` value of KeyboardButton.
func (KeyboardButton) SetRequestContact ¶ added in v0.10.7
func (b KeyboardButton) SetRequestContact(requestContact bool) KeyboardButton
SetRequestContact sets the `request_contact` value of KeyboardButton.
func (KeyboardButton) SetRequestLocation ¶ added in v0.10.7
func (b KeyboardButton) SetRequestLocation(requestLocation bool) KeyboardButton
SetRequestLocation sets the `request_location` value of KeyboardButton.
func (KeyboardButton) SetRequestPoll ¶ added in v0.10.7
func (b KeyboardButton) SetRequestPoll(requestPoll KeyboardButtonPollType) KeyboardButton
SetRequestPoll sets the `request_poll` value of KeyboardButton.
func (KeyboardButton) SetRequestUsers ¶ added in v0.10.7
func (b KeyboardButton) SetRequestUsers(requestUsers KeyboardButtonRequestUsers) KeyboardButton
SetRequestUsers sets the `request_users` value of KeyboardButton.
func (KeyboardButton) SetWebApp ¶ added in v0.10.7
func (b KeyboardButton) SetWebApp(webApp WebAppInfo) KeyboardButton
SetWebApp sets the `web_app` value of KeyboardButton.
type KeyboardButtonPollType ¶
type KeyboardButtonPollType struct {
Type *string `json:"type,omitempty"` // "quiz", "regular", or anything
}
KeyboardButtonPollType is a struct for KeyboardButtonPollType
NOTE: Can be generated with NewKeyboardButtonPollType() function in types_helper.go
https://core.telegram.org/bots/api#keyboardbuttonpolltype
func NewKeyboardButtonPollType ¶ added in v0.10.7
func NewKeyboardButtonPollType(typ string) KeyboardButtonPollType
NewKeyboardButtonPollType returns a new KeyboardButtonPollType.
type KeyboardButtonRequestChat ¶
type KeyboardButtonRequestChat struct { RequestID int64 `json:"request_id"` ChatIsChannel bool `json:"chat_is_channel"` ChatIsForum *bool `json:"chat_is_forum,omitempty"` ChatHasUsername *bool `json:"chat_has_username,omitempty"` ChatIsCreated *bool `json:"chat_is_created,omitempty"` UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"` BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"` BotIsMember *bool `json:"bot_is_member,omitempty"` RequestTitle *bool `json:"request_title,omitempty"` RequestUsername *bool `json:"request_username,omitempty"` RequestPhoto *bool `json:"request_photo,omitempty"` }
KeyboardButtonRequestChat is a struct for `request_chat` in KeyboardButton
NOTE: Can be generated with NewKeyboardButtonRequestChat() function in types_helper.go
https://core.telegram.org/bots/api#keyboardbuttonrequestchat
func NewKeyboardButtonRequestChat ¶ added in v0.10.7
func NewKeyboardButtonRequestChat(requestID int64, isChannel bool) KeyboardButtonRequestChat
NewKeyboardButtonRequestChat returns a new KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetBotAdministratorRights ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetBotAdministratorRights(botAdminRights ChatAdministratorRights) KeyboardButtonRequestChat
SetBotAdministratorRights sets the `bot_administrator_rights` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetBotIsMember ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetBotIsMember(isMember bool) KeyboardButtonRequestChat
SetBotIsMember sets the `bot_is_member` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetChatHasUsername ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetChatHasUsername(hasUsername bool) KeyboardButtonRequestChat
SetChatHasUsername sets the `chat_has_username` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetChatIsCreated ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetChatIsCreated(isCreated bool) KeyboardButtonRequestChat
SetChatIsCreated sets the `chat_is_created` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetChatIsForum ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetChatIsForum(isForum bool) KeyboardButtonRequestChat
SetChatIsForum sets the `chat_is_forum` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetRequestPhoto ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetRequestPhoto(requestPhoto bool) KeyboardButtonRequestChat
SetRequestPhoto sets the `request_photo` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetRequestTitle ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetRequestTitle(requestTitle bool) KeyboardButtonRequestChat
SetRequestTitle sets the `request_title` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetRequestUsername ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetRequestUsername(requestUsername bool) KeyboardButtonRequestChat
SetRequestUsername sets the `request_username` value of KeyboardButtonRequestChat.
func (KeyboardButtonRequestChat) SetUserAdministratorRights ¶ added in v0.10.7
func (c KeyboardButtonRequestChat) SetUserAdministratorRights(userAdminRights ChatAdministratorRights) KeyboardButtonRequestChat
SetUserAdministratorRights sets the `user_administrator_rights` value of KeyboardButtonRequestChat.
type KeyboardButtonRequestUsers ¶
type KeyboardButtonRequestUsers struct { RequestID int64 `json:"request_id"` UserIsBot *bool `json:"user_is_bot,omitempty"` UserIsPremium *bool `json:"user_is_premium,omitempty"` MaxQuantity *int `json:"max_quantity,omitempty"` RequestName *bool `json:"request_name,omitempty"` RequestUsername *bool `json:"request_username,omitempty"` RequestPhoto *bool `json:"request_photo,omitempty"` }
KeyboardButtonRequestUsers is a struct for `request_users` in KeyboardButton
NOTE: Can be generated with NewKeyboardButtonRequestUsers() function in types_helper.go
https://core.telegram.org/bots/api#keyboardbuttonrequestusers
func NewKeyboardButtonRequestUsers ¶ added in v0.10.7
func NewKeyboardButtonRequestUsers(requestID int64) KeyboardButtonRequestUsers
NewKeyboardButtonRequestUsers returns a new KeyboardButtonRequestUsers.
func (KeyboardButtonRequestUsers) SetMaxQuantity ¶ added in v0.10.7
func (u KeyboardButtonRequestUsers) SetMaxQuantity(maxQuantity int) KeyboardButtonRequestUsers
SetMaxQuantity sets the `max_quantity` value of KeyboardButtonRequestUsers.
func (KeyboardButtonRequestUsers) SetRequestName ¶ added in v0.10.7
func (u KeyboardButtonRequestUsers) SetRequestName(requestName bool) KeyboardButtonRequestUsers
SetRequestName sets the `request_name` value of KeyboardButtonRequestUsers.
func (KeyboardButtonRequestUsers) SetRequestPhoto ¶ added in v0.10.7
func (u KeyboardButtonRequestUsers) SetRequestPhoto(requestPhoto bool) KeyboardButtonRequestUsers
SetRequestPhoto sets the `request_photo` value of KeyboardButtonRequestUsers.
func (KeyboardButtonRequestUsers) SetRequestUsername ¶ added in v0.10.7
func (u KeyboardButtonRequestUsers) SetRequestUsername(requestUsername bool) KeyboardButtonRequestUsers
SetRequestUsername sets the `request_username` value of KeyboardButtonRequestUsers.
func (KeyboardButtonRequestUsers) SetUserIsBot ¶ added in v0.10.7
func (u KeyboardButtonRequestUsers) SetUserIsBot(userIsBot bool) KeyboardButtonRequestUsers
SetUserIsBot sets the `user_is_bot` value of KeyboardButtonRequestUsers.
func (KeyboardButtonRequestUsers) SetUserIsPremium ¶ added in v0.10.7
func (u KeyboardButtonRequestUsers) SetUserIsPremium(userIsPremium bool) KeyboardButtonRequestUsers
SetUserIsPremium sets the `user_is_premium` value of KeyboardButtonRequestUsers.
type LabeledPrice ¶
LabeledPrice is a struct of labeled prices
type LinkPreviewOptions ¶
type LinkPreviewOptions struct { IsDisabled *bool `json:"is_disabled,omitempty"` URL *string `json:"url,omitempty"` PreferSmallMedia *bool `json:"prefer_small_media,omitempty"` PreferLargeMedia *bool `json:"prefer_large_media,omitempty"` ShowAboveText *bool `json:"show_above_text,omitempty"` }
LinkPreviewOptions is a struct for link preview
NOTE: Can be generated with NewLinkPreviewOptions() function in types_helper.go
https://core.telegram.org/bots/api#linkpreviewoptions
func NewLinkPreviewOptions ¶ added in v0.10.7
func NewLinkPreviewOptions() LinkPreviewOptions
NewLinkPreviewOptions returns a new LinkPreviewOptions.
func (LinkPreviewOptions) SetIsDisabled ¶ added in v0.10.7
func (o LinkPreviewOptions) SetIsDisabled(disabled bool) LinkPreviewOptions
SetIsDisabled sets the `is_disabled` value of LinkPreviewOptions.
func (LinkPreviewOptions) SetPreferLargeMedia ¶ added in v0.10.7
func (o LinkPreviewOptions) SetPreferLargeMedia(preferLargeMedia bool) LinkPreviewOptions
SetPreferLargeMedia sets the `prefer_large_media` value of LinkPreviewOptions.
func (LinkPreviewOptions) SetPreferSmallMedia ¶ added in v0.10.7
func (o LinkPreviewOptions) SetPreferSmallMedia(preferSmallMedia bool) LinkPreviewOptions
SetPreferSmallMedia sets the `prefer_small_media` value of LinkPreviewOptions.
func (LinkPreviewOptions) SetShowAboveText ¶ added in v0.10.7
func (o LinkPreviewOptions) SetShowAboveText(showAboveText bool) LinkPreviewOptions
SetShowAboveText sets the `show_above_text` value of LinkPreviewOptions.
func (LinkPreviewOptions) SetURL ¶ added in v0.10.7
func (o LinkPreviewOptions) SetURL(url string) LinkPreviewOptions
SetURL sets the `url` value of 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
type LoginURL ¶
type LoginURL struct { URL string `json:"url"` ForwardText *string `json:"forward_text,omitempty"` BotUsername *string `json:"bot_username,omitempty"` RequestWriteAccess *bool `json:"request_write_access,omitempty"` }
LoginURL is a struct for LoginURL
NOTE: Can be generated with NewLoginURL() function in types_helper.go
https://core.telegram.org/bots/api#loginurl
func NewLoginURL ¶ added in v0.10.7
NewLoginURL returns a new LoginURL.
func (LoginURL) SetBotUsername ¶ added in v0.10.7
SetBotUsername sets the `bot_username` value of LoginURL.
func (LoginURL) SetForwardText ¶ added in v0.10.7
SetForwardText sets the `forward_text` value of LoginURL.
func (LoginURL) SetRequestWriteAccess ¶ added in v0.10.7
SetRequestWriteAccess sets the `request_write_access` value of 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
NOTE: Can be generated with NewMaskPosition() function in types_helper.go
https://core.telegram.org/bots/api#maskposition
func NewMaskPosition ¶ added in v0.10.7
func NewMaskPosition(point MaskPositionPoint, xShift, yShift, scale float32) MaskPosition
NewMaskPosition returns a new MaskPosition.
type MaskPositionPoint ¶
type MaskPositionPoint string
MaskPositionPoint is a point in MaskPosition
https://core.telegram.org/bots/api#maskposition
const ( MaskPositionForehead MaskPositionPoint = "forehead" MaskPositionEyes MaskPositionPoint = "eyes" MaskPositionMouth MaskPositionPoint = "mouth" MaskPositionChin MaskPositionPoint = "chin" )
MaskPosition points
type MaybeInaccessibleMessage ¶
type MaybeInaccessibleMessage Message
MaybeInaccessibleMessage is a struct of a message that can be one of `Message` or `InaccessibleMessage`
https://core.telegram.org/bots/api#maybeinaccessiblemessage
func (*MaybeInaccessibleMessage) AsMessage ¶
func (m *MaybeInaccessibleMessage) AsMessage() (*Message, *InaccessibleMessage)
AsMessage returns its value as `Message` or `InaccessibleMessage`
func (*MaybeInaccessibleMessage) IsInaccessible ¶
func (m *MaybeInaccessibleMessage) IsInaccessible() bool
IsInaccessible returns true if it is inaccessible
type MenuButtonCommands ¶
type MenuButtonCommands struct {
Type string `json:"type"` // = "commands"
}
MenuButtonCommands is a struct for a menu button which opens the bot's commands list
type MenuButtonDefault ¶
type MenuButtonDefault struct {
Type string `json:"type"` // = "default"
}
MenuButtonDefault is a struct for a menu button with no specific value
type MenuButtonWebApp ¶
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
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"` 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"` 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 ¶
HasAnimation checks if Message has Animation.
func (*Message) HasCaption ¶
HasCaption checks if Message has Caption.
func (*Message) HasChannelChatCreated ¶
HasChannelChatCreated checks if Message has ChannelChatCreated.
func (*Message) HasContact ¶
HasContact checks if Message has Contact.
func (*Message) HasDeleteChatPhoto ¶
HasDeleteChatPhoto checks if Message has DeleteChatPhoto.
func (*Message) HasDocument ¶
HasDocument checks if Message has Document.
func (*Message) HasForwardFrom ¶
HasForwardFrom checks if Message has Forward.
func (*Message) HasForwardFromChat ¶
HasForwardFromChat checks if Message has Forward from chat.
func (*Message) HasGroupChatCreated ¶
HasGroupChatCreated checks if Message has GroupChatCreated.
func (*Message) HasLeftChatMember ¶
HasLeftChatMember checks if Message has LeftChatParticipant.
func (*Message) HasLocation ¶
HasLocation checks if Message has Location.
func (*Message) HasMessageEntities ¶
HasMessageEntities checks if Message has MessageEntities
func (*Message) HasNewChatMembers ¶
HasNewChatMembers checks if Message has NewChatParticipant.
func (*Message) HasNewChatPhoto ¶
HasNewChatPhoto checks if Message has NewChatPhoto.
func (*Message) HasNewChatTitle ¶
HasNewChatTitle checks if Message has NewChatTitle.
func (*Message) HasPinnedMessage ¶
HasPinnedMessage checks if Message has PinnedMessage.
func (*Message) HasReplyTo ¶
HasReplyTo checks if Message has ReplyTo.
func (*Message) HasSticker ¶
HasSticker checks if Message has Sticker.
func (*Message) HasSupergroupChatCreated ¶
HasSupergroupChatCreated checks if Message has SupergroupChatCreated.
func (*Message) LargestPhoto ¶
LargestPhoto returns a photo with the largest file size.
type MessageAutoDeleteTimerChanged ¶
type MessageAutoDeleteTimerChanged struct {
MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}
MessageAutoDeleteTimerChanged is service message: message auto delete timer changed
https://core.telegram.org/bots/api#messageautodeletetimerchanged
type MessageEntity ¶
type MessageEntity struct { Type MessageEntityType `json:"type"` Offset int `json:"offset"` Length int `json:"length"` URL *string `json:"url,omitempty"` // when Type == MessageEntityTypeTextLink User *User `json:"user,omitempty"` // when Type == MessageEntityTypeTextMention Language *string `json:"language,omitempty"` // when Type == MessageEntityTypePre CustomEmojiID *string `json:"custom_emoji_id,omitempty"` // when Type == MessageEntityTypeCustomEmoji }
MessageEntity is a struct of a message entity
NOTE: Can be generated with NewMessageEntity() function in types_helper.go
https://core.telegram.org/bots/api#messageentity
func NewMessageEntity ¶ added in v0.10.7
func NewMessageEntity(typ MessageEntityType, offset, length int) MessageEntity
NewMessageEntity returns a new MessageEntity.
func (MessageEntity) SetCustomEmojiID ¶ added in v0.10.7
func (m MessageEntity) SetCustomEmojiID(customEmojiID string) MessageEntity
SetCustomEmojiID sets the `custom_emoji_id` value of MessageEntity.
func (MessageEntity) SetLanguage ¶ added in v0.10.7
func (m MessageEntity) SetLanguage(language string) MessageEntity
SetLanguage sets the `language` value of MessageEntity.
func (MessageEntity) SetURL ¶ added in v0.10.7
func (m MessageEntity) SetURL(url string) MessageEntity
SetURL sets the `url` value of MessageEntity.
func (MessageEntity) SetUser ¶ added in v0.10.7
func (m MessageEntity) SetUser(user User) MessageEntity
SetUser sets the `user` value of MessageEntity.
type MessageEntityType ¶
type MessageEntityType string
MessageEntityType is a type of MessageEntity
https://core.telegram.org/bots/api#messageentity
const ( MessageEntityTypeMention MessageEntityType = "mention" MessageEntityTypeHashTag MessageEntityType = "hashtag" MessageEntityTypeCashTag MessageEntityType = "cashtag" MessageEntityTypeBotCommand MessageEntityType = "bot_command" MessageEntityTypeURL MessageEntityType = "url" MessageEntityTypeEmail MessageEntityType = "email" MessageEntityTypePhoneNumber MessageEntityType = "phone_number" MessageEntityTypeBold MessageEntityType = "bold" MessageEntityTypeItalic MessageEntityType = "italic" MessageEntityTypeUnderline MessageEntityType = "underline" MessageEntityTypeStrikethrough MessageEntityType = "strikethrough" MessageEntityTypeSpoiler MessageEntityType = "spoiler" MessageEntityTypeBlockquote MessageEntityType = "blockquote" MessageEntityTypeCode MessageEntityType = "code" MessageEntityTypePre MessageEntityType = "pre" MessageEntityTypeTextLink MessageEntityType = "text_link" MessageEntityTypeTextMention MessageEntityType = "text_mention" MessageEntityTypeCustomEmoji MessageEntityType = "custom_emoji" )
MessageEntityType strings
type MessageID ¶
type MessageID struct {
MessageID int64 `json:"message_id"`
}
MessageID is a struct of message id
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
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
type MethodOptions ¶
MethodOptions is a type for methods' options parameter.
type OptionsAddStickerToSet ¶
type OptionsAddStickerToSet MethodOptions
OptionsAddStickerToSet struct for AddStickerToSet()
options include: nothing for now
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 (o OptionsAnswerCallbackQuery) SetShowAlert(showAlert bool) OptionsAnswerCallbackQuery
func (OptionsAnswerCallbackQuery) SetText ¶
func (o OptionsAnswerCallbackQuery) SetText(text string) OptionsAnswerCallbackQuery
SetText sets the `text` value of OptionsAnswerCallbackQuery.
func (OptionsAnswerCallbackQuery) SetURL ¶
func (o OptionsAnswerCallbackQuery) SetURL(url string) OptionsAnswerCallbackQuery
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 ¶
func (o OptionsAnswerInlineQuery) SetButton(button InlineQueryResultsButton) OptionsAnswerInlineQuery
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 ¶
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 ¶
func (o OptionsCreateChatInviteLink) SetName(name string) OptionsCreateChatInviteLink
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 ¶
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 ¶
func (o OptionsCreateInvoiceLink) SetPhotoURL(photoURL string) OptionsCreateInvoiceLink
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 ¶
func (o OptionsCreateNewStickerSet) SetStickerType(stickerType StickerType) OptionsCreateNewStickerSet
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 ¶
func (o OptionsDeleteMyCommands) SetScope(scope any) OptionsDeleteMyCommands
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 ¶
func (o OptionsEditForumTopic) SetName(name string) OptionsEditForumTopic
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 ¶
func (o OptionsEditMessageCaption) SetCaption(caption string) OptionsEditMessageCaption
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 ¶
func (o OptionsEditMessageCaption) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageCaption
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 ¶
func (o OptionsEditMessageCaption) SetParseMode(parseMode ParseMode) OptionsEditMessageCaption
SetParseMode sets the `parse_mode` value of OptionsEditMessageCaption.
func (OptionsEditMessageCaption) SetReplyMarkup ¶
func (o OptionsEditMessageCaption) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageCaption
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 ¶
func (o OptionsEditMessageLiveLocation) SetHeading(heading int) OptionsEditMessageLiveLocation
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 ¶
func (o OptionsEditMessageLiveLocation) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageLiveLocation
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 ¶
func (o OptionsEditMessageLiveLocation) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageLiveLocation
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 ¶
func (o OptionsEditMessageMedia) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageMedia
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 ¶
func (o OptionsEditMessageReplyMarkup) SetIDs(chatID ChatID, messageID int64) OptionsEditMessageReplyMarkup
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 ¶
func (o OptionsEditMessageReplyMarkup) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageReplyMarkup
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 ¶
func (o OptionsEditMessageText) SetEntities(entities []MessageEntity) OptionsEditMessageText
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 ¶
func (o OptionsEditMessageText) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsEditMessageText
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 ¶
func (o OptionsGetChatMenuButton) SetChatID(chatID ChatID) OptionsGetChatMenuButton
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 ¶
func (o OptionsGetMyDefaultAdministratorRights) SetForChannels(forChannels bool) OptionsGetMyDefaultAdministratorRights
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 ¶
func (o OptionsGetUserProfilePhotos) SetLimit(limit int) OptionsGetUserProfilePhotos
SetLimit sets the `limit` value of OptionsGetUserProfilePhotos.
func (OptionsGetUserProfilePhotos) SetOffset ¶
func (o OptionsGetUserProfilePhotos) SetOffset(offset int) OptionsGetUserProfilePhotos
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 ¶
func (o OptionsRestrictChatMember) SetUntilDate(until int) OptionsRestrictChatMember
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 ¶
func (o OptionsSetChatMenuButton) SetChatID(chatID ChatID) OptionsSetChatMenuButton
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 ¶
func (o OptionsSetCustomEmojiStickerSetThumbnail) SetCustomEmojiID(customEmojiID string) OptionsSetCustomEmojiStickerSetThumbnail
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 ¶
func (o OptionsSetMessageReaction) SetIsBig(isBig bool) OptionsSetMessageReaction
SetIsBig sets the `is_big` value of OptionsSetMessageReaction.
func (OptionsSetMessageReaction) SetReaction ¶
func (o OptionsSetMessageReaction) SetReaction(reactions []ReactionType) OptionsSetMessageReaction
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 ¶
func (o OptionsSetMyDefaultAdministratorRights) SetForChannels(forChannels bool) OptionsSetMyDefaultAdministratorRights
SetForChannels sets the `for_channels` value of OptionsSetMyDefaultAdministratorRights.
func (OptionsSetMyDefaultAdministratorRights) SetRights ¶
func (o OptionsSetMyDefaultAdministratorRights) SetRights(rights ChatAdministratorRights) OptionsSetMyDefaultAdministratorRights
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 ¶
func (o OptionsSetStickerMaskPosition) SetMaskPosition(maskPosition MaskPosition) OptionsSetStickerMaskPosition
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 ¶
func (o OptionsSetStickerSetThumbnail) SetThumbnail(thumbnail InputFile) OptionsSetStickerSetThumbnail
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 ¶
func (o OptionsStopMessageLiveLocation) SetIDs(chatID ChatID, messageID int64) OptionsStopMessageLiveLocation
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 ¶
func (o OptionsStopMessageLiveLocation) SetReplyMarkup(replyMarkup InlineKeyboardMarkup) OptionsStopMessageLiveLocation
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
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
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
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
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
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
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
type ReactionCount ¶
type ReactionCount struct { Type ReactionType `json:"type"` TotalCount int `json:"total_count"` }
ReactionCount is a struct for a count of reactions
type ReactionType ¶
type ReactionType struct { Type string `json:"type"` Emoji *string `json:"emoji,omitempty"` CustomEmojiID *string `json:"custom_emoji_id,omitempty"` }
ReactionType is a struct for a reaction
NOTE: Can be generated with New*Reaction*() functions in types_helper.go
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
NOTE: Can be generated with NewReplyKeyboardMarkup() function in types_helper.go
https://core.telegram.org/bots/api#replykeyboardmarkup
func NewReplyKeyboardMarkup ¶ added in v0.10.7
func NewReplyKeyboardMarkup(keyboard [][]KeyboardButton) ReplyKeyboardMarkup
NewReplyKeyboardMarkup returns a new ReplyKeyboardMarkup.
func (ReplyKeyboardMarkup) SetInputFieldPlaceholder ¶ added in v0.10.7
func (m ReplyKeyboardMarkup) SetInputFieldPlaceholder(placeholder string) ReplyKeyboardMarkup
SetInputFieldPlaceholder sets the `input_field_placeholder` value of ReplyKeyboardMarkup.
func (ReplyKeyboardMarkup) SetIsPersistent ¶ added in v0.10.7
func (m ReplyKeyboardMarkup) SetIsPersistent(persistent bool) ReplyKeyboardMarkup
SetIsPersistent sets the `is_persistent` value of ReplyKeyboardMarkup.
func (ReplyKeyboardMarkup) SetOneTimeKeyboard ¶ added in v0.10.7
func (m ReplyKeyboardMarkup) SetOneTimeKeyboard(oneTimeKeyboard bool) ReplyKeyboardMarkup
SetOneTimeKeyboard sets the `one_time_keyboard` value of ReplyKeyboardMarkup.
func (ReplyKeyboardMarkup) SetResizeKeyboard ¶ added in v0.10.7
func (m ReplyKeyboardMarkup) SetResizeKeyboard(resizeKeyboard bool) ReplyKeyboardMarkup
SetResizeKeyboard sets the `resize_keyboard` value of ReplyKeyboardMarkup.
func (ReplyKeyboardMarkup) SetSelective ¶ added in v0.10.7
func (m ReplyKeyboardMarkup) SetSelective(selective bool) ReplyKeyboardMarkup
SetSelective sets the `selective` value of ReplyKeyboardMarkup.
type ReplyKeyboardRemove ¶
type ReplyKeyboardRemove struct { RemoveKeyboard bool `json:"remove_keyboard"` Selective *bool `json:"selective,omitempty"` }
ReplyKeyboardRemove is a struct for ReplyKeyboardRemove
NOTE: Can be generated with NewReplyKeyboardRemove() function in types_helper.go
https://core.telegram.org/bots/api#replykeyboardremove
func NewReplyKeyboardRemove ¶ added in v0.10.7
func NewReplyKeyboardRemove(remove bool) ReplyKeyboardRemove
NewReplyKeyboardRemove returns a new ReplyKeyboardRemove.
func (ReplyKeyboardRemove) SetSelective ¶ added in v0.10.7
func (r ReplyKeyboardRemove) SetSelective(selective bool) ReplyKeyboardRemove
SetSelective sets the `selective` value of ReplyKeyboardRemove.
type ReplyParameters ¶
type ReplyParameters struct { MessageID int64 `json:"message_id"` ChatID *ChatID `json:"chat_id,omitempty"` AllowSendingWithoutReply *bool `json:"allow_sending_without_reply,omitempty"` Quote *string `json:"quote,omitempty"` QuoteParseMode *ParseMode `json:"quote_parse_mode,omitempty"` QuoteEntities []MessageEntity `json:"quote_entities,omitempty"` QuotePosition *int `json:"quote_position,omitempty"` }
ReplyParameters is a struct for replying messages
NOTE: Can be generated with NewReplyParameters() function in types_helper.go
https://core.telegram.org/bots/api#replyparameters
func NewReplyParameters ¶ added in v0.10.7
func NewReplyParameters(messageID int64) ReplyParameters
NewReplyParameters returns a new ReplyParameters.
func (ReplyParameters) SetAllowSendingWithoutReply ¶ added in v0.10.7
func (p ReplyParameters) SetAllowSendingWithoutReply(allowSendingWithoutReply bool) ReplyParameters
SetAllowSendingWithoutReply sets the `allow_sending_without_reply` value of ReplyParameters.
func (ReplyParameters) SetChatID ¶ added in v0.10.7
func (p ReplyParameters) SetChatID(chatID ChatID) ReplyParameters
SetChatID sets the `chat_id` value of ReplyParameters.
func (ReplyParameters) SetQuote ¶ added in v0.10.7
func (p ReplyParameters) SetQuote(quote string) ReplyParameters
SetQuote sets the `quote` value of ReplyParameters.
func (ReplyParameters) SetQuoteEntities ¶ added in v0.10.7
func (p ReplyParameters) SetQuoteEntities(entities []MessageEntity) ReplyParameters
SetQuoteEntities sets the `quote_entities` value of ReplyParameters.
func (ReplyParameters) SetQuoteParseMode ¶ added in v0.10.7
func (p ReplyParameters) SetQuoteParseMode(parseMode ParseMode) ReplyParameters
SetQuoteParseMode sets the `quote_parse_mode` value of ReplyParameters.
func (ReplyParameters) SetQuotePosition ¶ added in v0.10.7
func (p ReplyParameters) SetQuotePosition(position int) ReplyParameters
SetQuotePosition sets the `quote_position` value of ReplyParameters.
type SentWebAppMessage ¶
type SentWebAppMessage struct {
InlineMessageID *string `json:"inline_message_id,omitempty"`
}
SentWebAppMessage is a struct for an inline message sent by web app
type SharedUser ¶ added in v0.10.6
type SharedUser struct {}
SharedUser is a struct for a user which was shared with the bot using KeyboardButtonRequestUser button.
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
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
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
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
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
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 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
type SwitchInlineQueryChosenChat ¶
type SwitchInlineQueryChosenChat struct { Query *string `json:"query,omitempty"` AllowUserChats *bool `json:"allow_user_chats,omitempty"` AllowBotChats *bool `json:"allow_bot_chats,omitempty"` AllowGroupChats *bool `json:"allow_group_chats,omitempty"` AllowChannelChats *bool `json:"allow_channel_chats,omitempty"` }
SwitchInlineQueryChosenChat is a struct for SwitchInlineQueryChosenChat
NOTE: Can be generated with NewSwitchInlineQueryChosenChat() function in types_helper.go
https://core.telegram.org/bots/api#switchinlinequerychosenchat
func NewSwitchInlineQueryChosenChat ¶ added in v0.10.7
func NewSwitchInlineQueryChosenChat() SwitchInlineQueryChosenChat
NewSwitchInlineQueryChosenChat returns a new SwitchInlineQueryChosenChat.
func (SwitchInlineQueryChosenChat) SetAllowBotChats ¶ added in v0.10.7
func (c SwitchInlineQueryChosenChat) SetAllowBotChats(allow bool) SwitchInlineQueryChosenChat
SetAllowBotChats sets the `allow_bot_chats` value of SwitchInlineQueryChosenChat.
func (SwitchInlineQueryChosenChat) SetAllowChannelChats ¶ added in v0.10.7
func (c SwitchInlineQueryChosenChat) SetAllowChannelChats(allow bool) SwitchInlineQueryChosenChat
SetAllowChannelChats sets the `allow_channel_chats` value of SwitchInlineQueryChosenChat.
func (SwitchInlineQueryChosenChat) SetAllowGroupChats ¶ added in v0.10.7
func (c SwitchInlineQueryChosenChat) SetAllowGroupChats(allow bool) SwitchInlineQueryChosenChat
SetAllowGroupChats sets the `allow_group_chats` value of SwitchInlineQueryChosenChat.
func (SwitchInlineQueryChosenChat) SetAllowUserChats ¶ added in v0.10.7
func (c SwitchInlineQueryChosenChat) SetAllowUserChats(allow bool) SwitchInlineQueryChosenChat
SetAllowUserChats sets the `allow_user_chats` value of SwitchInlineQueryChosenChat.
func (SwitchInlineQueryChosenChat) SetQuery ¶ added in v0.10.7
func (c SwitchInlineQueryChosenChat) SetQuery(query string) SwitchInlineQueryChosenChat
SetQuery sets the `query` value of SwitchInlineQueryChosenChat.
type TextQuote ¶
type TextQuote struct { Text string `json:"text"` Entities []MessageEntity `json:"entities,omitempty"` Position int `json:"position"` IsManual *bool `json:"is_manual,omitempty"` }
TextQuote is a struct of a text quote
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 ¶
GetChannelPost returns usable channel post property from Update.
func (*Update) GetFrom ¶
GetFrom returns the `from` value from Update.
NOTE: `Poll` type doesn't have `from` property.
func (*Update) GetMessage ¶
GetMessage returns usable message property from Update.
func (*Update) HasCallbackQuery ¶
HasCallbackQuery checks if Update has CallbackQuery
func (*Update) HasChannelPost ¶
HasChannelPost checks if Update has ChannelPost.
func (*Update) HasChatJoinRequest ¶
HasChatJoinRequest checks if Update has ChatJoinRequest.
func (*Update) HasChatMember ¶
HasChatMember checks if Update has ChatMember.
func (*Update) HasChosenInlineResult ¶
HasChosenInlineResult checks if Update has ChosenInlineResult
func (*Update) HasEditedChannelPost ¶
HasEditedChannelPost checks if Update has EditedChannelPost.
func (*Update) HasEditedMessage ¶
HasEditedMessage checks if Update has EditedMessage.
func (*Update) HasInlineQuery ¶
HasInlineQuery checks if Update has InlineQuery
func (*Update) HasMessage ¶
HasMessage checks if Update has Message.
func (*Update) HasMyChatMember ¶
HasMyChatMember checks if Update has MyChatMember.
func (*Update) HasPollAnswer ¶
HasPollAnswer checks if Update has PollAnswer.
func (*Update) HasPreCheckoutQuery ¶
HasPreCheckoutQuery checks if Update has PreCheckoutQuery
func (*Update) HasShippingQuery ¶
HasShippingQuery checks if Update has ShippingQuery
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 (User) InlineLink ¶
InlineLink generates an inline link for User
type UserChatBoosts ¶
type UserChatBoosts struct {
Boosts []ChatBoost `json:"boosts"`
}
UserChatBoosts is a struct for a user's chat boosts
type UserProfilePhotos ¶
type UserProfilePhotos struct { TotalCount int `json:"total_count"` Photos [][]PhotoSize `json:"photos"` }
UserProfilePhotos is a struct for user profile photos
type UsersShared ¶
type UsersShared struct {}
UsersShared is a struct for users who shared the message.
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
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
type VideoChatEnded ¶
type VideoChatEnded struct {
Duration int `json:"duration"`
}
VideoChatEnded is a struct for service message: video chat ended
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
type VideoChatStarted ¶
type VideoChatStarted struct{}
VideoChatStarted is a struct for service message: video chat started.
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
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
type WebAppData ¶
WebAppData is a struct of a web app data
type WebAppInfo ¶
type WebAppInfo struct {
URL string `json:"url"`
}
WebAppInfo is a struct of web app's information
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
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.