Documentation
¶
Index ¶
- Constants
- Variables
- func AddStickerToSet(ctx context.Context, userId int64, name string, sticker *InputSticker) (bool, error)
- func AnswerCallbackQuery(ctx context.Context, callbackQueryId string, opts ...*OptAnswerCallbackQuery) (bool, error)
- func AnswerInlineQuery(ctx context.Context, inlineQueryId string, results []InlineQueryResult, ...) (bool, error)
- func AnswerPreCheckoutQuery(ctx context.Context, preCheckoutQueryId string, ok bool, ...) (bool, error)
- func AnswerShippingQuery(ctx context.Context, shippingQueryId string, ok bool, ...) (bool, error)
- func ApproveChatJoinRequest(ctx context.Context, chatId int64, userId int64) (bool, error)
- func BanChatMember(ctx context.Context, chatId int64, userId int64, opts ...*OptBanChatMember) (bool, error)
- func BanChatSenderChat(ctx context.Context, chatId int64, senderChatId int64) (bool, error)
- func CallbackData[T any](upd *Update) (*T, error)
- func Close(ctx context.Context) (bool, error)
- func CloseForumTopic(ctx context.Context, chatId int64, messageThreadId int64) (bool, error)
- func CloseGeneralForumTopic(ctx context.Context, chatId int64) (bool, error)
- func CommonDeleteMessage(ctx context.Context, upd *Update) error
- func CreateInvoiceLink(ctx context.Context, title string, description string, payload string, ...) (string, error)
- func CreateNewStickerSet(ctx context.Context, userId int64, name string, title string, ...) (bool, error)
- func DeclineChatJoinRequest(ctx context.Context, chatId int64, userId int64) (bool, error)
- func DeleteChatPhoto(ctx context.Context, chatId int64) (bool, error)
- func DeleteChatStickerSet(ctx context.Context, chatId int64) (bool, error)
- func DeleteForumTopic(ctx context.Context, chatId int64, messageThreadId int64) (bool, error)
- func DeleteMessage(ctx context.Context, chatId int64, messageId int64) (bool, error)
- func DeleteMessages(ctx context.Context, chatId int64, messageIds []int64) (bool, error)
- func DeleteMyCommands(ctx context.Context, opts ...*OptDeleteMyCommands) (bool, error)
- func DeleteStickerFromSet(ctx context.Context, sticker string) (bool, error)
- func DeleteStickerSet(ctx context.Context, name string) (bool, error)
- func DeleteWebhook(ctx context.Context, opts ...*OptDeleteWebhook) (bool, error)
- func EditForumTopic(ctx context.Context, chatId int64, messageThreadId int64, ...) (bool, error)
- func EditGeneralForumTopic(ctx context.Context, chatId int64, name string) (bool, error)
- func EditUserStarSubscription(ctx context.Context, userId int64, telegramPaymentChargeId string, ...) (bool, error)
- func EscapeParseMode(encoding string, text string) string
- func ExportChatInviteLink(ctx context.Context, chatId int64) (string, error)
- func GenericDownload(ctx context.Context, path string, fileId string) error
- func GenericDownloadTemp(ctx context.Context, fileId string, dirAndPattern ...string) (filename string, err error)
- func GenericRequest[Request any, Result any](ctx context.Context, method string, request *Request) (result Result, err error)
- func GenericRequestMultipart[Request any, Result any](ctx context.Context, method string, request *Request) (result Result, err error)
- func GetChatMemberCount(ctx context.Context, chatId int64) (int64, error)
- func HTML(text string) string
- func HandleEditedAsMessage(ctx context.Context, upd *Update) bool
- func HideGeneralForumTopic(ctx context.Context, chatId int64) (bool, error)
- func IsApiError(err error) bool
- func IsTooManyRequests(err error) bool
- func LeaveChat(ctx context.Context, chatId int64) (bool, error)
- func LogOut(ctx context.Context) (bool, error)
- func Md(text string) string
- func OnAddedToGroup(ctx context.Context, upd *Update) bool
- func OnAnimation(ctx context.Context, upd *Update) bool
- func OnAudio(ctx context.Context, upd *Update) bool
- func OnAutomaticForward(ctx context.Context, upd *Update) bool
- func OnCallback(ctx context.Context, upd *Update) bool
- func OnChatJoinRequest(ctx context.Context, upd *Update) bool
- func OnDocument(ctx context.Context, upd *Update) bool
- func OnEdited(ctx context.Context, upd *Update) bool
- func OnErrorExit(ctx context.Context, err error)
- func OnErrorLog(ctx context.Context, err error)
- func OnErrorPanic(ctx context.Context, err error)
- func OnForwarded(ctx context.Context, upd *Update) bool
- func OnMedia(ctx context.Context, upd *Update) bool
- func OnMessage(ctx context.Context, upd *Update) bool
- func OnPhoto(ctx context.Context, upd *Update) bool
- func OnPrivate(ctx context.Context, upd *Update) bool
- func OnPrivateMessage(ctx context.Context, upd *Update) bool
- func OnPublicMessage(ctx context.Context, upd *Update) bool
- func OnReply(ctx context.Context, upd *Update) bool
- func OnSticker(ctx context.Context, upd *Update) bool
- func OnText(ctx context.Context, upd *Update) bool
- func OnUrl(ctx context.Context, upd *Update) bool
- func OnVideo(ctx context.Context, upd *Update) bool
- func OnVideoNote(ctx context.Context, upd *Update) bool
- func OnVoice(ctx context.Context, upd *Update) bool
- func PinChatMessage(ctx context.Context, chatId int64, messageId int64, opts ...*OptPinChatMessage) (bool, error)
- func PromoteChatMember(ctx context.Context, chatId int64, userId int64, opts ...*OptPromoteChatMember) (bool, error)
- func RefundStarPayment(ctx context.Context, userId int64, telegramPaymentChargeId string) (bool, error)
- func ReopenForumTopic(ctx context.Context, chatId int64, messageThreadId int64) (bool, error)
- func ReopenGeneralForumTopic(ctx context.Context, chatId int64) (bool, error)
- func ReplaceStickerInSet(ctx context.Context, userId int64, name string, oldSticker string, ...) (bool, error)
- func RestrictChatMember(ctx context.Context, chatId int64, userId int64, permissions *ChatPermissions, ...) (bool, error)
- func SendChatAction(ctx context.Context, chatId int64, action string, opts ...*OptSendChatAction) (bool, error)
- func SendGift(ctx context.Context, userId int64, giftId string, opts ...*OptSendGift) (bool, error)
- func SetChatAdministratorCustomTitle(ctx context.Context, chatId int64, userId int64, customTitle string) (bool, error)
- func SetChatDescription(ctx context.Context, chatId int64, opts ...*OptSetChatDescription) (bool, error)
- func SetChatMenuButton(ctx context.Context, opts ...*OptSetChatMenuButton) (bool, error)
- func SetChatPermissions(ctx context.Context, chatId int64, permissions *ChatPermissions, ...) (bool, error)
- func SetChatPhoto(ctx context.Context, chatId int64, photo *LocalFile) (bool, error)
- func SetChatStickerSet(ctx context.Context, chatId int64, stickerSetName string) (bool, error)
- func SetChatTitle(ctx context.Context, chatId int64, title string) (bool, error)
- func SetCustomEmojiStickerSetThumbnail(ctx context.Context, name string, ...) (bool, error)
- func SetMessageReaction(ctx context.Context, chatId int64, messageId int64, ...) (bool, error)
- func SetMyCommands(ctx context.Context, commands []*BotCommand, opts ...*OptSetMyCommands) (bool, error)
- func SetMyDefaultAdministratorRights(ctx context.Context, opts ...*OptSetMyDefaultAdministratorRights) (bool, error)
- func SetMyDescription(ctx context.Context, opts ...*OptSetMyDescription) (bool, error)
- func SetMyName(ctx context.Context, opts ...*OptSetMyName) (bool, error)
- func SetMyShortDescription(ctx context.Context, opts ...*OptSetMyShortDescription) (bool, error)
- func SetPassportDataErrors(ctx context.Context, userId int64, errors []PassportElementError) (bool, error)
- func SetStickerEmojiList(ctx context.Context, sticker string, emojiList []string) (bool, error)
- func SetStickerKeywords(ctx context.Context, sticker string, opts ...*OptSetStickerKeywords) (bool, error)
- func SetStickerMaskPosition(ctx context.Context, sticker string, opts ...*OptSetStickerMaskPosition) (bool, error)
- func SetStickerPositionInSet(ctx context.Context, sticker string, position int64) (bool, error)
- func SetStickerSetThumbnail(ctx context.Context, name string, userId int64, format string, ...) (bool, error)
- func SetStickerSetTitle(ctx context.Context, name string, title string) (bool, error)
- func SetUserEmojiStatus(ctx context.Context, userId int64, opts ...*OptSetUserEmojiStatus) (bool, error)
- func SetWebhook(ctx context.Context, url string, opts ...*OptSetWebhook) (bool, error)
- func UnbanChatMember(ctx context.Context, chatId int64, userId int64, opts ...*OptUnbanChatMember) (bool, error)
- func UnbanChatSenderChat(ctx context.Context, chatId int64, senderChatId int64) (bool, error)
- func UnhideGeneralForumTopic(ctx context.Context, chatId int64) (bool, error)
- func UnpinAllChatMessages(ctx context.Context, chatId int64) (bool, error)
- func UnpinAllForumTopicMessages(ctx context.Context, chatId int64, messageThreadId int64) (bool, error)
- func UnpinAllGeneralForumTopicMessages(ctx context.Context, chatId int64) (bool, error)
- func UnpinChatMessage(ctx context.Context, chatId int64, opts ...*OptUnpinChatMessage) (bool, error)
- type AffiliateInfo
- type Album
- type Animation
- type Audio
- type BackgroundFill
- type BackgroundFillFreeformGradient
- type BackgroundFillGradient
- type BackgroundFillSolid
- type BackgroundType
- type BackgroundTypeChatTheme
- type BackgroundTypeFill
- func (impl *BackgroundTypeFill) OptChatTheme() *BackgroundTypeChatTheme
- func (impl *BackgroundTypeFill) OptFill() *BackgroundTypeFill
- func (impl *BackgroundTypeFill) OptPattern() *BackgroundTypePattern
- func (impl *BackgroundTypeFill) OptWallpaper() *BackgroundTypeWallpaper
- func (impl *BackgroundTypeFill) UnmarshalJSON(data []byte) error
- type BackgroundTypePattern
- func (impl *BackgroundTypePattern) OptChatTheme() *BackgroundTypeChatTheme
- func (impl *BackgroundTypePattern) OptFill() *BackgroundTypeFill
- func (impl *BackgroundTypePattern) OptPattern() *BackgroundTypePattern
- func (impl *BackgroundTypePattern) OptWallpaper() *BackgroundTypeWallpaper
- func (impl *BackgroundTypePattern) UnmarshalJSON(data []byte) error
- type BackgroundTypeWallpaper
- type Birthdate
- type Bot
- func (bot *Bot) Branch(pred FilterFunc, handler HandlerFunc) *Bot
- func (bot *Bot) Command(command string, handlerFunc HandlerFunc) *Bot
- func (bot *Bot) Context() context.Context
- func (bot *Bot) ContextWithCancel() (ctx context.Context, cancel context.CancelFunc)
- func (bot *Bot) Default(handler HandlerFunc) *Bot
- func (bot *Bot) Filter(pred ...FilterFunc) *Bot
- func (bot *Bot) Handle(handler HandlerFunc) *Bot
- func (bot *Bot) Help(commands ...string) *Bot
- func (bot *Bot) HelpScoped(scope BotCommandScope, commands ...string) *Bot
- func (bot *Bot) OnError(fn OnErrorFunc) *Bot
- func (bot *Bot) Plugin(plugin ...Plugin) *Bot
- func (bot *Bot) Scheduler(scheduler ...Scheduler) *Bot
- func (bot *Bot) Start(updates ...*Update)
- func (bot *Bot) Stop()
- func (bot *Bot) StopImmediately()
- type BotCommand
- type BotCommandScope
- type BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeAllChatAdministrators) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeAllChatAdministrators) OptAllGroupChats() *BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeAllChatAdministrators) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeAllChatAdministrators) OptChat() *BotCommandScopeChat
- func (impl *BotCommandScopeAllChatAdministrators) OptChatAdministrators() *BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeAllChatAdministrators) OptChatMember() *BotCommandScopeChatMember
- func (impl *BotCommandScopeAllChatAdministrators) OptDefault() *BotCommandScopeDefault
- type BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeAllGroupChats) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeAllGroupChats) OptAllGroupChats() *BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeAllGroupChats) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeAllGroupChats) OptChat() *BotCommandScopeChat
- func (impl *BotCommandScopeAllGroupChats) OptChatAdministrators() *BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeAllGroupChats) OptChatMember() *BotCommandScopeChatMember
- func (impl *BotCommandScopeAllGroupChats) OptDefault() *BotCommandScopeDefault
- type BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeAllPrivateChats) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeAllPrivateChats) OptAllGroupChats() *BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeAllPrivateChats) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeAllPrivateChats) OptChat() *BotCommandScopeChat
- func (impl *BotCommandScopeAllPrivateChats) OptChatAdministrators() *BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeAllPrivateChats) OptChatMember() *BotCommandScopeChatMember
- func (impl *BotCommandScopeAllPrivateChats) OptDefault() *BotCommandScopeDefault
- type BotCommandScopeChat
- func (impl *BotCommandScopeChat) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeChat) OptAllGroupChats() *BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeChat) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeChat) OptChat() *BotCommandScopeChat
- func (impl *BotCommandScopeChat) OptChatAdministrators() *BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeChat) OptChatMember() *BotCommandScopeChatMember
- func (impl *BotCommandScopeChat) OptDefault() *BotCommandScopeDefault
- type BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeChatAdministrators) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeChatAdministrators) OptAllGroupChats() *BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeChatAdministrators) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeChatAdministrators) OptChat() *BotCommandScopeChat
- func (impl *BotCommandScopeChatAdministrators) OptChatAdministrators() *BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeChatAdministrators) OptChatMember() *BotCommandScopeChatMember
- func (impl *BotCommandScopeChatAdministrators) OptDefault() *BotCommandScopeDefault
- type BotCommandScopeChatMember
- func (impl *BotCommandScopeChatMember) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeChatMember) OptAllGroupChats() *BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeChatMember) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeChatMember) OptChat() *BotCommandScopeChat
- func (impl *BotCommandScopeChatMember) OptChatAdministrators() *BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeChatMember) OptChatMember() *BotCommandScopeChatMember
- func (impl *BotCommandScopeChatMember) OptDefault() *BotCommandScopeDefault
- type BotCommandScopeDefault
- func (impl *BotCommandScopeDefault) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
- func (impl *BotCommandScopeDefault) OptAllGroupChats() *BotCommandScopeAllGroupChats
- func (impl *BotCommandScopeDefault) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
- func (impl *BotCommandScopeDefault) OptChat() *BotCommandScopeChat
- func (impl *BotCommandScopeDefault) OptChatAdministrators() *BotCommandScopeChatAdministrators
- func (impl *BotCommandScopeDefault) OptChatMember() *BotCommandScopeChatMember
- func (impl *BotCommandScopeDefault) OptDefault() *BotCommandScopeDefault
- type BotDescription
- type BotName
- type BotShortDescription
- type BranchPipe
- type BusinessConnection
- type BusinessIntro
- type BusinessLocation
- type BusinessMessagesDeleted
- type BusinessOpeningHours
- type BusinessOpeningHoursInterval
- type Button
- type ButtonI
- type CallbackButton
- type CallbackGame
- type CallbackQuery
- type Chat
- type ChatAdministratorRights
- type ChatBackground
- type ChatBoost
- type ChatBoostAdded
- type ChatBoostRemoved
- type ChatBoostSource
- type ChatBoostSourceGiftCode
- type ChatBoostSourceGiveaway
- type ChatBoostSourcePremium
- type ChatBoostUpdated
- type ChatFullInfo
- type ChatInviteLink
- func CreateChatInviteLink(ctx context.Context, chatId int64, opts ...*OptCreateChatInviteLink) (*ChatInviteLink, error)
- func CreateChatSubscriptionInviteLink(ctx context.Context, chatId int64, subscriptionPeriod int64, ...) (*ChatInviteLink, error)
- func EditChatInviteLink(ctx context.Context, chatId int64, inviteLink string, ...) (*ChatInviteLink, error)
- func EditChatSubscriptionInviteLink(ctx context.Context, chatId int64, inviteLink string, ...) (*ChatInviteLink, error)
- func RevokeChatInviteLink(ctx context.Context, chatId int64, inviteLink string) (*ChatInviteLink, error)
- type ChatJoinRequest
- type ChatLocation
- type ChatMember
- type ChatMemberAdministrator
- func (impl *ChatMemberAdministrator) OptAdministrator() *ChatMemberAdministrator
- func (impl *ChatMemberAdministrator) OptBanned() *ChatMemberBanned
- func (impl *ChatMemberAdministrator) OptLeft() *ChatMemberLeft
- func (impl *ChatMemberAdministrator) OptMember() *ChatMemberMember
- func (impl *ChatMemberAdministrator) OptOwner() *ChatMemberOwner
- func (impl *ChatMemberAdministrator) OptRestricted() *ChatMemberRestricted
- type ChatMemberBanned
- func (impl *ChatMemberBanned) OptAdministrator() *ChatMemberAdministrator
- func (impl *ChatMemberBanned) OptBanned() *ChatMemberBanned
- func (impl *ChatMemberBanned) OptLeft() *ChatMemberLeft
- func (impl *ChatMemberBanned) OptMember() *ChatMemberMember
- func (impl *ChatMemberBanned) OptOwner() *ChatMemberOwner
- func (impl *ChatMemberBanned) OptRestricted() *ChatMemberRestricted
- type ChatMemberLeft
- func (impl *ChatMemberLeft) OptAdministrator() *ChatMemberAdministrator
- func (impl *ChatMemberLeft) OptBanned() *ChatMemberBanned
- func (impl *ChatMemberLeft) OptLeft() *ChatMemberLeft
- func (impl *ChatMemberLeft) OptMember() *ChatMemberMember
- func (impl *ChatMemberLeft) OptOwner() *ChatMemberOwner
- func (impl *ChatMemberLeft) OptRestricted() *ChatMemberRestricted
- type ChatMemberMember
- func (impl *ChatMemberMember) OptAdministrator() *ChatMemberAdministrator
- func (impl *ChatMemberMember) OptBanned() *ChatMemberBanned
- func (impl *ChatMemberMember) OptLeft() *ChatMemberLeft
- func (impl *ChatMemberMember) OptMember() *ChatMemberMember
- func (impl *ChatMemberMember) OptOwner() *ChatMemberOwner
- func (impl *ChatMemberMember) OptRestricted() *ChatMemberRestricted
- type ChatMemberOwner
- func (impl *ChatMemberOwner) OptAdministrator() *ChatMemberAdministrator
- func (impl *ChatMemberOwner) OptBanned() *ChatMemberBanned
- func (impl *ChatMemberOwner) OptLeft() *ChatMemberLeft
- func (impl *ChatMemberOwner) OptMember() *ChatMemberMember
- func (impl *ChatMemberOwner) OptOwner() *ChatMemberOwner
- func (impl *ChatMemberOwner) OptRestricted() *ChatMemberRestricted
- type ChatMemberRestricted
- func (impl *ChatMemberRestricted) OptAdministrator() *ChatMemberAdministrator
- func (impl *ChatMemberRestricted) OptBanned() *ChatMemberBanned
- func (impl *ChatMemberRestricted) OptLeft() *ChatMemberLeft
- func (impl *ChatMemberRestricted) OptMember() *ChatMemberMember
- func (impl *ChatMemberRestricted) OptOwner() *ChatMemberOwner
- func (impl *ChatMemberRestricted) OptRestricted() *ChatMemberRestricted
- type ChatMemberUpdated
- type ChatPermissions
- type ChatPhoto
- type ChatShared
- type ChosenInlineResult
- type CloudFile
- type CommonArgsHandlerFunc
- type Config
- type ConfigHandleAlbum
- type Contact
- type CopyTextButton
- type Dice
- type Document
- type DownloadType
- type EncryptedCredentials
- type EncryptedPassportElement
- type Error
- type ErrorTooManyRequests
- type ExternalReplyInfo
- type File
- type FilterFunc
- func All(fn ...FilterFunc) FilterFunc
- func Either(fn ...FilterFunc) FilterFunc
- func Not(fn FilterFunc) FilterFunc
- func OnCallbackWithData[T any](pred ...func(value *T) bool) FilterFunc
- func OnChance(chance float64) FilterFunc
- func OnChannelPostInCommentsChat() FilterFunc
- func OnChat(chatId ...int64) FilterFunc
- func OnCommand(command string) FilterFunc
- func OnNewChatMember(filters ...func(user *User) bool) FilterFunc
- func OnSender(senderId ...int64) FilterFunc
- func OnTextRegexp(regex string) FilterFunc
- type ForceReply
- type ForumTopic
- type ForumTopicClosed
- type ForumTopicCreated
- type ForumTopicEdited
- type ForumTopicReopened
- type Game
- type GameHighScore
- type GeneralForumTopicHidden
- type GeneralForumTopicUnhidden
- type Gift
- type Gifts
- type Giveaway
- type GiveawayCompleted
- type GiveawayCreated
- type GiveawayWinners
- type HandlerFunc
- func Chain(handlers ...HandlerFunc) HandlerFunc
- func CommonArgs[T any](fn CommonArgsHandlerFunc[*T]) HandlerFunc
- func CommonReactionReply(emoji string, big ...bool) HandlerFunc
- func CommonTextReply(text string, asReply ...bool) HandlerFunc
- func Fallback(handlers ...HandlerFunc) HandlerFunc
- func FallbackWithMessage(handler HandlerFunc, msg string) HandlerFunc
- func HandleAlbum(fn func(ctx context.Context, updates []*Update) error, ...) HandlerFunc
- func Synced(handlerFunc HandlerFunc) HandlerFunc
- type InlineKeyboardButton
- type InlineKeyboardMarkup
- type InlineQuery
- type InlineQueryResult
- type InlineQueryResultArticle
- func (impl *InlineQueryResultArticle) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultArticle) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultArticle) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultArticle) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultArticle) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultArticle) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultArticle) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultArticle) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultArticle) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultArticle) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultArticle) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultArticle) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultArticle) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultArticle) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultArticle) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultArticle) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultArticle) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultArticle) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultArticle) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultArticle) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultArticle) UnmarshalJSON(data []byte) error
- type InlineQueryResultAudio
- func (impl *InlineQueryResultAudio) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultAudio) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultAudio) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultAudio) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultAudio) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultAudio) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultAudio) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultAudio) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultAudio) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultAudio) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultAudio) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultAudio) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultAudio) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultAudio) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultAudio) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultAudio) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultAudio) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultAudio) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultAudio) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultAudio) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultAudio) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedAudio) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedAudio) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedAudio) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedAudio) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedAudio) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedAudio) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedAudio) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedAudio) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedAudio) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedAudio) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedAudio) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedAudio) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedAudio) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedAudio) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedAudio) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedAudio) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedAudio) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedAudio) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedAudio) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedAudio) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedAudio) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedAudio) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedAudio) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedDocument) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedDocument) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedDocument) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedDocument) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedDocument) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedDocument) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedDocument) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedDocument) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedDocument) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedDocument) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedDocument) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedDocument) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedDocument) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedDocument) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedDocument) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedDocument) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedDocument) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedDocument) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedDocument) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedDocument) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedDocument) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedDocument) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedDocument) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedGif) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedGif) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedGif) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedGif) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedGif) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedGif) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedGif) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedGif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedGif) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedGif) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedGif) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedGif) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedGif) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedGif) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedGif) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedGif) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedGif) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedGif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedGif) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedGif) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedGif) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedGif) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedGif) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedMpeg4Gif) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedMpeg4Gif) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedMpeg4Gif) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedMpeg4Gif) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedMpeg4Gif) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedMpeg4Gif) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedMpeg4Gif) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedMpeg4Gif) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedMpeg4Gif) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedMpeg4Gif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedMpeg4Gif) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedMpeg4Gif) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedMpeg4Gif) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedMpeg4Gif) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedMpeg4Gif) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedPhoto) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedPhoto) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedPhoto) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedPhoto) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedPhoto) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedPhoto) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedPhoto) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedPhoto) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedPhoto) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedPhoto) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedPhoto) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedPhoto) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedPhoto) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedPhoto) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedPhoto) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedPhoto) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedPhoto) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedPhoto) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedPhoto) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedPhoto) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedPhoto) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedPhoto) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedPhoto) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedSticker) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedSticker) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedSticker) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedSticker) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedSticker) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedSticker) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedSticker) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedSticker) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedSticker) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedSticker) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedSticker) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedSticker) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedSticker) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedSticker) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedSticker) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedSticker) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedSticker) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedSticker) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedSticker) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedSticker) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedSticker) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedSticker) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedSticker) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedVideo) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedVideo) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedVideo) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedVideo) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedVideo) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedVideo) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedVideo) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedVideo) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedVideo) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedVideo) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedVideo) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedVideo) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedVideo) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedVideo) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedVideo) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedVideo) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedVideo) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedVideo) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedVideo) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedVideo) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedVideo) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedVideo) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedVideo) UnmarshalJSON(data []byte) error
- type InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedVoice) Download(ctx context.Context, path string) error
- func (impl *InlineQueryResultCachedVoice) DownloadTemp(ctx context.Context, dirAndPattern ...string) (filename string, err error)
- func (impl *InlineQueryResultCachedVoice) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultCachedVoice) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultCachedVoice) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultCachedVoice) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultCachedVoice) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultCachedVoice) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultCachedVoice) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultCachedVoice) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultCachedVoice) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultCachedVoice) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultCachedVoice) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultCachedVoice) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultCachedVoice) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultCachedVoice) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultCachedVoice) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultCachedVoice) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultCachedVoice) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultCachedVoice) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultCachedVoice) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultCachedVoice) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultCachedVoice) UnmarshalJSON(data []byte) error
- type InlineQueryResultContact
- func (impl *InlineQueryResultContact) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultContact) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultContact) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultContact) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultContact) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultContact) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultContact) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultContact) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultContact) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultContact) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultContact) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultContact) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultContact) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultContact) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultContact) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultContact) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultContact) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultContact) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultContact) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultContact) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultContact) UnmarshalJSON(data []byte) error
- type InlineQueryResultDocument
- func (impl *InlineQueryResultDocument) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultDocument) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultDocument) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultDocument) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultDocument) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultDocument) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultDocument) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultDocument) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultDocument) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultDocument) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultDocument) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultDocument) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultDocument) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultDocument) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultDocument) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultDocument) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultDocument) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultDocument) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultDocument) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultDocument) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultDocument) UnmarshalJSON(data []byte) error
- type InlineQueryResultGame
- func (impl *InlineQueryResultGame) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultGame) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultGame) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultGame) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultGame) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultGame) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultGame) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultGame) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultGame) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultGame) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultGame) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultGame) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultGame) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultGame) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultGame) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultGame) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultGame) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultGame) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultGame) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultGame) OptVoice() *InlineQueryResultVoice
- type InlineQueryResultGif
- func (impl *InlineQueryResultGif) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultGif) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultGif) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultGif) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultGif) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultGif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultGif) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultGif) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultGif) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultGif) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultGif) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultGif) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultGif) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultGif) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultGif) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultGif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultGif) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultGif) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultGif) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultGif) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultGif) UnmarshalJSON(data []byte) error
- type InlineQueryResultLocation
- func (impl *InlineQueryResultLocation) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultLocation) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultLocation) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultLocation) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultLocation) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultLocation) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultLocation) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultLocation) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultLocation) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultLocation) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultLocation) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultLocation) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultLocation) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultLocation) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultLocation) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultLocation) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultLocation) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultLocation) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultLocation) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultLocation) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultLocation) UnmarshalJSON(data []byte) error
- type InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultMpeg4Gif) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultMpeg4Gif) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultMpeg4Gif) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultMpeg4Gif) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultMpeg4Gif) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultMpeg4Gif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultMpeg4Gif) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultMpeg4Gif) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultMpeg4Gif) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultMpeg4Gif) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultMpeg4Gif) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultMpeg4Gif) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultMpeg4Gif) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultMpeg4Gif) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultMpeg4Gif) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultMpeg4Gif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultMpeg4Gif) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultMpeg4Gif) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultMpeg4Gif) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultMpeg4Gif) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultMpeg4Gif) UnmarshalJSON(data []byte) error
- type InlineQueryResultPhoto
- func (impl *InlineQueryResultPhoto) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultPhoto) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultPhoto) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultPhoto) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultPhoto) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultPhoto) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultPhoto) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultPhoto) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultPhoto) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultPhoto) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultPhoto) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultPhoto) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultPhoto) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultPhoto) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultPhoto) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultPhoto) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultPhoto) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultPhoto) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultPhoto) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultPhoto) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultPhoto) UnmarshalJSON(data []byte) error
- type InlineQueryResultVenue
- func (impl *InlineQueryResultVenue) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultVenue) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultVenue) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultVenue) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultVenue) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultVenue) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultVenue) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultVenue) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultVenue) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultVenue) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultVenue) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultVenue) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultVenue) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultVenue) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultVenue) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultVenue) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultVenue) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultVenue) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultVenue) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultVenue) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultVenue) UnmarshalJSON(data []byte) error
- type InlineQueryResultVideo
- func (impl *InlineQueryResultVideo) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultVideo) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultVideo) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultVideo) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultVideo) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultVideo) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultVideo) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultVideo) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultVideo) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultVideo) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultVideo) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultVideo) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultVideo) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultVideo) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultVideo) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultVideo) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultVideo) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultVideo) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultVideo) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultVideo) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultVideo) UnmarshalJSON(data []byte) error
- type InlineQueryResultVoice
- func (impl *InlineQueryResultVoice) OptArticle() *InlineQueryResultArticle
- func (impl *InlineQueryResultVoice) OptAudio() *InlineQueryResultAudio
- func (impl *InlineQueryResultVoice) OptCachedAudio() *InlineQueryResultCachedAudio
- func (impl *InlineQueryResultVoice) OptCachedDocument() *InlineQueryResultCachedDocument
- func (impl *InlineQueryResultVoice) OptCachedGif() *InlineQueryResultCachedGif
- func (impl *InlineQueryResultVoice) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
- func (impl *InlineQueryResultVoice) OptCachedPhoto() *InlineQueryResultCachedPhoto
- func (impl *InlineQueryResultVoice) OptCachedSticker() *InlineQueryResultCachedSticker
- func (impl *InlineQueryResultVoice) OptCachedVideo() *InlineQueryResultCachedVideo
- func (impl *InlineQueryResultVoice) OptCachedVoice() *InlineQueryResultCachedVoice
- func (impl *InlineQueryResultVoice) OptContact() *InlineQueryResultContact
- func (impl *InlineQueryResultVoice) OptDocument() *InlineQueryResultDocument
- func (impl *InlineQueryResultVoice) OptGame() *InlineQueryResultGame
- func (impl *InlineQueryResultVoice) OptGif() *InlineQueryResultGif
- func (impl *InlineQueryResultVoice) OptLocation() *InlineQueryResultLocation
- func (impl *InlineQueryResultVoice) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
- func (impl *InlineQueryResultVoice) OptPhoto() *InlineQueryResultPhoto
- func (impl *InlineQueryResultVoice) OptVenue() *InlineQueryResultVenue
- func (impl *InlineQueryResultVoice) OptVideo() *InlineQueryResultVideo
- func (impl *InlineQueryResultVoice) OptVoice() *InlineQueryResultVoice
- func (impl *InlineQueryResultVoice) UnmarshalJSON(data []byte) error
- type InlineQueryResultsButton
- type InputContactMessageContent
- func (impl *InputContactMessageContent) OptInputContactMessageContent() *InputContactMessageContent
- func (impl *InputContactMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
- func (impl *InputContactMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
- func (impl *InputContactMessageContent) OptInputTextMessageContent() *InputTextMessageContent
- func (impl *InputContactMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
- type InputFile
- type InputInvoiceMessageContent
- func (impl *InputInvoiceMessageContent) OptInputContactMessageContent() *InputContactMessageContent
- func (impl *InputInvoiceMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
- func (impl *InputInvoiceMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
- func (impl *InputInvoiceMessageContent) OptInputTextMessageContent() *InputTextMessageContent
- func (impl *InputInvoiceMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
- type InputLocationMessageContent
- func (impl *InputLocationMessageContent) OptInputContactMessageContent() *InputContactMessageContent
- func (impl *InputLocationMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
- func (impl *InputLocationMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
- func (impl *InputLocationMessageContent) OptInputTextMessageContent() *InputTextMessageContent
- func (impl *InputLocationMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
- type InputMedia
- type InputMessageContent
- type InputPaidMedia
- type InputPaidMediaPhoto
- type InputPaidMediaVideo
- type InputPollOption
- type InputSticker
- type InputTextMessageContent
- func (impl *InputTextMessageContent) OptInputContactMessageContent() *InputContactMessageContent
- func (impl *InputTextMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
- func (impl *InputTextMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
- func (impl *InputTextMessageContent) OptInputTextMessageContent() *InputTextMessageContent
- func (impl *InputTextMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
- type InputVenueMessageContent
- func (impl *InputVenueMessageContent) OptInputContactMessageContent() *InputContactMessageContent
- func (impl *InputVenueMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
- func (impl *InputVenueMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
- func (impl *InputVenueMessageContent) OptInputTextMessageContent() *InputTextMessageContent
- func (impl *InputVenueMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
- type Invoice
- type Keyboard
- type KeyboardButton
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- type KeyboardButtonRequestUsers
- type LabeledPrice
- type LinkPreviewOptions
- type LocalFile
- type Location
- type LoginUrl
- type MaskPosition
- type MenuButton
- type MenuButtonCommands
- type MenuButtonDefault
- type MenuButtonWebApp
- type Message
- func EditMessageCaption(ctx context.Context, opts ...*OptEditMessageCaption) (*Message, error)
- func EditMessageLiveLocation(ctx context.Context, latitude float64, longitude float64, ...) (*Message, error)
- func EditMessageMedia(ctx context.Context, media InputMedia, opts ...*OptEditMessageMedia) (*Message, error)
- func EditMessageReplyMarkup(ctx context.Context, opts ...*OptEditMessageReplyMarkup) (*Message, error)
- func EditMessageText(ctx context.Context, text string, opts ...*OptEditMessageText) (*Message, error)
- func ForwardMessage(ctx context.Context, chatId int64, fromChatId int64, messageId int64, ...) (*Message, error)
- func SendAnimation(ctx context.Context, chatId int64, animation InputFile, ...) (*Message, error)
- func SendAudio(ctx context.Context, chatId int64, audio InputFile, opts ...*OptSendAudio) (*Message, error)
- func SendContact(ctx context.Context, chatId int64, phoneNumber string, firstName string, ...) (*Message, error)
- func SendDice(ctx context.Context, chatId int64, opts ...*OptSendDice) (*Message, error)
- func SendDocument(ctx context.Context, chatId int64, document InputFile, ...) (*Message, error)
- func SendGame(ctx context.Context, chatId int64, gameShortName string, opts ...*OptSendGame) (*Message, error)
- func SendInvoice(ctx context.Context, chatId int64, title string, description string, ...) (*Message, error)
- func SendLocation(ctx context.Context, chatId int64, latitude float64, longitude float64, ...) (*Message, error)
- func SendMediaGroup(ctx context.Context, chatId int64, media Album, opts ...*OptSendMediaGroup) ([]*Message, error)
- func SendMessage(ctx context.Context, chatId int64, text string, opts ...*OptSendMessage) (*Message, error)
- func SendPaidMedia(ctx context.Context, chatId int64, starCount int64, media []InputPaidMedia, ...) (*Message, error)
- func SendPhoto(ctx context.Context, chatId int64, photo InputFile, opts ...*OptSendPhoto) (*Message, error)
- func SendPoll(ctx context.Context, chatId int64, question string, options []*InputPollOption, ...) (*Message, error)
- func SendSticker(ctx context.Context, chatId int64, sticker InputFile, opts ...*OptSendSticker) (*Message, error)
- func SendVenue(ctx context.Context, chatId int64, latitude float64, longitude float64, ...) (*Message, error)
- func SendVideo(ctx context.Context, chatId int64, video InputFile, opts ...*OptSendVideo) (*Message, error)
- func SendVideoNote(ctx context.Context, chatId int64, videoNote InputFile, ...) (*Message, error)
- func SendVoice(ctx context.Context, chatId int64, voice InputFile, opts ...*OptSendVoice) (*Message, error)
- func SetGameScore(ctx context.Context, userId int64, score int64, opts ...*OptSetGameScore) (*Message, error)
- func StopMessageLiveLocation(ctx context.Context, opts ...*OptStopMessageLiveLocation) (*Message, error)
- type MessageAutoDeleteTimerChanged
- type MessageEntity
- type MessageId
- func CopyMessage(ctx context.Context, chatId int64, fromChatId int64, messageId int64, ...) (*MessageId, error)
- func CopyMessages(ctx context.Context, chatId int64, fromChatId int64, messageIds []int64, ...) ([]*MessageId, error)
- func ForwardMessages(ctx context.Context, chatId int64, fromChatId int64, messageIds []int64, ...) ([]*MessageId, error)
- type MessageOrigin
- type MessageOriginChannel
- type MessageOriginChat
- type MessageOriginHiddenUser
- type MessageOriginUser
- type MessageReactionCountUpdated
- type MessageReactionUpdated
- type OnErrorFunc
- type OptAnswerCallbackQuery
- type OptAnswerInlineQuery
- type OptAnswerPreCheckoutQuery
- type OptAnswerShippingQuery
- type OptBanChatMember
- type OptCopyMessage
- type OptCopyMessages
- type OptCreateChatInviteLink
- type OptCreateChatSubscriptionInviteLink
- type OptCreateForumTopic
- type OptCreateInvoiceLink
- type OptCreateNewStickerSet
- type OptDeleteMyCommands
- type OptDeleteWebhook
- type OptEditChatInviteLink
- type OptEditChatSubscriptionInviteLink
- type OptEditForumTopic
- type OptEditMessageCaption
- type OptEditMessageLiveLocation
- type OptEditMessageMedia
- type OptEditMessageReplyMarkup
- type OptEditMessageText
- type OptForwardMessage
- type OptForwardMessages
- type OptGetChatMenuButton
- type OptGetGameHighScores
- type OptGetMyCommands
- type OptGetMyDefaultAdministratorRights
- type OptGetMyDescription
- type OptGetMyName
- type OptGetMyShortDescription
- type OptGetStarTransactions
- type OptGetUpdates
- type OptGetUserProfilePhotos
- type OptPinChatMessage
- type OptPromoteChatMember
- type OptRestrictChatMember
- type OptSavePreparedInlineMessage
- type OptSendAnimation
- type OptSendAudio
- type OptSendChatAction
- type OptSendContact
- type OptSendDice
- type OptSendDocument
- type OptSendGame
- type OptSendGift
- type OptSendInvoice
- type OptSendLocation
- type OptSendMediaGroup
- type OptSendMessage
- type OptSendPaidMedia
- type OptSendPhoto
- type OptSendPoll
- type OptSendSticker
- type OptSendVenue
- type OptSendVideo
- type OptSendVideoNote
- type OptSendVoice
- type OptSetChatDescription
- type OptSetChatMenuButton
- type OptSetChatPermissions
- type OptSetCustomEmojiStickerSetThumbnail
- type OptSetGameScore
- type OptSetMessageReaction
- type OptSetMyCommands
- type OptSetMyDefaultAdministratorRights
- type OptSetMyDescription
- type OptSetMyName
- type OptSetMyShortDescription
- type OptSetStickerKeywords
- type OptSetStickerMaskPosition
- type OptSetStickerSetThumbnail
- type OptSetUserEmojiStatus
- type OptSetWebhook
- type OptStopMessageLiveLocation
- type OptStopPoll
- type OptUnbanChatMember
- type OptUnpinChatMessage
- type OrderInfo
- type PaidMedia
- type PaidMediaInfo
- type PaidMediaPhoto
- type PaidMediaPreview
- type PaidMediaPurchased
- type PaidMediaVideo
- type PassportData
- type PassportElementError
- type PassportElementErrorDataField
- func (impl *PassportElementErrorDataField) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorDataField) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorDataField) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorDataField) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorDataField) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorDataField) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorDataField) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorDataField) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorDataField) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorFile
- func (impl *PassportElementErrorFile) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorFile) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorFile) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorFile) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorFile) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorFile) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorFile) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorFile) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorFile) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorFiles
- func (impl *PassportElementErrorFiles) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorFiles) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorFiles) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorFiles) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorFiles) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorFiles) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorFiles) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorFiles) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorFiles) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorFrontSide
- func (impl *PassportElementErrorFrontSide) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorFrontSide) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorFrontSide) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorFrontSide) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorFrontSide) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorFrontSide) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorFrontSide) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorFrontSide) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorFrontSide) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorReverseSide
- func (impl *PassportElementErrorReverseSide) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorReverseSide) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorReverseSide) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorReverseSide) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorReverseSide) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorReverseSide) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorReverseSide) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorReverseSide) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorReverseSide) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorSelfie
- func (impl *PassportElementErrorSelfie) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorSelfie) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorSelfie) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorSelfie) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorSelfie) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorSelfie) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorSelfie) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorSelfie) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorSelfie) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorTranslationFile
- func (impl *PassportElementErrorTranslationFile) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorTranslationFile) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorTranslationFile) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorTranslationFile) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorTranslationFile) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorTranslationFile) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorTranslationFile) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorTranslationFile) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorTranslationFile) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorTranslationFiles) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorTranslationFiles) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorTranslationFiles) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorTranslationFiles) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorTranslationFiles) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorTranslationFiles) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorTranslationFiles) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorTranslationFiles) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorTranslationFiles) OptUnspecified() *PassportElementErrorUnspecified
- type PassportElementErrorUnspecified
- func (impl *PassportElementErrorUnspecified) OptDataField() *PassportElementErrorDataField
- func (impl *PassportElementErrorUnspecified) OptFile() *PassportElementErrorFile
- func (impl *PassportElementErrorUnspecified) OptFiles() *PassportElementErrorFiles
- func (impl *PassportElementErrorUnspecified) OptFrontSide() *PassportElementErrorFrontSide
- func (impl *PassportElementErrorUnspecified) OptReverseSide() *PassportElementErrorReverseSide
- func (impl *PassportElementErrorUnspecified) OptSelfie() *PassportElementErrorSelfie
- func (impl *PassportElementErrorUnspecified) OptTranslationFile() *PassportElementErrorTranslationFile
- func (impl *PassportElementErrorUnspecified) OptTranslationFiles() *PassportElementErrorTranslationFiles
- func (impl *PassportElementErrorUnspecified) OptUnspecified() *PassportElementErrorUnspecified
- type PassportFile
- type Photo
- type PhotoSize
- type Plugin
- type PluginHookContext
- type PluginHookContextOnError
- type PluginHookContextOnFilter
- type PluginHookContextOnHandleFinish
- type PluginHookContextOnHandleStart
- type PluginHookContextOnUpdate
- type PluginHookType
- type Poll
- type PollAnswer
- type PollOption
- type PreCheckoutQuery
- type PreparedInlineMessage
- type ProximityAlertTriggered
- type ReactionCount
- type ReactionType
- type ReactionTypeCustomEmoji
- type ReactionTypeEmoji
- type ReactionTypePaid
- type RefundedPayment
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type ReplyParameters
- type ResponseParameters
- type RevenueWithdrawalState
- type RevenueWithdrawalStateFailed
- type RevenueWithdrawalStatePending
- type RevenueWithdrawalStateSucceeded
- type Scheduler
- type SchedulerClause
- type SentWebAppMessage
- type SharedUser
- type ShippingAddress
- type ShippingOption
- type ShippingQuery
- type StarTransaction
- type StarTransactions
- type Sticker
- type StickerSet
- type Story
- type SuccessfulPayment
- type SwitchInlineQueryChosenChat
- type SyncedGroup
- type TelegramAnimation
- type TelegramAudio
- type TelegramDocument
- type TelegramPhoto
- func (photo TelegramPhoto) Download(ctx context.Context, path string) error
- func (photo TelegramPhoto) DownloadTemp(ctx context.Context, dirAndPattern ...string) (string, error)
- func (photo TelegramPhoto) FileId() string
- func (photo TelegramPhoto) FileSize() int64
- func (photo TelegramPhoto) FileUniqueId() string
- func (photo TelegramPhoto) Height() int64
- func (photo TelegramPhoto) Width() int64
- type TelegramVideo
- type TextQuote
- type TransactionPartner
- type TransactionPartnerAffiliateProgram
- func (impl *TransactionPartnerAffiliateProgram) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
- func (impl *TransactionPartnerAffiliateProgram) OptFragment() *TransactionPartnerFragment
- func (impl *TransactionPartnerAffiliateProgram) OptOther() *TransactionPartnerOther
- func (impl *TransactionPartnerAffiliateProgram) OptTelegramAds() *TransactionPartnerTelegramAds
- func (impl *TransactionPartnerAffiliateProgram) OptTelegramApi() *TransactionPartnerTelegramApi
- func (impl *TransactionPartnerAffiliateProgram) OptUser() *TransactionPartnerUser
- type TransactionPartnerFragment
- func (impl *TransactionPartnerFragment) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
- func (impl *TransactionPartnerFragment) OptFragment() *TransactionPartnerFragment
- func (impl *TransactionPartnerFragment) OptOther() *TransactionPartnerOther
- func (impl *TransactionPartnerFragment) OptTelegramAds() *TransactionPartnerTelegramAds
- func (impl *TransactionPartnerFragment) OptTelegramApi() *TransactionPartnerTelegramApi
- func (impl *TransactionPartnerFragment) OptUser() *TransactionPartnerUser
- func (impl *TransactionPartnerFragment) UnmarshalJSON(data []byte) error
- type TransactionPartnerOther
- func (impl *TransactionPartnerOther) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
- func (impl *TransactionPartnerOther) OptFragment() *TransactionPartnerFragment
- func (impl *TransactionPartnerOther) OptOther() *TransactionPartnerOther
- func (impl *TransactionPartnerOther) OptTelegramAds() *TransactionPartnerTelegramAds
- func (impl *TransactionPartnerOther) OptTelegramApi() *TransactionPartnerTelegramApi
- func (impl *TransactionPartnerOther) OptUser() *TransactionPartnerUser
- type TransactionPartnerTelegramAds
- func (impl *TransactionPartnerTelegramAds) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
- func (impl *TransactionPartnerTelegramAds) OptFragment() *TransactionPartnerFragment
- func (impl *TransactionPartnerTelegramAds) OptOther() *TransactionPartnerOther
- func (impl *TransactionPartnerTelegramAds) OptTelegramAds() *TransactionPartnerTelegramAds
- func (impl *TransactionPartnerTelegramAds) OptTelegramApi() *TransactionPartnerTelegramApi
- func (impl *TransactionPartnerTelegramAds) OptUser() *TransactionPartnerUser
- type TransactionPartnerTelegramApi
- func (impl *TransactionPartnerTelegramApi) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
- func (impl *TransactionPartnerTelegramApi) OptFragment() *TransactionPartnerFragment
- func (impl *TransactionPartnerTelegramApi) OptOther() *TransactionPartnerOther
- func (impl *TransactionPartnerTelegramApi) OptTelegramAds() *TransactionPartnerTelegramAds
- func (impl *TransactionPartnerTelegramApi) OptTelegramApi() *TransactionPartnerTelegramApi
- func (impl *TransactionPartnerTelegramApi) OptUser() *TransactionPartnerUser
- type TransactionPartnerUser
- func (impl *TransactionPartnerUser) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
- func (impl *TransactionPartnerUser) OptFragment() *TransactionPartnerFragment
- func (impl *TransactionPartnerUser) OptOther() *TransactionPartnerOther
- func (impl *TransactionPartnerUser) OptTelegramAds() *TransactionPartnerTelegramAds
- func (impl *TransactionPartnerUser) OptTelegramApi() *TransactionPartnerTelegramApi
- func (impl *TransactionPartnerUser) OptUser() *TransactionPartnerUser
- func (impl *TransactionPartnerUser) UnmarshalJSON(data []byte) error
- type Update
- type User
- type UserChatBoosts
- type UserProfilePhotos
- type UsersShared
- type VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
- type Venue
- type Video
- type VideoChatEnded
- type VideoChatParticipantsInvited
- type VideoChatScheduled
- type VideoChatStarted
- type VideoNote
- type Voice
- type WebAppData
- type WebAppInfo
- type WebhookInfo
- type WriteAccessAllowed
Constants ¶
const ( EnvToken = envPrefix + "TOKEN" EnvTokenTesting = envPrefix + "TEST_TOKEN" EnvTestingChat = envPrefix + "TEST_CHAT" EnvTestingGroupChat = envPrefix + "TEST_GROUP_CHAT" EnvApiURL = envPrefix + "API_URL" EnvDownloadType = envPrefix + "DOWNLOAD_TYPE" // EnvOnError is either ignore/log/exit. EnvOnError = envPrefix + "ON_ERROR" EnvSyncedHandle = envPrefix + "SYNCED_HANDLE" EnvTimeoutHandle = envPrefix + "TIMEOUT_HANDLE" EnvTimeoutPolling = envPrefix + "TIMEOUT_POLL" )
const ( ContextToken = contextPrefix + "token" ContextTestToken = contextPrefix + "test_token" ContextHttpClient = contextPrefix + "http_client" ContextApiUrl = contextPrefix + "api_url" ContextFileDownloadType = contextPrefix + "file_downloader" ContextScheduler = contextPrefix + "scheduler" )
const ( ParseModeHTML = "HTML" ParseModeMarkdown = "Markdown" ParseModeMarkdownV2 = "MarkdownV2" )
const DefaultTelegramApiUrl = "https://api.telegram.org"
Variables ¶
var CommonReactionEmojiMap = map[string]string{}/* 192 elements not displayed */
Functions ¶
func AddStickerToSet ¶
func AddStickerToSet(ctx context.Context, userId int64, name string, sticker *InputSticker) (bool, error)
AddStickerToSet Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success.
func AnswerCallbackQuery ¶
func AnswerCallbackQuery(ctx context.Context, callbackQueryId string, opts ...*OptAnswerCallbackQuery) (bool, error)
AnswerCallbackQuery Use this method to send answers to callback queries sent from inline keyboards. On success, True is returned. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
func AnswerInlineQuery ¶
func AnswerInlineQuery(ctx context.Context, inlineQueryId string, results []InlineQueryResult, opts ...*OptAnswerInlineQuery) (bool, error)
AnswerInlineQuery Use this method to send answers to an inline query. On success, True is returned. No more than 50 results per query are allowed.
func AnswerPreCheckoutQuery ¶
func AnswerPreCheckoutQuery(ctx context.Context, preCheckoutQueryId string, ok bool, opts ...*OptAnswerPreCheckoutQuery) (bool, error)
AnswerPreCheckoutQuery Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
func AnswerShippingQuery ¶
func AnswerShippingQuery(ctx context.Context, shippingQueryId string, ok bool, opts ...*OptAnswerShippingQuery) (bool, error)
AnswerShippingQuery If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
func ApproveChatJoinRequest ¶
ApproveChatJoinRequest Use this method to approve a chat join request. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right.
func BanChatMember ¶
func BanChatMember(ctx context.Context, chatId int64, userId int64, opts ...*OptBanChatMember) (bool, error)
BanChatMember Use this method to ban a user in a group, a supergroup or a channel. Returns True on success. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
func BanChatSenderChat ¶
BanChatSenderChat Use this method to ban a channel chat in a supergroup or a channel. Returns True on success. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights.
func CallbackData ¶
func Close ¶
Close Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.
func CloseForumTopic ¶
CloseForumTopic Use this method to close an open topic in a forum supergroup chat. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic.
func CloseGeneralForumTopic ¶
CloseGeneralForumTopic Use this method to close an open 'General' topic in a forum supergroup chat. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights.
func CreateInvoiceLink ¶
func CreateInvoiceLink(ctx context.Context, title string, description string, payload string, currency string, prices []*LabeledPrice, opts ...*OptCreateInvoiceLink) (string, error)
CreateInvoiceLink Use this method to create a link for an invoice. Returns the created invoice link as String on success.
func CreateNewStickerSet ¶
func CreateNewStickerSet(ctx context.Context, userId int64, name string, title string, stickers []*InputSticker, opts ...*OptCreateNewStickerSet) (bool, error)
CreateNewStickerSet Use this method to create a new sticker set owned by a user. Returns True on success. The bot will be able to edit the sticker set thus created.
func DeclineChatJoinRequest ¶
DeclineChatJoinRequest Use this method to decline a chat join request. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right.
func DeleteChatPhoto ¶
DeleteChatPhoto Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func DeleteChatStickerSet ¶
DeleteChatStickerSet Use this method to delete a group sticker set from a supergroup. Returns True on success. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method.
func DeleteForumTopic ¶
DeleteForumTopic Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
func DeleteMessage ¶
DeleteMessage Use this method to delete a message, including service messages, with the following limitations: - A message can only be deleted if it was sent less than 48 hours ago. - Service messages about a supergroup, channel, or forum topic creation can't be deleted. - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - Bots can delete outgoing messages in private chats, groups, and supergroups. - Bots can delete incoming messages in private chats. - Bots granted can_post_messages permissions can delete outgoing messages in channels. - If the bot is an administrator of a group, it can delete any message there. - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there. Returns True on success.
func DeleteMessages ¶
DeleteMessages Use this method to delete multiple messages simultaneously. Returns True on success. If some of the specified messages can't be found, they are skipped.
func DeleteMyCommands ¶
func DeleteMyCommands(ctx context.Context, opts ...*OptDeleteMyCommands) (bool, error)
DeleteMyCommands Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
func DeleteStickerFromSet ¶
DeleteStickerFromSet Use this method to delete a sticker from a set created by the bot. Returns True on success.
func DeleteStickerSet ¶
DeleteStickerSet Use this method to delete a sticker set that was created by the bot. Returns True on success.
func DeleteWebhook ¶
func DeleteWebhook(ctx context.Context, opts ...*OptDeleteWebhook) (bool, error)
DeleteWebhook Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.
func EditForumTopic ¶
func EditForumTopic(ctx context.Context, chatId int64, messageThreadId int64, opts ...*OptEditForumTopic) (bool, error)
EditForumTopic Use this method to edit name and icon of a topic in a forum supergroup chat. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic.
func EditGeneralForumTopic ¶
EditGeneralForumTopic Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
func EditUserStarSubscription ¶
func EditUserStarSubscription(ctx context.Context, userId int64, telegramPaymentChargeId string, isCanceled bool) (bool, error)
EditUserStarSubscription Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
func EscapeParseMode ¶
EscapeParseMode helps with formatted messages. Use example: fmt.Sprintf("```python\n%s\n```", tg.EscapeParseMode(tg.ParseModeMarkdownV2, "print('hello world')")) Check https://core.telegram.org/bots/api#formatting-options for Telegram's documentation.
func ExportChatInviteLink ¶
ExportChatInviteLink Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
func GenericDownloadTemp ¶
func GenericRequest ¶
func GenericRequestMultipart ¶
func GetChatMemberCount ¶
GetChatMemberCount Use this method to get the number of members in a chat. Returns Int on success.
func HandleEditedAsMessage ¶
HandleEditedAsMessage basically reuses upd.EditedMessage as upd.Message, useful for getting track of any message changes in chats. It's a bit hacky:
tg.NewFromEnv(). Filter(tg.HandleEditedAsMessage). ...your handlers, filters, branches...
func HideGeneralForumTopic ¶
HideGeneralForumTopic Use this method to hide the 'General' topic in a forum supergroup chat. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open.
func IsApiError ¶
func IsTooManyRequests ¶
func LeaveChat ¶
LeaveChat Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
func LogOut ¶
LogOut Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.
func OnErrorExit ¶
func OnErrorLog ¶
func OnErrorPanic ¶
func PinChatMessage ¶
func PinChatMessage(ctx context.Context, chatId int64, messageId int64, opts ...*OptPinChatMessage) (bool, error)
PinChatMessage Use this method to add a message to the list of pinned messages in a chat. Returns True on success. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel.
func PromoteChatMember ¶
func PromoteChatMember(ctx context.Context, chatId int64, userId int64, opts ...*OptPromoteChatMember) (bool, error)
PromoteChatMember Use this method to promote or demote a user in a supergroup or a channel. Returns True on success. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user.
func RefundStarPayment ¶
func RefundStarPayment(ctx context.Context, userId int64, telegramPaymentChargeId string) (bool, error)
RefundStarPayment Refunds a successful payment in Telegram Stars. Returns True on success.
func ReopenForumTopic ¶
ReopenForumTopic Use this method to reopen a closed topic in a forum supergroup chat. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic.
func ReopenGeneralForumTopic ¶
ReopenGeneralForumTopic Use this method to reopen a closed 'General' topic in a forum supergroup chat. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden.
func ReplaceStickerInSet ¶
func ReplaceStickerInSet(ctx context.Context, userId int64, name string, oldSticker string, sticker *InputSticker) (bool, error)
ReplaceStickerInSet Use this method to replace an existing sticker in a sticker set with a new one. Returns True on success. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet.
func RestrictChatMember ¶
func RestrictChatMember(ctx context.Context, chatId int64, userId int64, permissions *ChatPermissions, opts ...*OptRestrictChatMember) (bool, error)
RestrictChatMember Use this method to restrict a user in a supergroup. Pass True for all permissions to lift restrictions from a user. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Returns True on success.
func SendChatAction ¶
func SendChatAction(ctx context.Context, chatId int64, action string, opts ...*OptSendChatAction) (bool, error)
SendChatAction Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success. We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
func SendGift ¶
SendGift Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.
func SetChatAdministratorCustomTitle ¶
func SetChatAdministratorCustomTitle(ctx context.Context, chatId int64, userId int64, customTitle string) (bool, error)
SetChatAdministratorCustomTitle Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
func SetChatDescription ¶
func SetChatDescription(ctx context.Context, chatId int64, opts ...*OptSetChatDescription) (bool, error)
SetChatDescription Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func SetChatMenuButton ¶
func SetChatMenuButton(ctx context.Context, opts ...*OptSetChatMenuButton) (bool, error)
SetChatMenuButton Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
func SetChatPermissions ¶
func SetChatPermissions(ctx context.Context, chatId int64, permissions *ChatPermissions, opts ...*OptSetChatPermissions) (bool, error)
SetChatPermissions Use this method to set default chat permissions for all members. Returns True on success. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights.
func SetChatPhoto ¶
SetChatPhoto Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func SetChatStickerSet ¶
SetChatStickerSet Use this method to set a new group sticker set for a supergroup. Returns True on success. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method.
func SetChatTitle ¶
SetChatTitle Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func SetCustomEmojiStickerSetThumbnail ¶
func SetCustomEmojiStickerSetThumbnail(ctx context.Context, name string, opts ...*OptSetCustomEmojiStickerSetThumbnail) (bool, error)
SetCustomEmojiStickerSetThumbnail Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.
func SetMessageReaction ¶
func SetMessageReaction(ctx context.Context, chatId int64, messageId int64, opts ...*OptSetMessageReaction) (bool, error)
SetMessageReaction Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.
func SetMyCommands ¶
func SetMyCommands(ctx context.Context, commands []*BotCommand, opts ...*OptSetMyCommands) (bool, error)
SetMyCommands Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.
func SetMyDefaultAdministratorRights ¶
func SetMyDefaultAdministratorRights(ctx context.Context, opts ...*OptSetMyDefaultAdministratorRights) (bool, error)
SetMyDefaultAdministratorRights Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success.
func SetMyDescription ¶
func SetMyDescription(ctx context.Context, opts ...*OptSetMyDescription) (bool, error)
SetMyDescription Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.
func SetMyName ¶
func SetMyName(ctx context.Context, opts ...*OptSetMyName) (bool, error)
SetMyName Use this method to change the bot's name. Returns True on success.
func SetMyShortDescription ¶
func SetMyShortDescription(ctx context.Context, opts ...*OptSetMyShortDescription) (bool, error)
SetMyShortDescription Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.
func SetPassportDataErrors ¶
func SetPassportDataErrors(ctx context.Context, userId int64, errors []PassportElementError) (bool, error)
SetPassportDataErrors Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success. Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.
func SetStickerEmojiList ¶
SetStickerEmojiList Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.
func SetStickerKeywords ¶
func SetStickerKeywords(ctx context.Context, sticker string, opts ...*OptSetStickerKeywords) (bool, error)
SetStickerKeywords Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.
func SetStickerMaskPosition ¶
func SetStickerMaskPosition(ctx context.Context, sticker string, opts ...*OptSetStickerMaskPosition) (bool, error)
SetStickerMaskPosition Use this method to change the mask position of a mask sticker. Returns True on success. The sticker must belong to a sticker set that was created by the bot.
func SetStickerPositionInSet ¶
SetStickerPositionInSet Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
func SetStickerSetThumbnail ¶
func SetStickerSetThumbnail(ctx context.Context, name string, userId int64, format string, opts ...*OptSetStickerSetThumbnail) (bool, error)
SetStickerSetThumbnail Use this method to set the thumbnail of a regular or mask sticker set. Returns True on success. The format of the thumbnail file must match the format of the stickers in the set.
func SetStickerSetTitle ¶
SetStickerSetTitle Use this method to set the title of a created sticker set. Returns True on success.
func SetUserEmojiStatus ¶
func SetUserEmojiStatus(ctx context.Context, userId int64, opts ...*OptSetUserEmojiStatus) (bool, error)
SetUserEmojiStatus Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.
func SetWebhook ¶
SetWebhook Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success. If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header "X-Telegram-Bot-Api-Secret-Token" with the secret token as content.
func UnbanChatMember ¶
func UnbanChatMember(ctx context.Context, chatId int64, userId int64, opts ...*OptUnbanChatMember) (bool, error)
UnbanChatMember Use this method to unban a previously banned user in a supergroup or channel. Returns True on success. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned.
func UnbanChatSenderChat ¶
UnbanChatSenderChat Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.
func UnhideGeneralForumTopic ¶
UnhideGeneralForumTopic Use this method to unhide the 'General' topic in a forum supergroup chat. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights.
func UnpinAllChatMessages ¶
UnpinAllChatMessages Use this method to clear the list of pinned messages in a chat. Returns True on success. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel.
func UnpinAllForumTopicMessages ¶
func UnpinAllForumTopicMessages(ctx context.Context, chatId int64, messageThreadId int64) (bool, error)
UnpinAllForumTopicMessages Use this method to clear the list of pinned messages in a forum topic. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup.
func UnpinAllGeneralForumTopicMessages ¶
UnpinAllGeneralForumTopicMessages Use this method to clear the list of pinned messages in a General forum topic. Returns True on success. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup.
func UnpinChatMessage ¶
func UnpinChatMessage(ctx context.Context, chatId int64, opts ...*OptUnpinChatMessage) (bool, error)
UnpinChatMessage Use this method to remove a message from the list of pinned messages in a chat. Returns True on success. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel.
Types ¶
type AffiliateInfo ¶
type AffiliateInfo struct {
// Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user
AffiliateUser *User `json:"affiliate_user,omitempty"`
// Optional. The chat that received an affiliate commission if it was received by a chat
AffiliateChat *Chat `json:"affiliate_chat,omitempty"`
// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users
CommissionPerMille int64 `json:"commission_per_mille"`
// Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds
Amount int64 `json:"amount"`
// Optional.
// The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds
NanostarAmount int64 `json:"nanostar_amount,omitempty"`
}
AffiliateInfo Contains information about the affiliate that received a commission via this transaction.
type Album ¶
type Album = []InputMedia
type Animation ¶
type Animation struct {
// Type of the result, must be animation
Type string `json:"type" default:"animation"`
// File to send. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
Media InputFile `json:"media"`
// Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
// The thumbnail should be in JPEG format and less than 200 kB in size.
// A thumbnail's width and height should not exceed 320.
// Ignored if the file is not uploaded using multipart/form-data.
// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
// More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// >> either: String
Thumbnail InputFile `json:"thumbnail,omitempty"`
// Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the animation caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Animation width
Width int64 `json:"width,omitempty"`
// Optional. Animation height
Height int64 `json:"height,omitempty"`
// Optional. Animation duration in seconds
Duration int64 `json:"duration,omitempty"`
// Optional. Pass True if the animation needs to be covered with a spoiler animation
HasSpoiler bool `json:"has_spoiler,omitempty"`
// Used for uploading media.
InputFile InputFile `json:"-"`
}
Animation Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
func (*Animation) OptAnimation ¶
func (*Animation) OptDocument ¶
type Audio ¶
type Audio struct {
// Type of the result, must be audio
Type string `json:"type" default:"audio"`
// File to send. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
Media InputFile `json:"media"`
// Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
// The thumbnail should be in JPEG format and less than 200 kB in size.
// A thumbnail's width and height should not exceed 320.
// Ignored if the file is not uploaded using multipart/form-data.
// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
// More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// >> either: String
Thumbnail InputFile `json:"thumbnail,omitempty"`
// Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Duration of the audio in seconds
Duration int64 `json:"duration,omitempty"`
// Optional. Performer of the audio
Performer string `json:"performer,omitempty"`
// Optional. Title of the audio
Title string `json:"title,omitempty"`
// Used for uploading media.
InputFile InputFile `json:"-"`
}
Audio Represents an audio file to be treated as music to be sent.
func (*Audio) OptAnimation ¶
func (*Audio) OptDocument ¶
type BackgroundFill ¶
type BackgroundFill interface {
OptSolid() *BackgroundFillSolid
OptGradient() *BackgroundFillGradient
OptFreeformGradient() *BackgroundFillFreeformGradient
}
BackgroundFill This object describes the way a background is filled based on the selected colors. Currently, it can be one of - BackgroundFillSolid - BackgroundFillGradient - BackgroundFillFreeformGradient
type BackgroundFillFreeformGradient ¶
type BackgroundFillFreeformGradient struct {
// Type of the background fill, always "freeform_gradient"
Type string `json:"type" default:"freeform_gradient"`
// A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format
Colors []int64 `json:"colors"`
}
BackgroundFillFreeformGradient The background is a freeform gradient that rotates after every message in the chat.
func (*BackgroundFillFreeformGradient) OptFreeformGradient ¶
func (impl *BackgroundFillFreeformGradient) OptFreeformGradient() *BackgroundFillFreeformGradient
func (*BackgroundFillFreeformGradient) OptGradient ¶
func (impl *BackgroundFillFreeformGradient) OptGradient() *BackgroundFillGradient
func (*BackgroundFillFreeformGradient) OptSolid ¶
func (impl *BackgroundFillFreeformGradient) OptSolid() *BackgroundFillSolid
type BackgroundFillGradient ¶
type BackgroundFillGradient struct {
// Type of the background fill, always "gradient"
Type string `json:"type" default:"gradient"`
// Top color of the gradient in the RGB24 format
TopColor int64 `json:"top_color"`
// Bottom color of the gradient in the RGB24 format
BottomColor int64 `json:"bottom_color"`
// Clockwise rotation angle of the background fill in degrees; 0-359
RotationAngle int64 `json:"rotation_angle"`
}
BackgroundFillGradient The background is a gradient fill.
func (*BackgroundFillGradient) OptFreeformGradient ¶
func (impl *BackgroundFillGradient) OptFreeformGradient() *BackgroundFillFreeformGradient
func (*BackgroundFillGradient) OptGradient ¶
func (impl *BackgroundFillGradient) OptGradient() *BackgroundFillGradient
func (*BackgroundFillGradient) OptSolid ¶
func (impl *BackgroundFillGradient) OptSolid() *BackgroundFillSolid
type BackgroundFillSolid ¶
type BackgroundFillSolid struct {
// Type of the background fill, always "solid"
Type string `json:"type" default:"solid"`
// The color of the background fill in the RGB24 format
Color int64 `json:"color"`
}
BackgroundFillSolid The background is filled using the selected color.
func (*BackgroundFillSolid) OptFreeformGradient ¶
func (impl *BackgroundFillSolid) OptFreeformGradient() *BackgroundFillFreeformGradient
func (*BackgroundFillSolid) OptGradient ¶
func (impl *BackgroundFillSolid) OptGradient() *BackgroundFillGradient
func (*BackgroundFillSolid) OptSolid ¶
func (impl *BackgroundFillSolid) OptSolid() *BackgroundFillSolid
type BackgroundType ¶
type BackgroundType interface {
OptFill() *BackgroundTypeFill
OptWallpaper() *BackgroundTypeWallpaper
OptPattern() *BackgroundTypePattern
OptChatTheme() *BackgroundTypeChatTheme
}
BackgroundType This object describes the type of a background. Currently, it can be one of - BackgroundTypeFill - BackgroundTypeWallpaper - BackgroundTypePattern - BackgroundTypeChatTheme
type BackgroundTypeChatTheme ¶
type BackgroundTypeChatTheme struct {
// Type of the background, always "chat_theme"
Type string `json:"type" default:"chat_theme"`
// Name of the chat theme, which is usually an emoji
ThemeName string `json:"theme_name"`
}
BackgroundTypeChatTheme The background is taken directly from a built-in chat theme.
func (*BackgroundTypeChatTheme) OptChatTheme ¶
func (impl *BackgroundTypeChatTheme) OptChatTheme() *BackgroundTypeChatTheme
func (*BackgroundTypeChatTheme) OptFill ¶
func (impl *BackgroundTypeChatTheme) OptFill() *BackgroundTypeFill
func (*BackgroundTypeChatTheme) OptPattern ¶
func (impl *BackgroundTypeChatTheme) OptPattern() *BackgroundTypePattern
func (*BackgroundTypeChatTheme) OptWallpaper ¶
func (impl *BackgroundTypeChatTheme) OptWallpaper() *BackgroundTypeWallpaper
type BackgroundTypeFill ¶
type BackgroundTypeFill struct {
// Type of the background, always "fill"
Type string `json:"type" default:"fill"`
// The background fill
Fill BackgroundFill `json:"fill"`
// Dimming of the background in dark themes, as a percentage; 0-100
DarkThemeDimming int64 `json:"dark_theme_dimming"`
}
BackgroundTypeFill The background is automatically filled based on the selected colors.
func (*BackgroundTypeFill) OptChatTheme ¶
func (impl *BackgroundTypeFill) OptChatTheme() *BackgroundTypeChatTheme
func (*BackgroundTypeFill) OptFill ¶
func (impl *BackgroundTypeFill) OptFill() *BackgroundTypeFill
func (*BackgroundTypeFill) OptPattern ¶
func (impl *BackgroundTypeFill) OptPattern() *BackgroundTypePattern
func (*BackgroundTypeFill) OptWallpaper ¶
func (impl *BackgroundTypeFill) OptWallpaper() *BackgroundTypeWallpaper
func (*BackgroundTypeFill) UnmarshalJSON ¶
func (impl *BackgroundTypeFill) UnmarshalJSON(data []byte) error
type BackgroundTypePattern ¶
type BackgroundTypePattern struct {
// Type of the background, always "pattern"
Type string `json:"type" default:"pattern"`
// Document with the pattern
Document *TelegramDocument `json:"document"`
// The background fill that is combined with the pattern
Fill BackgroundFill `json:"fill"`
// Intensity of the pattern when it is shown above the filled background; 0-100
Intensity int64 `json:"intensity"`
// Optional. True, if the background fill must be applied only to the pattern itself.
// All other pixels are black in this case. For dark themes only
IsInverted bool `json:"is_inverted,omitempty"`
// Optional. True, if the background moves slightly when the device is tilted
IsMoving bool `json:"is_moving,omitempty"`
}
BackgroundTypePattern The background is a PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user.
func (*BackgroundTypePattern) OptChatTheme ¶
func (impl *BackgroundTypePattern) OptChatTheme() *BackgroundTypeChatTheme
func (*BackgroundTypePattern) OptFill ¶
func (impl *BackgroundTypePattern) OptFill() *BackgroundTypeFill
func (*BackgroundTypePattern) OptPattern ¶
func (impl *BackgroundTypePattern) OptPattern() *BackgroundTypePattern
func (*BackgroundTypePattern) OptWallpaper ¶
func (impl *BackgroundTypePattern) OptWallpaper() *BackgroundTypeWallpaper
func (*BackgroundTypePattern) UnmarshalJSON ¶
func (impl *BackgroundTypePattern) UnmarshalJSON(data []byte) error
type BackgroundTypeWallpaper ¶
type BackgroundTypeWallpaper struct {
// Type of the background, always "wallpaper"
Type string `json:"type" default:"wallpaper"`
// Document with the wallpaper
Document *TelegramDocument `json:"document"`
// Dimming of the background in dark themes, as a percentage; 0-100
DarkThemeDimming int64 `json:"dark_theme_dimming"`
// Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12
IsBlurred bool `json:"is_blurred,omitempty"`
// Optional. True, if the background moves slightly when the device is tilted
IsMoving bool `json:"is_moving,omitempty"`
}
BackgroundTypeWallpaper The background is a wallpaper in the JPEG format.
func (*BackgroundTypeWallpaper) OptChatTheme ¶
func (impl *BackgroundTypeWallpaper) OptChatTheme() *BackgroundTypeChatTheme
func (*BackgroundTypeWallpaper) OptFill ¶
func (impl *BackgroundTypeWallpaper) OptFill() *BackgroundTypeFill
func (*BackgroundTypeWallpaper) OptPattern ¶
func (impl *BackgroundTypeWallpaper) OptPattern() *BackgroundTypePattern
func (*BackgroundTypeWallpaper) OptWallpaper ¶
func (impl *BackgroundTypeWallpaper) OptWallpaper() *BackgroundTypeWallpaper
type Birthdate ¶
type Birthdate struct {
// Day of the user's birth; 1-31
Day int64 `json:"day"`
// Month of the user's birth; 1-12
Month int64 `json:"month"`
// Optional. Year of the user's birth
Year int64 `json:"year,omitempty"`
}
Birthdate Describes the birthdate of a user.
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func NewFromEnv ¶
func NewFromEnv() *Bot
func NewFromFile ¶
func TryNewFromEnv ¶
func TryNewFromFile ¶
func (*Bot) Branch ¶
func (bot *Bot) Branch(pred FilterFunc, handler HandlerFunc) *Bot
Branch helps to separate and handle updates by predicates. If an update does not satisfy Branch's predicates, the updated is passed through to next branch/handler/filter below.
Example:
bot.
Branch(tg.OnPhoto, tg.CommonTextReply("nice photo mom)).
Branch(tg.OnVideo, tg.CommonTextReply("cool video mom)).
Handle(tg.CommonTextReply("love you mom")) // This shall be sent for every non photo/video update.
func (*Bot) Command ¶
func (bot *Bot) Command(command string, handlerFunc HandlerFunc) *Bot
Command and only that command, if message do not start with "/" and the command's Name, the update will be passed below the tree.
Example:
bot.
Command("/start", ...). // Handles only /start.
Handle(tg.CommonTextReply("hii mom")) // Handles everything but /start.
func (*Bot) Context ¶
Context is simplified version of ContextWithCancel, might temporarily leak resources if used with timeouts. Leaking recourses is OK if you do not care, but I encourage you to use ContextWithCancel.
func (*Bot) ContextWithCancel ¶
func (bot *Bot) ContextWithCancel() (ctx context.Context, cancel context.CancelFunc)
ContextWithCancel build new Context with a fresh timeout.
func (*Bot) Default ¶
func (bot *Bot) Default(handler HandlerFunc) *Bot
Default handles every filtered out update.
func (*Bot) Filter ¶
func (bot *Bot) Filter(pred ...FilterFunc) *Bot
Filter out unwanted updates — FilterFunc(unwanted_update) == false, every update for handler/branch below the filter will satisfy FilterFunc.
Example:
bot.
Filter(tg.OnPrivateMessage).
Command("/start", ...). // Private messages only.
Branch(tg.OnText, ...) // Private messages only.
func (*Bot) Handle ¶
func (bot *Bot) Handle(handler HandlerFunc) *Bot
Handle every update that comes through.
Example:
bot.
Filter(tg.OnPrivateMessage).
Handle(tg.CommonTextReply("hii mom"))
func (*Bot) HelpScoped ¶
func (bot *Bot) HelpScoped(scope BotCommandScope, commands ...string) *Bot
func (*Bot) OnError ¶
func (bot *Bot) OnError(fn OnErrorFunc) *Bot
func (*Bot) Plugin ¶
Plugin system helps insert middleware. todo: document this better and probably add more plugin hooks.
func (*Bot) Stop ¶
func (bot *Bot) Stop()
Stop lets handlers finish their jobs, do not check for any more updates.
func (*Bot) StopImmediately ¶
func (bot *Bot) StopImmediately()
StopImmediately stops polling, by canceling the context.
type BotCommand ¶
type BotCommand struct {
// Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
Command string `json:"command"`
// Description of the command; 1-256 characters.
Description string `json:"description"`
}
BotCommand This object represents a bot command.
func GetMyCommands ¶
func GetMyCommands(ctx context.Context, opts ...*OptGetMyCommands) ([]*BotCommand, error)
GetMyCommands Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.
type BotCommandScope ¶
type BotCommandScope interface {
OptDefault() *BotCommandScopeDefault
OptAllPrivateChats() *BotCommandScopeAllPrivateChats
OptAllGroupChats() *BotCommandScopeAllGroupChats
OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
OptChat() *BotCommandScopeChat
OptChatAdministrators() *BotCommandScopeChatAdministrators
OptChatMember() *BotCommandScopeChatMember
}
BotCommandScope This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported: - BotCommandScopeDefault - BotCommandScopeAllPrivateChats - BotCommandScopeAllGroupChats - BotCommandScopeAllChatAdministrators - BotCommandScopeChat - BotCommandScopeChatAdministrators - BotCommandScopeChatMember
type BotCommandScopeAllChatAdministrators ¶
type BotCommandScopeAllChatAdministrators struct {
// Scope type, must be all_chat_administrators
Type string `json:"type" default:"all_chat_administrators"`
}
BotCommandScopeAllChatAdministrators Represents the scope of bot commands, covering all group and supergroup chat administrators.
func (*BotCommandScopeAllChatAdministrators) OptAllChatAdministrators ¶
func (impl *BotCommandScopeAllChatAdministrators) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
func (*BotCommandScopeAllChatAdministrators) OptAllGroupChats ¶
func (impl *BotCommandScopeAllChatAdministrators) OptAllGroupChats() *BotCommandScopeAllGroupChats
func (*BotCommandScopeAllChatAdministrators) OptAllPrivateChats ¶
func (impl *BotCommandScopeAllChatAdministrators) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
func (*BotCommandScopeAllChatAdministrators) OptChat ¶
func (impl *BotCommandScopeAllChatAdministrators) OptChat() *BotCommandScopeChat
func (*BotCommandScopeAllChatAdministrators) OptChatAdministrators ¶
func (impl *BotCommandScopeAllChatAdministrators) OptChatAdministrators() *BotCommandScopeChatAdministrators
func (*BotCommandScopeAllChatAdministrators) OptChatMember ¶
func (impl *BotCommandScopeAllChatAdministrators) OptChatMember() *BotCommandScopeChatMember
func (*BotCommandScopeAllChatAdministrators) OptDefault ¶
func (impl *BotCommandScopeAllChatAdministrators) OptDefault() *BotCommandScopeDefault
type BotCommandScopeAllGroupChats ¶
type BotCommandScopeAllGroupChats struct {
// Scope type, must be all_group_chats
Type string `json:"type" default:"all_group_chats"`
}
BotCommandScopeAllGroupChats Represents the scope of bot commands, covering all group and supergroup chats.
func (*BotCommandScopeAllGroupChats) OptAllChatAdministrators ¶
func (impl *BotCommandScopeAllGroupChats) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
func (*BotCommandScopeAllGroupChats) OptAllGroupChats ¶
func (impl *BotCommandScopeAllGroupChats) OptAllGroupChats() *BotCommandScopeAllGroupChats
func (*BotCommandScopeAllGroupChats) OptAllPrivateChats ¶
func (impl *BotCommandScopeAllGroupChats) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
func (*BotCommandScopeAllGroupChats) OptChat ¶
func (impl *BotCommandScopeAllGroupChats) OptChat() *BotCommandScopeChat
func (*BotCommandScopeAllGroupChats) OptChatAdministrators ¶
func (impl *BotCommandScopeAllGroupChats) OptChatAdministrators() *BotCommandScopeChatAdministrators
func (*BotCommandScopeAllGroupChats) OptChatMember ¶
func (impl *BotCommandScopeAllGroupChats) OptChatMember() *BotCommandScopeChatMember
func (*BotCommandScopeAllGroupChats) OptDefault ¶
func (impl *BotCommandScopeAllGroupChats) OptDefault() *BotCommandScopeDefault
type BotCommandScopeAllPrivateChats ¶
type BotCommandScopeAllPrivateChats struct {
// Scope type, must be all_private_chats
Type string `json:"type" default:"all_private_chats"`
}
BotCommandScopeAllPrivateChats Represents the scope of bot commands, covering all private chats.
func (*BotCommandScopeAllPrivateChats) OptAllChatAdministrators ¶
func (impl *BotCommandScopeAllPrivateChats) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
func (*BotCommandScopeAllPrivateChats) OptAllGroupChats ¶
func (impl *BotCommandScopeAllPrivateChats) OptAllGroupChats() *BotCommandScopeAllGroupChats
func (*BotCommandScopeAllPrivateChats) OptAllPrivateChats ¶
func (impl *BotCommandScopeAllPrivateChats) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
func (*BotCommandScopeAllPrivateChats) OptChat ¶
func (impl *BotCommandScopeAllPrivateChats) OptChat() *BotCommandScopeChat
func (*BotCommandScopeAllPrivateChats) OptChatAdministrators ¶
func (impl *BotCommandScopeAllPrivateChats) OptChatAdministrators() *BotCommandScopeChatAdministrators
func (*BotCommandScopeAllPrivateChats) OptChatMember ¶
func (impl *BotCommandScopeAllPrivateChats) OptChatMember() *BotCommandScopeChatMember
func (*BotCommandScopeAllPrivateChats) OptDefault ¶
func (impl *BotCommandScopeAllPrivateChats) OptDefault() *BotCommandScopeDefault
type BotCommandScopeChat ¶
type BotCommandScopeChat struct {
// Scope type, must be chat
Type string `json:"type" default:"chat"`
// Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
// >> either: String
ChatId int64 `json:"chat_id"`
}
BotCommandScopeChat Represents the scope of bot commands, covering a specific chat.
func (*BotCommandScopeChat) OptAllChatAdministrators ¶
func (impl *BotCommandScopeChat) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
func (*BotCommandScopeChat) OptAllGroupChats ¶
func (impl *BotCommandScopeChat) OptAllGroupChats() *BotCommandScopeAllGroupChats
func (*BotCommandScopeChat) OptAllPrivateChats ¶
func (impl *BotCommandScopeChat) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
func (*BotCommandScopeChat) OptChat ¶
func (impl *BotCommandScopeChat) OptChat() *BotCommandScopeChat
func (*BotCommandScopeChat) OptChatAdministrators ¶
func (impl *BotCommandScopeChat) OptChatAdministrators() *BotCommandScopeChatAdministrators
func (*BotCommandScopeChat) OptChatMember ¶
func (impl *BotCommandScopeChat) OptChatMember() *BotCommandScopeChatMember
func (*BotCommandScopeChat) OptDefault ¶
func (impl *BotCommandScopeChat) OptDefault() *BotCommandScopeDefault
type BotCommandScopeChatAdministrators ¶
type BotCommandScopeChatAdministrators struct {
// Scope type, must be chat_administrators
Type string `json:"type" default:"chat_administrators"`
// Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
// >> either: String
ChatId int64 `json:"chat_id"`
}
BotCommandScopeChatAdministrators Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
func (*BotCommandScopeChatAdministrators) OptAllChatAdministrators ¶
func (impl *BotCommandScopeChatAdministrators) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
func (*BotCommandScopeChatAdministrators) OptAllGroupChats ¶
func (impl *BotCommandScopeChatAdministrators) OptAllGroupChats() *BotCommandScopeAllGroupChats
func (*BotCommandScopeChatAdministrators) OptAllPrivateChats ¶
func (impl *BotCommandScopeChatAdministrators) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
func (*BotCommandScopeChatAdministrators) OptChat ¶
func (impl *BotCommandScopeChatAdministrators) OptChat() *BotCommandScopeChat
func (*BotCommandScopeChatAdministrators) OptChatAdministrators ¶
func (impl *BotCommandScopeChatAdministrators) OptChatAdministrators() *BotCommandScopeChatAdministrators
func (*BotCommandScopeChatAdministrators) OptChatMember ¶
func (impl *BotCommandScopeChatAdministrators) OptChatMember() *BotCommandScopeChatMember
func (*BotCommandScopeChatAdministrators) OptDefault ¶
func (impl *BotCommandScopeChatAdministrators) OptDefault() *BotCommandScopeDefault
type BotCommandScopeChatMember ¶
type BotCommandScopeChatMember struct {
// Scope type, must be chat_member
Type string `json:"type" default:"chat_member"`
// Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
// >> either: String
ChatId int64 `json:"chat_id"`
// Unique identifier of the target user
UserId int64 `json:"user_id"`
}
BotCommandScopeChatMember Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
func (*BotCommandScopeChatMember) OptAllChatAdministrators ¶
func (impl *BotCommandScopeChatMember) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
func (*BotCommandScopeChatMember) OptAllGroupChats ¶
func (impl *BotCommandScopeChatMember) OptAllGroupChats() *BotCommandScopeAllGroupChats
func (*BotCommandScopeChatMember) OptAllPrivateChats ¶
func (impl *BotCommandScopeChatMember) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
func (*BotCommandScopeChatMember) OptChat ¶
func (impl *BotCommandScopeChatMember) OptChat() *BotCommandScopeChat
func (*BotCommandScopeChatMember) OptChatAdministrators ¶
func (impl *BotCommandScopeChatMember) OptChatAdministrators() *BotCommandScopeChatAdministrators
func (*BotCommandScopeChatMember) OptChatMember ¶
func (impl *BotCommandScopeChatMember) OptChatMember() *BotCommandScopeChatMember
func (*BotCommandScopeChatMember) OptDefault ¶
func (impl *BotCommandScopeChatMember) OptDefault() *BotCommandScopeDefault
type BotCommandScopeDefault ¶
type BotCommandScopeDefault struct {
// Scope type, must be default
Type string `json:"type"`
}
BotCommandScopeDefault Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
func (*BotCommandScopeDefault) OptAllChatAdministrators ¶
func (impl *BotCommandScopeDefault) OptAllChatAdministrators() *BotCommandScopeAllChatAdministrators
func (*BotCommandScopeDefault) OptAllGroupChats ¶
func (impl *BotCommandScopeDefault) OptAllGroupChats() *BotCommandScopeAllGroupChats
func (*BotCommandScopeDefault) OptAllPrivateChats ¶
func (impl *BotCommandScopeDefault) OptAllPrivateChats() *BotCommandScopeAllPrivateChats
func (*BotCommandScopeDefault) OptChat ¶
func (impl *BotCommandScopeDefault) OptChat() *BotCommandScopeChat
func (*BotCommandScopeDefault) OptChatAdministrators ¶
func (impl *BotCommandScopeDefault) OptChatAdministrators() *BotCommandScopeChatAdministrators
func (*BotCommandScopeDefault) OptChatMember ¶
func (impl *BotCommandScopeDefault) OptChatMember() *BotCommandScopeChatMember
func (*BotCommandScopeDefault) OptDefault ¶
func (impl *BotCommandScopeDefault) OptDefault() *BotCommandScopeDefault
type BotDescription ¶
type BotDescription struct {
// The bot's description
Description string `json:"description"`
}
BotDescription This object represents the bot's description.
func GetMyDescription ¶
func GetMyDescription(ctx context.Context, opts ...*OptGetMyDescription) (*BotDescription, error)
GetMyDescription Use this method to get the current bot description for the given user language. Returns BotDescription on success.
type BotName ¶
type BotName struct {
// The bot's name
Name string `json:"name"`
}
BotName This object represents the bot's name.
type BotShortDescription ¶
type BotShortDescription struct {
// The bot's short description
ShortDescription string `json:"short_description"`
}
BotShortDescription This object represents the bot's short description.
func GetMyShortDescription ¶
func GetMyShortDescription(ctx context.Context, opts ...*OptGetMyShortDescription) (*BotShortDescription, error)
GetMyShortDescription Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.
type BranchPipe ¶
type BranchPipe struct {
// contains filtered or unexported fields
}
BranchPipe has similar interface to Handle/Filter/Branch Bot's pipeline configuring. The only difference making new branches is prohibited (it could cause infinite cycles).
func Branch ¶
func Branch() *BranchPipe
func (*BranchPipe) Filter ¶
func (branch *BranchPipe) Filter(pred FilterFunc) *BranchPipe
func (*BranchPipe) Handle ¶
func (branch *BranchPipe) Handle(handler HandlerFunc) *BranchPipe
type BusinessConnection ¶
type BusinessConnection struct {
// Unique identifier of the business connection
Id string `json:"id"`
// Business account user that created the business connection
User *User `json:"user"`
// Identifier of a private chat with the user who created the business connection.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
UserChatId int64 `json:"user_chat_id"`
// Date the connection was established in Unix time
Date int64 `json:"date"`
// True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours
CanReply bool `json:"can_reply"`
// True, if the connection is active
IsEnabled bool `json:"is_enabled"`
}
BusinessConnection Describes the connection of the bot with a business account.
func GetBusinessConnection ¶
func GetBusinessConnection(ctx context.Context, businessConnectionId string) (*BusinessConnection, error)
GetBusinessConnection Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.
type BusinessIntro ¶
type BusinessIntro struct {
// Optional. Title text of the business intro
Title string `json:"title,omitempty"`
// Optional. Message text of the business intro
Message string `json:"message,omitempty"`
// Optional. Sticker of the business intro
Sticker *Sticker `json:"sticker,omitempty"`
}
BusinessIntro Contains information about the start page settings of a Telegram Business account.
type BusinessLocation ¶
type BusinessLocation struct {
// Address of the business
Address string `json:"address"`
// Optional. Location of the business
Location *Location `json:"location,omitempty"`
}
BusinessLocation Contains information about the location of a Telegram Business account.
type BusinessMessagesDeleted ¶
type BusinessMessagesDeleted struct {
// Unique identifier of the business connection
BusinessConnectionId string `json:"business_connection_id"`
// Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.
Chat *Chat `json:"chat"`
// The list of identifiers of deleted messages in the chat of the business account
MessageIds []int64 `json:"message_ids"`
}
BusinessMessagesDeleted This object is received when messages are deleted from a connected business account.
type BusinessOpeningHours ¶
type BusinessOpeningHours struct {
// Unique name of the time zone for which the opening hours are defined
TimeZoneName string `json:"time_zone_name"`
// List of time intervals describing business opening hours
OpeningHours []*BusinessOpeningHoursInterval `json:"opening_hours"`
}
BusinessOpeningHours Describes the opening hours of a business.
type BusinessOpeningHoursInterval ¶
type BusinessOpeningHoursInterval struct {
// The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60
OpeningMinute int64 `json:"opening_minute"`
// The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60
ClosingMinute int64 `json:"closing_minute"`
}
BusinessOpeningHoursInterval Describes an interval of time during which a business is open.
type Button ¶
type Button = InlineKeyboardButton
func (*Button) HandlerFunc ¶
func (b *Button) HandlerFunc() HandlerFunc
type ButtonI ¶
type ButtonI interface {
Build() *InlineKeyboardButton
HandlerFunc() HandlerFunc
}
type CallbackButton ¶
type CallbackButton struct {
Text string
Handler HandlerFunc
OnComplete *OptAnswerCallbackQuery
}
func (*CallbackButton) Build ¶
func (c *CallbackButton) Build() *InlineKeyboardButton
func (*CallbackButton) HandlerFunc ¶
func (c *CallbackButton) HandlerFunc() HandlerFunc
type CallbackGame ¶
type CallbackGame struct {
}
CallbackGame A placeholder, currently holds no information. Use BotFather to set up your game.
type CallbackQuery ¶
type CallbackQuery struct {
// Unique identifier for this query
Id string `json:"id"`
// Sender
From *User `json:"from"`
// Optional. Message sent by the bot with the callback button that originated the query
Message *Message `json:"message,omitempty"`
// Optional. Identifier of the message sent via the bot in inline mode, that originated the query.
InlineMessageId string `json:"inline_message_id,omitempty"`
// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent.
// Useful for high scores in games.
ChatInstance string `json:"chat_instance"`
// Optional. Data associated with the callback button.
// Be aware that the message originated the query can contain no callback buttons with this data.
Data string `json:"data,omitempty"`
// Optional. Short name of a Game to be returned, serves as the unique identifier for the game
GameShortName string `json:"game_short_name,omitempty"`
}
CallbackQuery This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
type Chat ¶
type Chat struct {
// Unique identifier for this chat.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
Id int64 `json:"id"`
// Type of the chat, can be either "private", "group", "supergroup" or "channel"
Type string `json:"type"`
// Optional. Title, for supergroups, channels and group chats
Title string `json:"title,omitempty"`
// Optional. Username, for private chats, supergroups and channels if available
Username string `json:"username,omitempty"`
// Optional. First name of the other party in a private chat
FirstName string `json:"first_name,omitempty"`
// Optional. Last name of the other party in a private chat
LastName string `json:"last_name,omitempty"`
// Optional. True, if the supergroup chat is a forum (has topics enabled)
IsForum bool `json:"is_forum,omitempty"`
}
Chat This object represents a chat.
type ChatAdministratorRights ¶
type ChatAdministratorRights struct {
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode.
// Implied by any other administrator privilege.
CanManageChat bool `json:"can_manage_chat"`
// True, if the administrator can delete messages of other users
CanDeleteMessages bool `json:"can_delete_messages"`
// True, if the administrator can manage video chats
CanManageVideoChats bool `json:"can_manage_video_chats"`
// True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics
CanRestrictMembers bool `json:"can_restrict_members"`
// True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
CanPromoteMembers bool `json:"can_promote_members"`
// True, if the user is allowed to change the chat title, photo and other settings
CanChangeInfo bool `json:"can_change_info"`
// True, if the user is allowed to invite new users to the chat
CanInviteUsers bool `json:"can_invite_users"`
// True, if the administrator can post stories to the chat
CanPostStories bool `json:"can_post_stories"`
// True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive
CanEditStories bool `json:"can_edit_stories"`
// True, if the administrator can delete stories posted by other users
CanDeleteStories bool `json:"can_delete_stories"`
// Optional.
// True, if the administrator can post messages in the channel, or access channel statistics; for channels only
CanPostMessages bool `json:"can_post_messages,omitempty"`
// Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only
CanEditMessages bool `json:"can_edit_messages,omitempty"`
// Optional. True, if the user is allowed to pin messages; for groups and supergroups only
CanPinMessages bool `json:"can_pin_messages,omitempty"`
// Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
CanManageTopics bool `json:"can_manage_topics,omitempty"`
}
ChatAdministratorRights Represents the rights of an administrator in a chat.
func GetMyDefaultAdministratorRights ¶
func GetMyDefaultAdministratorRights(ctx context.Context, opts ...*OptGetMyDefaultAdministratorRights) (*ChatAdministratorRights, error)
GetMyDefaultAdministratorRights Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
type ChatBackground ¶
type ChatBackground struct {
// Type of the background
Type BackgroundType `json:"type"`
}
ChatBackground This object represents a chat background.
func (*ChatBackground) UnmarshalJSON ¶
func (impl *ChatBackground) UnmarshalJSON(data []byte) error
type ChatBoost ¶
type ChatBoost struct {
// Unique identifier of the boost
BoostId string `json:"boost_id"`
// Point in time (Unix timestamp) when the chat was boosted
AddDate int64 `json:"add_date"`
// Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged
ExpirationDate int64 `json:"expiration_date"`
// Source of the added boost
Source ChatBoostSource `json:"source"`
}
ChatBoost This object contains information about a chat boost.
func (*ChatBoost) UnmarshalJSON ¶
type ChatBoostAdded ¶
type ChatBoostAdded struct {
// Number of boosts added by the user
BoostCount int64 `json:"boost_count"`
}
ChatBoostAdded This object represents a service message about a user boosting a chat.
type ChatBoostRemoved ¶
type ChatBoostRemoved struct {
// Chat which was boosted
Chat *Chat `json:"chat"`
// Unique identifier of the boost
BoostId string `json:"boost_id"`
// Point in time (Unix timestamp) when the boost was removed
RemoveDate int64 `json:"remove_date"`
// Source of the removed boost
Source ChatBoostSource `json:"source"`
}
ChatBoostRemoved This object represents a boost removed from a chat.
func (*ChatBoostRemoved) UnmarshalJSON ¶
func (impl *ChatBoostRemoved) UnmarshalJSON(data []byte) error
type ChatBoostSource ¶
type ChatBoostSource interface {
OptPremium() *ChatBoostSourcePremium
OptGiftCode() *ChatBoostSourceGiftCode
OptGiveaway() *ChatBoostSourceGiveaway
}
ChatBoostSource This object describes the source of a chat boost. It can be one of - ChatBoostSourcePremium - ChatBoostSourceGiftCode - ChatBoostSourceGiveaway
type ChatBoostSourceGiftCode ¶
type ChatBoostSourceGiftCode struct {
// Source of the boost, always "gift_code"
Source string `json:"source" default:"gift_code"`
// User for which the gift code was created
User *User `json:"user"`
}
ChatBoostSourceGiftCode The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
func (*ChatBoostSourceGiftCode) OptGiftCode ¶
func (impl *ChatBoostSourceGiftCode) OptGiftCode() *ChatBoostSourceGiftCode
func (*ChatBoostSourceGiftCode) OptGiveaway ¶
func (impl *ChatBoostSourceGiftCode) OptGiveaway() *ChatBoostSourceGiveaway
func (*ChatBoostSourceGiftCode) OptPremium ¶
func (impl *ChatBoostSourceGiftCode) OptPremium() *ChatBoostSourcePremium
type ChatBoostSourceGiveaway ¶
type ChatBoostSourceGiveaway struct {
// Source of the boost, always "giveaway"
Source string `json:"source" default:"giveaway"`
// Identifier of a message in the chat with the giveaway; the message could have been deleted already.
// May be 0 if the message isn't sent yet.
GiveawayMessageId int64 `json:"giveaway_message_id"`
// Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only
User *User `json:"user,omitempty"`
// Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
PrizeStarCount int64 `json:"prize_star_count,omitempty"`
// Optional. True, if the giveaway was completed, but there was no user to win the prize
IsUnclaimed bool `json:"is_unclaimed,omitempty"`
}
ChatBoostSourceGiveaway The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.
func (*ChatBoostSourceGiveaway) OptGiftCode ¶
func (impl *ChatBoostSourceGiveaway) OptGiftCode() *ChatBoostSourceGiftCode
func (*ChatBoostSourceGiveaway) OptGiveaway ¶
func (impl *ChatBoostSourceGiveaway) OptGiveaway() *ChatBoostSourceGiveaway
func (*ChatBoostSourceGiveaway) OptPremium ¶
func (impl *ChatBoostSourceGiveaway) OptPremium() *ChatBoostSourcePremium
type ChatBoostSourcePremium ¶
type ChatBoostSourcePremium struct {
// Source of the boost, always "premium"
Source string `json:"source" default:"premium"`
// User that boosted the chat
User *User `json:"user"`
}
ChatBoostSourcePremium The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.
func (*ChatBoostSourcePremium) OptGiftCode ¶
func (impl *ChatBoostSourcePremium) OptGiftCode() *ChatBoostSourceGiftCode
func (*ChatBoostSourcePremium) OptGiveaway ¶
func (impl *ChatBoostSourcePremium) OptGiveaway() *ChatBoostSourceGiveaway
func (*ChatBoostSourcePremium) OptPremium ¶
func (impl *ChatBoostSourcePremium) OptPremium() *ChatBoostSourcePremium
type ChatBoostUpdated ¶
type ChatBoostUpdated struct {
// Chat which was boosted
Chat *Chat `json:"chat"`
// Information about the chat boost
Boost *ChatBoost `json:"boost"`
}
ChatBoostUpdated This object represents a boost added to a chat or changed.
type ChatFullInfo ¶
type ChatFullInfo struct {
// Unique identifier for this chat.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
Id int64 `json:"id"`
// Type of the chat, can be either "private", "group", "supergroup" or "channel"
Type string `json:"type"`
// Optional. Title, for supergroups, channels and group chats
Title string `json:"title,omitempty"`
// Optional. Username, for private chats, supergroups and channels if available
Username string `json:"username,omitempty"`
// Optional. First name of the other party in a private chat
FirstName string `json:"first_name,omitempty"`
// Optional. Last name of the other party in a private chat
LastName string `json:"last_name,omitempty"`
// Optional. True, if the supergroup chat is a forum (has topics enabled)
IsForum bool `json:"is_forum,omitempty"`
// Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview.
// See accent colors for more details.
AccentColorId int64 `json:"accent_color_id"`
// The maximum number of reactions that can be set on a message in the chat
MaxReactionCount int64 `json:"max_reaction_count"`
// Optional. Chat photo
Photo *ChatPhoto `json:"photo,omitempty"`
// Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels
ActiveUsernames []string `json:"active_usernames,omitempty"`
// Optional. For private chats, the date of birth of the user
Birthdate *Birthdate `json:"birthdate,omitempty"`
// Optional. For private chats with business accounts, the intro of the business
BusinessIntro *BusinessIntro `json:"business_intro,omitempty"`
// Optional. For private chats with business accounts, the location of the business
BusinessLocation *BusinessLocation `json:"business_location,omitempty"`
// Optional. For private chats with business accounts, the opening hours of the business
BusinessOpeningHours *BusinessOpeningHours `json:"business_opening_hours,omitempty"`
// Optional. For private chats, the personal channel of the user
PersonalChat *Chat `json:"personal_chat,omitempty"`
// Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.
AvailableReactions []ReactionType `json:"available_reactions,omitempty"`
// Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background
BackgroundCustomEmojiId string `json:"background_custom_emoji_id,omitempty"`
// Optional. Identifier of the accent color for the chat's profile background.
// See profile accent colors for more details.
ProfileAccentColorId int64 `json:"profile_accent_color_id,omitempty"`
// Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background
ProfileBackgroundCustomEmojiId string `json:"profile_background_custom_emoji_id,omitempty"`
// Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat
EmojiStatusCustomEmojiId string `json:"emoji_status_custom_emoji_id,omitempty"`
// Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any
EmojiStatusExpirationDate int64 `json:"emoji_status_expiration_date,omitempty"`
// Optional. Bio of the other party in a private chat
Bio string `json:"bio,omitempty"`
// Optional.
// True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user
HasPrivateForwards bool `json:"has_private_forwards,omitempty"`
// Optional.
// True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat
HasRestrictedVoiceAndVideoMessages bool `json:"has_restricted_voice_and_video_messages,omitempty"`
// Optional. True, if users need to join the supergroup before they can send messages
JoinToSendMessages bool `json:"join_to_send_messages,omitempty"`
// Optional.
// True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators
JoinByRequest bool `json:"join_by_request,omitempty"`
// Optional. Description, for groups, supergroups and channel chats
Description string `json:"description,omitempty"`
// Optional. Primary invite link, for groups, supergroups and channel chats
InviteLink string `json:"invite_link,omitempty"`
// Optional. The most recent pinned message (by sending date)
PinnedMessage *Message `json:"pinned_message,omitempty"`
// Optional. Default chat member permissions, for groups and supergroups
Permissions *ChatPermissions `json:"permissions,omitempty"`
// Optional. True, if paid media messages can be sent or forwarded to the channel chat.
// The field is available only for channel chats.
CanSendPaidMedia bool `json:"can_send_paid_media,omitempty"`
// Optional.
// For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds
SlowModeDelay int64 `json:"slow_mode_delay,omitempty"`
// Optional.
// For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions
UnrestrictBoostCount int64 `json:"unrestrict_boost_count,omitempty"`
// Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds
MessageAutoDeleteTime int64 `json:"message_auto_delete_time,omitempty"`
// Optional. True, if aggressive anti-spam checks are enabled in the supergroup.
// The field is only available to chat administrators.
HasAggressiveAntiSpamEnabled bool `json:"has_aggressive_anti_spam_enabled,omitempty"`
// Optional. True, if non-administrators can only get the list of bots and administrators in the chat
HasHiddenMembers bool `json:"has_hidden_members,omitempty"`
// Optional. True, if messages from the chat can't be forwarded to other chats
HasProtectedContent bool `json:"has_protected_content,omitempty"`
// Optional. True, if new chat members will have access to old messages; available only to chat administrators
HasVisibleHistory bool `json:"has_visible_history,omitempty"`
// Optional. For supergroups, name of the group sticker set
StickerSetName string `json:"sticker_set_name,omitempty"`
// Optional. True, if the bot can change the group sticker set
CanSetStickerSet bool `json:"can_set_sticker_set,omitempty"`
// Optional. For supergroups, the name of the group's custom emoji sticker set.
// Custom emoji from this set can be used by all users and bots in the group.
CustomEmojiStickerSetName string `json:"custom_emoji_sticker_set_name,omitempty"`
// Optional. Unique identifier for the linked chat, i.e.
// the discussion group identifier for a channel and vice versa; for supergroups and channel chats.
// This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
LinkedChatId int64 `json:"linked_chat_id,omitempty"`
// Optional. For supergroups, the location to which the supergroup is connected
Location *ChatLocation `json:"location,omitempty"`
}
ChatFullInfo This object contains full information about a chat.
func GetChat ¶
func GetChat(ctx context.Context, chatId int64) (*ChatFullInfo, error)
GetChat Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.
func (*ChatFullInfo) UnmarshalJSON ¶
func (impl *ChatFullInfo) UnmarshalJSON(data []byte) error
type ChatInviteLink ¶
type ChatInviteLink struct {
// The invite link.
// If the link was created by another chat administrator, then the second part of the link will be replaced with "...".
InviteLink string `json:"invite_link"`
// Creator of the link
Creator *User `json:"creator"`
// True, if users joining the chat via the link need to be approved by chat administrators
CreatesJoinRequest bool `json:"creates_join_request"`
// True, if the link is primary
IsPrimary bool `json:"is_primary"`
// True, if the link is revoked
IsRevoked bool `json:"is_revoked"`
// Optional. Invite link name
Name string `json:"name,omitempty"`
// Optional. Point in time (Unix timestamp) when the link will expire or has been expired
ExpireDate int64 `json:"expire_date,omitempty"`
// Optional.
// The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
MemberLimit int64 `json:"member_limit,omitempty"`
// Optional. Number of pending join requests created using this link
PendingJoinRequestCount int64 `json:"pending_join_request_count,omitempty"`
// Optional. The number of seconds the subscription will be active for before the next payment
SubscriptionPeriod int64 `json:"subscription_period,omitempty"`
// Optional.
// The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link
SubscriptionPrice int64 `json:"subscription_price,omitempty"`
}
ChatInviteLink Represents an invite link for a chat.
func CreateChatInviteLink ¶
func CreateChatInviteLink(ctx context.Context, chatId int64, opts ...*OptCreateChatInviteLink) (*ChatInviteLink, error)
CreateChatInviteLink Use this method to create an additional invite link for a chat. Returns the new invite link as ChatInviteLink object. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink.
func CreateChatSubscriptionInviteLink ¶
func CreateChatSubscriptionInviteLink(ctx context.Context, chatId int64, subscriptionPeriod int64, subscriptionPrice int64, opts ...*OptCreateChatSubscriptionInviteLink) (*ChatInviteLink, error)
CreateChatSubscriptionInviteLink Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.
func EditChatInviteLink ¶
func EditChatInviteLink(ctx context.Context, chatId int64, inviteLink string, opts ...*OptEditChatInviteLink) (*ChatInviteLink, error)
EditChatInviteLink Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.
func EditChatSubscriptionInviteLink ¶
func EditChatSubscriptionInviteLink(ctx context.Context, chatId int64, inviteLink string, opts ...*OptEditChatSubscriptionInviteLink) (*ChatInviteLink, error)
EditChatSubscriptionInviteLink Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.
func RevokeChatInviteLink ¶
func RevokeChatInviteLink(ctx context.Context, chatId int64, inviteLink string) (*ChatInviteLink, error)
RevokeChatInviteLink Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.
type ChatJoinRequest ¶
type ChatJoinRequest struct {
// Chat to which the request was sent
Chat *Chat `json:"chat"`
// User that sent the join request
From *User `json:"from"`
// Identifier of a private chat with the user who sent the join request.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
// The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.
UserChatId int64 `json:"user_chat_id"`
// Date the request was sent in Unix time
Date int64 `json:"date"`
// Optional. Bio of the user.
Bio string `json:"bio,omitempty"`
// Optional. Chat invite link that was used by the user to send the join request
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
}
ChatJoinRequest Represents a join request sent to a chat.
type ChatLocation ¶
type ChatLocation struct {
// The location to which the supergroup is connected. Can't be a live location.
Location *Location `json:"location"`
// Location address; 1-64 characters, as defined by the chat owner
Address string `json:"address"`
}
ChatLocation Represents a location to which a chat is connected.
type ChatMember ¶
type ChatMember interface {
OptOwner() *ChatMemberOwner
OptAdministrator() *ChatMemberAdministrator
OptMember() *ChatMemberMember
OptRestricted() *ChatMemberRestricted
OptLeft() *ChatMemberLeft
OptBanned() *ChatMemberBanned
}
ChatMember This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported: - ChatMemberOwner - ChatMemberAdministrator - ChatMemberMember - ChatMemberRestricted - ChatMemberLeft - ChatMemberBanned
func GetChatAdministrators ¶
func GetChatAdministrators(ctx context.Context, chatId int64) ([]ChatMember, error)
GetChatAdministrators Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.
func GetChatMember ¶
GetChatMember Use this method to get information about a member of a chat. Returns a ChatMember object on success. The method is only guaranteed to work for other users if the bot is an administrator in the chat.
type ChatMemberAdministrator ¶
type ChatMemberAdministrator struct {
// The member's status in the chat, always "administrator"
Status string `json:"status" default:"administrator"`
// Information about the user
User *User `json:"user"`
// True, if the bot is allowed to edit administrator privileges of that user
CanBeEdited bool `json:"can_be_edited"`
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode.
// Implied by any other administrator privilege.
CanManageChat bool `json:"can_manage_chat"`
// True, if the administrator can delete messages of other users
CanDeleteMessages bool `json:"can_delete_messages"`
// True, if the administrator can manage video chats
CanManageVideoChats bool `json:"can_manage_video_chats"`
// True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics
CanRestrictMembers bool `json:"can_restrict_members"`
// True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
CanPromoteMembers bool `json:"can_promote_members"`
// True, if the user is allowed to change the chat title, photo and other settings
CanChangeInfo bool `json:"can_change_info"`
// True, if the user is allowed to invite new users to the chat
CanInviteUsers bool `json:"can_invite_users"`
// True, if the administrator can post stories to the chat
CanPostStories bool `json:"can_post_stories"`
// True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive
CanEditStories bool `json:"can_edit_stories"`
// True, if the administrator can delete stories posted by other users
CanDeleteStories bool `json:"can_delete_stories"`
// Optional.
// True, if the administrator can post messages in the channel, or access channel statistics; for channels only
CanPostMessages bool `json:"can_post_messages,omitempty"`
// Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only
CanEditMessages bool `json:"can_edit_messages,omitempty"`
// Optional. True, if the user is allowed to pin messages; for groups and supergroups only
CanPinMessages bool `json:"can_pin_messages,omitempty"`
// Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
CanManageTopics bool `json:"can_manage_topics,omitempty"`
// Optional. Custom title for this user
CustomTitle string `json:"custom_title,omitempty"`
}
ChatMemberAdministrator Represents a chat member that has some additional privileges.
func (*ChatMemberAdministrator) OptAdministrator ¶
func (impl *ChatMemberAdministrator) OptAdministrator() *ChatMemberAdministrator
func (*ChatMemberAdministrator) OptBanned ¶
func (impl *ChatMemberAdministrator) OptBanned() *ChatMemberBanned
func (*ChatMemberAdministrator) OptLeft ¶
func (impl *ChatMemberAdministrator) OptLeft() *ChatMemberLeft
func (*ChatMemberAdministrator) OptMember ¶
func (impl *ChatMemberAdministrator) OptMember() *ChatMemberMember
func (*ChatMemberAdministrator) OptOwner ¶
func (impl *ChatMemberAdministrator) OptOwner() *ChatMemberOwner
func (*ChatMemberAdministrator) OptRestricted ¶
func (impl *ChatMemberAdministrator) OptRestricted() *ChatMemberRestricted
type ChatMemberBanned ¶
type ChatMemberBanned struct {
// The member's status in the chat, always "kicked"
Status string `json:"status" default:"kicked"`
// Information about the user
User *User `json:"user"`
// Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever
UntilDate int64 `json:"until_date"`
}
ChatMemberBanned Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
func (*ChatMemberBanned) OptAdministrator ¶
func (impl *ChatMemberBanned) OptAdministrator() *ChatMemberAdministrator
func (*ChatMemberBanned) OptBanned ¶
func (impl *ChatMemberBanned) OptBanned() *ChatMemberBanned
func (*ChatMemberBanned) OptLeft ¶
func (impl *ChatMemberBanned) OptLeft() *ChatMemberLeft
func (*ChatMemberBanned) OptMember ¶
func (impl *ChatMemberBanned) OptMember() *ChatMemberMember
func (*ChatMemberBanned) OptOwner ¶
func (impl *ChatMemberBanned) OptOwner() *ChatMemberOwner
func (*ChatMemberBanned) OptRestricted ¶
func (impl *ChatMemberBanned) OptRestricted() *ChatMemberRestricted
type ChatMemberLeft ¶
type ChatMemberLeft struct {
// The member's status in the chat, always "left"
Status string `json:"status" default:"left"`
// Information about the user
User *User `json:"user"`
}
ChatMemberLeft Represents a chat member that isn't currently a member of the chat, but may join it themselves.
func (*ChatMemberLeft) OptAdministrator ¶
func (impl *ChatMemberLeft) OptAdministrator() *ChatMemberAdministrator
func (*ChatMemberLeft) OptBanned ¶
func (impl *ChatMemberLeft) OptBanned() *ChatMemberBanned
func (*ChatMemberLeft) OptLeft ¶
func (impl *ChatMemberLeft) OptLeft() *ChatMemberLeft
func (*ChatMemberLeft) OptMember ¶
func (impl *ChatMemberLeft) OptMember() *ChatMemberMember
func (*ChatMemberLeft) OptOwner ¶
func (impl *ChatMemberLeft) OptOwner() *ChatMemberOwner
func (*ChatMemberLeft) OptRestricted ¶
func (impl *ChatMemberLeft) OptRestricted() *ChatMemberRestricted
type ChatMemberMember ¶
type ChatMemberMember struct {
// The member's status in the chat, always "member"
Status string `json:"status" default:"member"`
// Information about the user
User *User `json:"user"`
// Optional. Date when the user's subscription will expire; Unix time
UntilDate int64 `json:"until_date,omitempty"`
}
ChatMemberMember Represents a chat member that has no additional privileges or restrictions.
func (*ChatMemberMember) OptAdministrator ¶
func (impl *ChatMemberMember) OptAdministrator() *ChatMemberAdministrator
func (*ChatMemberMember) OptBanned ¶
func (impl *ChatMemberMember) OptBanned() *ChatMemberBanned
func (*ChatMemberMember) OptLeft ¶
func (impl *ChatMemberMember) OptLeft() *ChatMemberLeft
func (*ChatMemberMember) OptMember ¶
func (impl *ChatMemberMember) OptMember() *ChatMemberMember
func (*ChatMemberMember) OptOwner ¶
func (impl *ChatMemberMember) OptOwner() *ChatMemberOwner
func (*ChatMemberMember) OptRestricted ¶
func (impl *ChatMemberMember) OptRestricted() *ChatMemberRestricted
type ChatMemberOwner ¶
type ChatMemberOwner struct {
// The member's status in the chat, always "creator"
Status string `json:"status" default:"creator"`
// Information about the user
User *User `json:"user"`
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// Optional. Custom title for this user
CustomTitle string `json:"custom_title,omitempty"`
}
ChatMemberOwner Represents a chat member that owns the chat and has all administrator privileges.
func (*ChatMemberOwner) OptAdministrator ¶
func (impl *ChatMemberOwner) OptAdministrator() *ChatMemberAdministrator
func (*ChatMemberOwner) OptBanned ¶
func (impl *ChatMemberOwner) OptBanned() *ChatMemberBanned
func (*ChatMemberOwner) OptLeft ¶
func (impl *ChatMemberOwner) OptLeft() *ChatMemberLeft
func (*ChatMemberOwner) OptMember ¶
func (impl *ChatMemberOwner) OptMember() *ChatMemberMember
func (*ChatMemberOwner) OptOwner ¶
func (impl *ChatMemberOwner) OptOwner() *ChatMemberOwner
func (*ChatMemberOwner) OptRestricted ¶
func (impl *ChatMemberOwner) OptRestricted() *ChatMemberRestricted
type ChatMemberRestricted ¶
type ChatMemberRestricted struct {
// The member's status in the chat, always "restricted"
Status string `json:"status" default:"restricted"`
// Information about the user
User *User `json:"user"`
// True, if the user is a member of the chat at the moment of the request
IsMember bool `json:"is_member"`
// True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues
CanSendMessages bool `json:"can_send_messages"`
// True, if the user is allowed to send audios
CanSendAudios bool `json:"can_send_audios"`
// True, if the user is allowed to send documents
CanSendDocuments bool `json:"can_send_documents"`
// True, if the user is allowed to send photos
CanSendPhotos bool `json:"can_send_photos"`
// True, if the user is allowed to send videos
CanSendVideos bool `json:"can_send_videos"`
// True, if the user is allowed to send video notes
CanSendVideoNotes bool `json:"can_send_video_notes"`
// True, if the user is allowed to send voice notes
CanSendVoiceNotes bool `json:"can_send_voice_notes"`
// True, if the user is allowed to send polls
CanSendPolls bool `json:"can_send_polls"`
// True, if the user is allowed to send animations, games, stickers and use inline bots
CanSendOtherMessages bool `json:"can_send_other_messages"`
// True, if the user is allowed to add web page previews to their messages
CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
// True, if the user is allowed to change the chat title, photo and other settings
CanChangeInfo bool `json:"can_change_info"`
// True, if the user is allowed to invite new users to the chat
CanInviteUsers bool `json:"can_invite_users"`
// True, if the user is allowed to pin messages
CanPinMessages bool `json:"can_pin_messages"`
// True, if the user is allowed to create forum topics
CanManageTopics bool `json:"can_manage_topics"`
// Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever
UntilDate int64 `json:"until_date"`
}
ChatMemberRestricted Represents a chat member that is under certain restrictions in the chat. Supergroups only.
func (*ChatMemberRestricted) OptAdministrator ¶
func (impl *ChatMemberRestricted) OptAdministrator() *ChatMemberAdministrator
func (*ChatMemberRestricted) OptBanned ¶
func (impl *ChatMemberRestricted) OptBanned() *ChatMemberBanned
func (*ChatMemberRestricted) OptLeft ¶
func (impl *ChatMemberRestricted) OptLeft() *ChatMemberLeft
func (*ChatMemberRestricted) OptMember ¶
func (impl *ChatMemberRestricted) OptMember() *ChatMemberMember
func (*ChatMemberRestricted) OptOwner ¶
func (impl *ChatMemberRestricted) OptOwner() *ChatMemberOwner
func (*ChatMemberRestricted) OptRestricted ¶
func (impl *ChatMemberRestricted) OptRestricted() *ChatMemberRestricted
type ChatMemberUpdated ¶
type ChatMemberUpdated struct {
// Chat the user belongs to
Chat *Chat `json:"chat"`
// Performer of the action, which resulted in the change
From *User `json:"from"`
// Date the change was done in Unix time
Date int64 `json:"date"`
// Previous information about the chat member
OldChatMember ChatMember `json:"old_chat_member"`
// New information about the chat member
NewChatMember ChatMember `json:"new_chat_member"`
// Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
// Optional.
// True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator
ViaJoinRequest bool `json:"via_join_request,omitempty"`
// Optional. True, if the user joined the chat via a chat folder invite link
ViaChatFolderInviteLink bool `json:"via_chat_folder_invite_link,omitempty"`
}
ChatMemberUpdated This object represents changes in the status of a chat member.
func (*ChatMemberUpdated) UnmarshalJSON ¶
func (impl *ChatMemberUpdated) UnmarshalJSON(data []byte) error
type ChatPermissions ¶
type ChatPermissions struct {
// Optional.
// True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues
CanSendMessages bool `json:"can_send_messages,omitempty"`
// Optional. True, if the user is allowed to send audios
CanSendAudios bool `json:"can_send_audios,omitempty"`
// Optional. True, if the user is allowed to send documents
CanSendDocuments bool `json:"can_send_documents,omitempty"`
// Optional. True, if the user is allowed to send photos
CanSendPhotos bool `json:"can_send_photos,omitempty"`
// Optional. True, if the user is allowed to send videos
CanSendVideos bool `json:"can_send_videos,omitempty"`
// Optional. True, if the user is allowed to send video notes
CanSendVideoNotes bool `json:"can_send_video_notes,omitempty"`
// Optional. True, if the user is allowed to send voice notes
CanSendVoiceNotes bool `json:"can_send_voice_notes,omitempty"`
// Optional. True, if the user is allowed to send polls
CanSendPolls bool `json:"can_send_polls,omitempty"`
// Optional. True, if the user is allowed to send animations, games, stickers and use inline bots
CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"`
// Optional. True, if the user is allowed to add web page previews to their messages
CanAddWebPagePreviews bool `json:"can_add_web_page_previews,omitempty"`
// Optional. True, if the user is allowed to change the chat title, photo and other settings.
// Ignored in public supergroups
CanChangeInfo bool `json:"can_change_info,omitempty"`
// Optional. True, if the user is allowed to invite new users to the chat
CanInviteUsers bool `json:"can_invite_users,omitempty"`
// Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
CanPinMessages bool `json:"can_pin_messages,omitempty"`
// Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
CanManageTopics bool `json:"can_manage_topics,omitempty"`
}
ChatPermissions Describes actions that a non-administrator user is allowed to take in a chat.
type ChatPhoto ¶
type ChatPhoto struct {
// File identifier of small (160x160) chat photo.
// This file_id can be used only for photo download and only for as long as the photo is not changed.
SmallFileId string `json:"small_file_id"`
// Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
SmallFileUniqueId string `json:"small_file_unique_id"`
// File identifier of big (640x640) chat photo.
// This file_id can be used only for photo download and only for as long as the photo is not changed.
BigFileId string `json:"big_file_id"`
// Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
BigFileUniqueId string `json:"big_file_unique_id"`
}
ChatPhoto This object represents a chat photo.
type ChatShared ¶
type ChatShared struct {
RequestId int64 `json:"request_id"`
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
// The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
ChatId int64 `json:"chat_id"`
Title string `json:"title,omitempty"`
Username string `json:"username,omitempty"`
Photo TelegramPhoto `json:"photo,omitempty"`
}
ChatShared This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.
type ChosenInlineResult ¶
type ChosenInlineResult struct {
// The unique identifier for the result that was chosen
ResultId string `json:"result_id"`
// The user that chose the result
From *User `json:"from"`
// Optional. Sender location, only for bots that require user location
Location *Location `json:"location,omitempty"`
// Optional. Identifier of the sent inline message.
// Available only if there is an inline keyboard attached to the message.
// Will be also received in callback queries and can be used to edit the message.
InlineMessageId string `json:"inline_message_id,omitempty"`
// The query that was used to obtain the result
Query string `json:"query"`
}
ChosenInlineResult Represents a result of an inline query that was chosen by the user and sent to their chat partner. Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.
type CloudFile ¶
type CloudFile string
CloudFile could be a telegram file_id or link to file (i.e. imgbb.com/abcde123).
func (*CloudFile) WriteMultipart ¶
type CommonArgsHandlerFunc ¶
type Config ¶
type Config struct {
Token string `json:"token"`
TokenTesting string `json:"token_testing"`
ApiURL string `json:"api_url,omitempty"`
TimeoutHandle time.Duration `json:"timeout,omitempty"`
TimeoutPoll time.Duration `json:"timeout_poll,omitempty"`
SyncHandling bool `json:"sync,omitempty"`
DownloadType DownloadType `json:"download_type,omitempty"`
OnError OnErrorFunc `json:"-"`
OnErrorByType string `json:"on_error,omitempty"`
// contains filtered or unexported fields
}
type ConfigHandleAlbum ¶
type Contact ¶
type Contact struct {
// Contact's phone number
PhoneNumber string `json:"phone_number"`
// Contact's first name
FirstName string `json:"first_name"`
// Optional. Contact's last name
LastName string `json:"last_name,omitempty"`
// Optional. Contact's user identifier in Telegram.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
UserId int64 `json:"user_id,omitempty"`
// Optional. Additional data about the contact in the form of a vCard
Vcard string `json:"vcard,omitempty"`
}
Contact This object represents a phone contact.
type CopyTextButton ¶
type CopyTextButton struct {
// The text to be copied to the clipboard; 1-256 characters
Text string `json:"text"`
}
CopyTextButton This object represents an inline keyboard button that copies specified text to the clipboard.
type Dice ¶
type Dice struct {
// Emoji on which the dice throw animation is based
Emoji string `json:"emoji"`
// Value of the dice, 1-6 for "🎲", "🎯" and "🎳" base emoji, 1-5 for "🏀" and "⚽" base emoji, 1-64 for "🎰" base emoji
Value int64 `json:"value"`
}
Dice This object represents an animated emoji that displays a random value.
type Document ¶
type Document struct {
// Type of the result, must be document
Type string `json:"type" default:"document"`
// File to send. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
Media InputFile `json:"media"`
// Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
// The thumbnail should be in JPEG format and less than 200 kB in size.
// A thumbnail's width and height should not exceed 320.
// Ignored if the file is not uploaded using multipart/form-data.
// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
// More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// >> either: String
Thumbnail InputFile `json:"thumbnail,omitempty"`
// Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the document caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data.
// Always True, if the document is sent as part of an album.
DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"`
// Used for uploading media.
InputFile InputFile `json:"-"`
}
Document Represents a general file to be sent.
func (*Document) OptAnimation ¶
func (*Document) OptDocument ¶
type DownloadType ¶
type DownloadType int
const ( DownloadTypeUnspecified DownloadType = iota // calls default strategy (classic) DownloadTypeClassic // calls fileDownloadClassic DownloadTypeLocalMove // calls fileDownloadLocalMove DownloadTypeLocalCopy // calls fileDownloadLocalCopy )
type EncryptedCredentials ¶
type EncryptedCredentials struct {
// Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication
Data string `json:"data"`
// Base64-encoded data hash for data authentication
Hash string `json:"hash"`
// Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption
Secret string `json:"secret"`
}
EncryptedCredentials Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
type EncryptedPassportElement ¶
type EncryptedPassportElement struct {
// Element type.
// One of "personal_details", "passport", "driver_license", "identity_card", "internal_passport", "address", "utility_bill", "bank_statement", "rental_agreement", "passport_registration", "temporary_registration", "phone_number", "email".
Type string `json:"type"`
// Optional. Can be decrypted and verified using the accompanying EncryptedCredentials.
// Base64-encoded encrypted Telegram Passport element data provided by the user; available only for "personal_details", "passport", "driver_license", "identity_card", "internal_passport" and "address" types.
Data string `json:"data,omitempty"`
// Optional. User's verified phone number; available only for "phone_number" type
PhoneNumber string `json:"phone_number,omitempty"`
// Optional. User's verified email address; available only for "email" type
Email string `json:"email,omitempty"`
// Optional. Files can be decrypted and verified using the accompanying EncryptedCredentials.
// Array of encrypted files with documents provided by the user; available only for "utility_bill", "bank_statement", "rental_agreement", "passport_registration" and "temporary_registration" types.
Files []*PassportFile `json:"files,omitempty"`
// Optional. The file can be decrypted and verified using the accompanying EncryptedCredentials.
// Encrypted file with the front side of the document, provided by the user; available only for "passport", "driver_license", "identity_card" and "internal_passport".
FrontSide *PassportFile `json:"front_side,omitempty"`
// Optional. The file can be decrypted and verified using the accompanying EncryptedCredentials.
// Encrypted file with the reverse side of the document, provided by the user; available only for "driver_license" and "identity_card".
ReverseSide *PassportFile `json:"reverse_side,omitempty"`
// Optional. The file can be decrypted and verified using the accompanying EncryptedCredentials.
// Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for "passport", "driver_license", "identity_card" and "internal_passport".
Selfie *PassportFile `json:"selfie,omitempty"`
// Optional. Files can be decrypted and verified using the accompanying EncryptedCredentials.
// Array of encrypted files with translated versions of documents provided by the user; available if requested for "passport", "driver_license", "identity_card", "internal_passport", "utility_bill", "bank_statement", "rental_agreement", "passport_registration" and "temporary_registration" types.
Translation []*PassportFile `json:"translation,omitempty"`
// Base64-encoded element hash for using in PassportElementErrorUnspecified
Hash string `json:"hash"`
}
EncryptedPassportElement Describes documents or other Telegram Passport elements shared with the bot by the user.
type ErrorTooManyRequests ¶
type ErrorTooManyRequests struct {
Description string `json:"description"`
RetryAfter time.Duration `json:"retry_after"`
}
func (*ErrorTooManyRequests) Error ¶
func (err *ErrorTooManyRequests) Error() string
type ExternalReplyInfo ¶
type ExternalReplyInfo struct {
// Origin of the message replied to by the given message
Origin MessageOrigin `json:"origin"`
// Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.
Chat *Chat `json:"chat,omitempty"`
// Optional. Unique message identifier inside the original chat.
// Available only if the original chat is a supergroup or a channel.
MessageId int64 `json:"message_id,omitempty"`
// Optional. Options used for link preview generation for the original message, if it is a text message
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
// Optional. Message is an animation, information about the animation
Animation *TelegramAnimation `json:"animation,omitempty"`
// Optional. Message is an audio file, information about the file
Audio *TelegramAudio `json:"audio,omitempty"`
// Optional. Message is a general file, information about the file
Document *TelegramDocument `json:"document,omitempty"`
// Optional. Message contains paid media; information about the paid media
PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"`
// Optional. Message is a photo, available sizes of the photo
Photo TelegramPhoto `json:"photo,omitempty"`
// Optional. Message is a sticker, information about the sticker
Sticker *Sticker `json:"sticker,omitempty"`
// Optional. Message is a forwarded story
Story *Story `json:"story,omitempty"`
// Optional. Message is a video, information about the video
Video *TelegramVideo `json:"video,omitempty"`
// Optional. Message is a video note, information about the video message
VideoNote *VideoNote `json:"video_note,omitempty"`
// Optional. Message is a voice message, information about the file
Voice *Voice `json:"voice,omitempty"`
// Optional. True, if the message media is covered by a spoiler animation
HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"`
// Optional. Message is a shared contact, information about the contact
Contact *Contact `json:"contact,omitempty"`
// Optional. Message is a dice with random value
Dice *Dice `json:"dice,omitempty"`
// Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games
Game *Game `json:"game,omitempty"`
// Optional. Message is a scheduled giveaway, information about the giveaway
Giveaway *Giveaway `json:"giveaway,omitempty"`
// Optional. A giveaway with public winners was completed
GiveawayWinners *GiveawayWinners `json:"giveaway_winners,omitempty"`
// Optional. Message is an invoice for a payment, information about the invoice.
// More about payments: https://core.telegram.org/bots/api#payments
Invoice *Invoice `json:"invoice,omitempty"`
// Optional. Message is a shared location, information about the location
Location *Location `json:"location,omitempty"`
// Optional. Message is a native poll, information about the poll
Poll *Poll `json:"poll,omitempty"`
// Optional. Message is a venue, information about the venue
Venue *Venue `json:"venue,omitempty"`
}
ExternalReplyInfo This object contains information about a message that is being replied to, which may come from another chat or forum topic.
func (*ExternalReplyInfo) UnmarshalJSON ¶
func (impl *ExternalReplyInfo) UnmarshalJSON(data []byte) error
type File ¶
type File struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Optional. File size in bytes.
// It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
FileSize int64 `json:"file_size,omitempty"`
// Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
FilePath string `json:"file_path,omitempty"`
}
File This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
func GetFile ¶
GetFile Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again. Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.
func UploadStickerFile ¶
func UploadStickerFile(ctx context.Context, userId int64, sticker *LocalFile, stickerFormat string) (*File, error)
UploadStickerFile Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.
type FilterFunc ¶
func All ¶
func All(fn ...FilterFunc) FilterFunc
func Either ¶
func Either(fn ...FilterFunc) FilterFunc
func Not ¶
func Not(fn FilterFunc) FilterFunc
func OnCallbackWithData ¶
func OnCallbackWithData[T any](pred ...func(value *T) bool) FilterFunc
func OnChance ¶
func OnChance(chance float64) FilterFunc
func OnChannelPostInCommentsChat ¶
func OnChannelPostInCommentsChat() FilterFunc
OnChannelPostInCommentsChat uses OnSender with the id of the hidden Telegram channel->comments reposting bot.
func OnChat ¶
func OnChat(chatId ...int64) FilterFunc
func OnCommand ¶
func OnCommand(command string) FilterFunc
func OnNewChatMember ¶
func OnNewChatMember(filters ...func(user *User) bool) FilterFunc
func OnSender ¶
func OnSender(senderId ...int64) FilterFunc
func OnTextRegexp ¶
func OnTextRegexp(regex string) FilterFunc
type ForceReply ¶
type ForceReply struct {
// Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
ForceReply bool `json:"force_reply"`
// Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"`
// Optional. Use this parameter if you want to force reply from specific users only.
// Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.
Selective bool `json:"selective,omitempty"`
}
ForceReply Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account.
type ForumTopic ¶
type ForumTopic struct {
// Unique identifier of the forum topic
MessageThreadId int64 `json:"message_thread_id"`
// Name of the topic
Name string `json:"name"`
// Color of the topic icon in RGB format
IconColor int64 `json:"icon_color"`
// Optional. Unique identifier of the custom emoji shown as the topic icon
IconCustomEmojiId string `json:"icon_custom_emoji_id,omitempty"`
}
ForumTopic This object represents a forum topic.
func CreateForumTopic ¶
func CreateForumTopic(ctx context.Context, chatId int64, name string, opts ...*OptCreateForumTopic) (*ForumTopic, error)
CreateForumTopic Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
type ForumTopicClosed ¶
type ForumTopicClosed struct {
}
ForumTopicClosed This object represents a service message about a forum topic closed in the chat. Currently holds no information.
type ForumTopicCreated ¶
type ForumTopicCreated struct {
// Name of the topic
Name string `json:"name"`
// Color of the topic icon in RGB format
IconColor int64 `json:"icon_color"`
// Optional. Unique identifier of the custom emoji shown as the topic icon
IconCustomEmojiId string `json:"icon_custom_emoji_id,omitempty"`
}
ForumTopicCreated This object represents a service message about a new forum topic created in the chat.
type ForumTopicEdited ¶
type ForumTopicEdited struct {
// Optional. New name of the topic, if it was edited
Name string `json:"name,omitempty"`
// Optional.
// New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed
IconCustomEmojiId string `json:"icon_custom_emoji_id,omitempty"`
}
ForumTopicEdited This object represents a service message about an edited forum topic.
type ForumTopicReopened ¶
type ForumTopicReopened struct {
}
ForumTopicReopened This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
type Game ¶
type Game struct {
// Title of the game
Title string `json:"title"`
// Description of the game
Description string `json:"description"`
// Photo that will be displayed in the game message in chats.
Photo TelegramPhoto `json:"photo"`
// Optional. Brief description of the game or high scores included in the game message.
// Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText.
// 0-4096 characters.
Text string `json:"text,omitempty"`
// Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
TextEntities []*MessageEntity `json:"text_entities,omitempty"`
// Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
Animation *TelegramAnimation `json:"animation,omitempty"`
}
Game This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
type GameHighScore ¶
type GameHighScore struct {
// Position in high score table for the game
Position int64 `json:"position"`
// User
User *User `json:"user"`
// Score
Score int64 `json:"score"`
}
GameHighScore This object represents one row of the high scores table for a game.
func GetGameHighScores ¶
func GetGameHighScores(ctx context.Context, userId int64, opts ...*OptGetGameHighScores) ([]*GameHighScore, error)
GetGameHighScores Use this method to get data for high score tables. Returns an Array of GameHighScore objects. Will return the score of the specified user and several of their neighbors in a game.
type GeneralForumTopicHidden ¶
type GeneralForumTopicHidden struct {
}
GeneralForumTopicHidden This object represents a service message about General forum topic hidden in the chat. Currently holds no information.
type GeneralForumTopicUnhidden ¶
type GeneralForumTopicUnhidden struct {
}
GeneralForumTopicUnhidden This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.
type Gift ¶
type Gift struct {
// Unique identifier of the gift
Id string `json:"id"`
// The sticker that represents the gift
Sticker *Sticker `json:"sticker"`
// The number of Telegram Stars that must be paid to send the sticker
StarCount int64 `json:"star_count"`
// Optional. The total number of the gifts of this type that can be sent; for limited gifts only
TotalCount int64 `json:"total_count,omitempty"`
// Optional. The number of remaining gifts of this type that can be sent; for limited gifts only
RemainingCount int64 `json:"remaining_count,omitempty"`
}
Gift This object represents a gift that can be sent by the bot.
type Gifts ¶
type Gifts struct {
// The list of gifts
Gifts []*Gift `json:"gifts"`
}
Gifts This object represent a list of gifts.
type Giveaway ¶
type Giveaway struct {
// The list of chats which the user must join to participate in the giveaway
Chats []*Chat `json:"chats"`
// Point in time (Unix timestamp) when winners of the giveaway will be selected
WinnersSelectionDate int64 `json:"winners_selection_date"`
// The number of users which are supposed to be selected as winners of the giveaway
WinnerCount int64 `json:"winner_count"`
// Optional. True, if only users who join the chats after the giveaway started should be eligible to win
OnlyNewMembers bool `json:"only_new_members,omitempty"`
// Optional. True, if the list of giveaway winners will be visible to everyone
HasPublicWinners bool `json:"has_public_winners,omitempty"`
// Optional. Description of additional giveaway prize
PrizeDescription string `json:"prize_description,omitempty"`
// Optional. If empty, then all users can participate in the giveaway.
// A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come.
// Users with a phone number that was bought on Fragment can always participate in giveaways.
CountryCodes []string `json:"country_codes,omitempty"`
// Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
PrizeStarCount int64 `json:"prize_star_count,omitempty"`
// Optional.
// The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only
PremiumSubscriptionMonthCount int64 `json:"premium_subscription_month_count,omitempty"`
}
Giveaway This object represents a message about a scheduled giveaway.
type GiveawayCompleted ¶
type GiveawayCompleted struct {
// Number of winners in the giveaway
WinnerCount int64 `json:"winner_count"`
// Optional. Number of undistributed prizes
UnclaimedPrizeCount int64 `json:"unclaimed_prize_count,omitempty"`
// Optional. Message with the giveaway that was completed, if it wasn't deleted
GiveawayMessage *Message `json:"giveaway_message,omitempty"`
// Optional. True, if the giveaway is a Telegram Star giveaway.
// Otherwise, currently, the giveaway is a Telegram Premium giveaway.
IsStarGiveaway bool `json:"is_star_giveaway,omitempty"`
}
GiveawayCompleted This object represents a service message about the completion of a giveaway without public winners.
type GiveawayCreated ¶
type GiveawayCreated struct {
// Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
PrizeStarCount int64 `json:"prize_star_count,omitempty"`
}
GiveawayCreated This object represents a service message about the creation of a scheduled giveaway.
type GiveawayWinners ¶
type GiveawayWinners struct {
// The chat that created the giveaway
Chat *Chat `json:"chat"`
// Identifier of the message with the giveaway in the chat
GiveawayMessageId int64 `json:"giveaway_message_id"`
// Point in time (Unix timestamp) when winners of the giveaway were selected
WinnersSelectionDate int64 `json:"winners_selection_date"`
// Total number of winners in the giveaway
WinnerCount int64 `json:"winner_count"`
// List of up to 100 winners of the giveaway
Winners []*User `json:"winners"`
// Optional. The number of other chats the user had to join in order to be eligible for the giveaway
AdditionalChatCount int64 `json:"additional_chat_count,omitempty"`
// Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only
PrizeStarCount int64 `json:"prize_star_count,omitempty"`
// Optional.
// The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only
PremiumSubscriptionMonthCount int64 `json:"premium_subscription_month_count,omitempty"`
// Optional. Number of undistributed prizes
UnclaimedPrizeCount int64 `json:"unclaimed_prize_count,omitempty"`
// Optional. True, if only users who had joined the chats after the giveaway started were eligible to win
OnlyNewMembers bool `json:"only_new_members,omitempty"`
// Optional. True, if the giveaway was canceled because the payment for it was refunded
WasRefunded bool `json:"was_refunded,omitempty"`
// Optional. Description of additional giveaway prize
PrizeDescription string `json:"prize_description,omitempty"`
}
GiveawayWinners This object represents a message about the completion of a giveaway with public winners.
type HandlerFunc ¶
func Chain ¶
func Chain(handlers ...HandlerFunc) HandlerFunc
Chain allows convenient chaining of handlers. Example:
tg.NewFromEnv().
OnError(tg.OnErrorLog).
Branch(tg.OnVideo, tg.Chain(
tg.CommonReactionReply("👀"),
tg.Synced(SomeHeavyVideoConverterHandler),
tg.CommonReactionReply("👌")),
).
Start()
func CommonArgs ¶
func CommonArgs[T any](fn CommonArgsHandlerFunc[*T]) HandlerFunc
func CommonReactionReply ¶
func CommonReactionReply(emoji string, big ...bool) HandlerFunc
func CommonTextReply ¶
func CommonTextReply(text string, asReply ...bool) HandlerFunc
func Fallback ¶
func Fallback(handlers ...HandlerFunc) HandlerFunc
func FallbackWithMessage ¶
func FallbackWithMessage(handler HandlerFunc, msg string) HandlerFunc
func HandleAlbum ¶
func HandleAlbum(fn func(ctx context.Context, updates []*Update) error, cfg ...*ConfigHandleAlbum) HandlerFunc
HandleAlbum groups updates corresponding to the same MediaGroupId. Note: handling is happening after a delay, which could be adjusted with ConfigHandleAlbum (500ms by default).
func Synced ¶
func Synced(handlerFunc HandlerFunc) HandlerFunc
Synced wraps handler making it, ugh, synced.
type InlineKeyboardButton ¶
type InlineKeyboardButton struct {
// Label text on the button
Text string `json:"text"`
// Optional. HTTP or tg:// URL to be opened when the button is pressed.
// Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.
Url string `json:"url,omitempty"`
// Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes
CallbackData string `json:"callback_data,omitempty"`
// Optional. Description of the Web App that will be launched when the user presses the button.
// The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.
// Available only in private chats between a user and the bot.
// Not supported for messages sent on behalf of a Telegram Business account.
WebApp *WebAppInfo `json:"web_app,omitempty"`
// Optional. An HTTPS URL used to automatically authorize the user.
// Can be used as a replacement for the Telegram Login Widget.
LoginUrl *LoginUrl `json:"login_url,omitempty"`
// Optional. May be empty, in which case just the bot's username will be inserted.
// If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.
// Not supported for messages sent on behalf of a Telegram Business account.
SwitchInlineQuery string `json:"switch_inline_query,omitempty"`
// Optional. May be empty, in which case only the bot's username will be inserted.
// If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field.
// This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.
// Not supported in channels and for messages sent on behalf of a Telegram Business account.
SwitchInlineQueryCurrentChat string `json:"switch_inline_query_current_chat,omitempty"`
// Optional. Not supported for messages sent on behalf of a Telegram Business account.
// If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field.
SwitchInlineQueryChosenChat *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"`
// Optional. Description of the button that copies the specified text to the clipboard.
CopyText *CopyTextButton `json:"copy_text,omitempty"`
// Optional. Description of the game that will be launched when the user presses the button.
// NOTE: This type of button must always be the first button in the first row.
CallbackGame *CallbackGame `json:"callback_game,omitempty"`
// Optional. Specify True, to send a Pay button.
// Substrings "⭐" and "XTR" in the buttons's text will be replaced with a Telegram Star icon.
// NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.
Pay bool `json:"pay,omitempty"`
}
InlineKeyboardButton This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
// Array of button rows, each represented by an Array of InlineKeyboardButton objects
InlineKeyboard [][]*InlineKeyboardButton `json:"inline_keyboard"`
}
InlineKeyboardMarkup This object represents an inline keyboard that appears right next to the message it belongs to.
type InlineQuery ¶
type InlineQuery struct {
// Unique identifier for this query
Id string `json:"id"`
// Sender
From *User `json:"from"`
// Text of the query (up to 256 characters)
Query string `json:"query"`
// Offset of the results to be returned, can be controlled by the bot
Offset string `json:"offset"`
// Optional. Type of the chat from which the inline query was sent.
// Can be either "sender" for a private chat with the inline query sender, "private", "group", "supergroup", or "channel".
// The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat
ChatType string `json:"chat_type,omitempty"`
// Optional. Sender location, only for bots that request user location
Location *Location `json:"location,omitempty"`
}
InlineQuery This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
type InlineQueryResult ¶
type InlineQueryResult interface {
OptCachedAudio() *InlineQueryResultCachedAudio
OptCachedDocument() *InlineQueryResultCachedDocument
OptCachedGif() *InlineQueryResultCachedGif
OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
OptCachedPhoto() *InlineQueryResultCachedPhoto
OptCachedSticker() *InlineQueryResultCachedSticker
OptCachedVideo() *InlineQueryResultCachedVideo
OptCachedVoice() *InlineQueryResultCachedVoice
OptArticle() *InlineQueryResultArticle
OptAudio() *InlineQueryResultAudio
OptContact() *InlineQueryResultContact
OptGame() *InlineQueryResultGame
OptDocument() *InlineQueryResultDocument
OptGif() *InlineQueryResultGif
OptLocation() *InlineQueryResultLocation
OptMpeg4Gif() *InlineQueryResultMpeg4Gif
OptPhoto() *InlineQueryResultPhoto
OptVenue() *InlineQueryResultVenue
OptVideo() *InlineQueryResultVideo
OptVoice() *InlineQueryResultVoice
}
InlineQueryResult This object represents one result of an inline query. Telegram clients currently support results of the following 20 types: - InlineQueryResultCachedAudio - InlineQueryResultCachedDocument - InlineQueryResultCachedGif - InlineQueryResultCachedMpeg4Gif - InlineQueryResultCachedPhoto - InlineQueryResultCachedSticker - InlineQueryResultCachedVideo - InlineQueryResultCachedVoice - InlineQueryResultArticle - InlineQueryResultAudio - InlineQueryResultContact - InlineQueryResultGame - InlineQueryResultDocument - InlineQueryResultGif - InlineQueryResultLocation - InlineQueryResultMpeg4Gif - InlineQueryResultPhoto - InlineQueryResultVenue - InlineQueryResultVideo - InlineQueryResultVoice Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct {
// Type of the result, must be article
Type string `json:"type"`
// Unique identifier for this result, 1-64 Bytes
Id string `json:"id"`
// Title of the result
Title string `json:"title"`
// Content of the message to be sent
InputMessageContent InputMessageContent `json:"input_message_content"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. URL of the result
Url string `json:"url,omitempty"`
// Optional. Pass True if you don't want the URL to be shown in the message
HideUrl bool `json:"hide_url,omitempty"`
// Optional. Short description of the result
Description string `json:"description,omitempty"`
// Optional. Url of the thumbnail for the result
ThumbnailUrl string `json:"thumbnail_url,omitempty"`
// Optional. Thumbnail width
ThumbnailWidth int64 `json:"thumbnail_width,omitempty"`
// Optional. Thumbnail height
ThumbnailHeight int64 `json:"thumbnail_height,omitempty"`
}
InlineQueryResultArticle Represents a link to an article or web page.
func (*InlineQueryResultArticle) OptArticle ¶
func (impl *InlineQueryResultArticle) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultArticle) OptAudio ¶
func (impl *InlineQueryResultArticle) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultArticle) OptCachedAudio ¶
func (impl *InlineQueryResultArticle) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultArticle) OptCachedDocument ¶
func (impl *InlineQueryResultArticle) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultArticle) OptCachedGif ¶
func (impl *InlineQueryResultArticle) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultArticle) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultArticle) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultArticle) OptCachedPhoto ¶
func (impl *InlineQueryResultArticle) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultArticle) OptCachedSticker ¶
func (impl *InlineQueryResultArticle) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultArticle) OptCachedVideo ¶
func (impl *InlineQueryResultArticle) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultArticle) OptCachedVoice ¶
func (impl *InlineQueryResultArticle) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultArticle) OptContact ¶
func (impl *InlineQueryResultArticle) OptContact() *InlineQueryResultContact
func (*InlineQueryResultArticle) OptDocument ¶
func (impl *InlineQueryResultArticle) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultArticle) OptGame ¶
func (impl *InlineQueryResultArticle) OptGame() *InlineQueryResultGame
func (*InlineQueryResultArticle) OptGif ¶
func (impl *InlineQueryResultArticle) OptGif() *InlineQueryResultGif
func (*InlineQueryResultArticle) OptLocation ¶
func (impl *InlineQueryResultArticle) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultArticle) OptMpeg4Gif ¶
func (impl *InlineQueryResultArticle) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultArticle) OptPhoto ¶
func (impl *InlineQueryResultArticle) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultArticle) OptVenue ¶
func (impl *InlineQueryResultArticle) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultArticle) OptVideo ¶
func (impl *InlineQueryResultArticle) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultArticle) OptVoice ¶
func (impl *InlineQueryResultArticle) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultArticle) UnmarshalJSON ¶
func (impl *InlineQueryResultArticle) UnmarshalJSON(data []byte) error
type InlineQueryResultAudio ¶
type InlineQueryResultAudio struct {
// Type of the result, must be audio
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid URL for the audio file
AudioUrl string `json:"audio_url"`
// Title
Title string `json:"title"`
// Optional. Caption, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Performer
Performer string `json:"performer,omitempty"`
// Optional. Audio duration in seconds
AudioDuration int64 `json:"audio_duration,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the audio
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultAudio Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
func (*InlineQueryResultAudio) OptArticle ¶
func (impl *InlineQueryResultAudio) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultAudio) OptAudio ¶
func (impl *InlineQueryResultAudio) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultAudio) OptCachedAudio ¶
func (impl *InlineQueryResultAudio) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultAudio) OptCachedDocument ¶
func (impl *InlineQueryResultAudio) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultAudio) OptCachedGif ¶
func (impl *InlineQueryResultAudio) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultAudio) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultAudio) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultAudio) OptCachedPhoto ¶
func (impl *InlineQueryResultAudio) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultAudio) OptCachedSticker ¶
func (impl *InlineQueryResultAudio) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultAudio) OptCachedVideo ¶
func (impl *InlineQueryResultAudio) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultAudio) OptCachedVoice ¶
func (impl *InlineQueryResultAudio) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultAudio) OptContact ¶
func (impl *InlineQueryResultAudio) OptContact() *InlineQueryResultContact
func (*InlineQueryResultAudio) OptDocument ¶
func (impl *InlineQueryResultAudio) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultAudio) OptGame ¶
func (impl *InlineQueryResultAudio) OptGame() *InlineQueryResultGame
func (*InlineQueryResultAudio) OptGif ¶
func (impl *InlineQueryResultAudio) OptGif() *InlineQueryResultGif
func (*InlineQueryResultAudio) OptLocation ¶
func (impl *InlineQueryResultAudio) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultAudio) OptMpeg4Gif ¶
func (impl *InlineQueryResultAudio) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultAudio) OptPhoto ¶
func (impl *InlineQueryResultAudio) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultAudio) OptVenue ¶
func (impl *InlineQueryResultAudio) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultAudio) OptVideo ¶
func (impl *InlineQueryResultAudio) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultAudio) OptVoice ¶
func (impl *InlineQueryResultAudio) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultAudio) UnmarshalJSON ¶
func (impl *InlineQueryResultAudio) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedAudio ¶
type InlineQueryResultCachedAudio struct {
// Type of the result, must be audio
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid file identifier for the audio file
AudioFileId string `json:"audio_file_id"`
// Optional. Caption, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the audio
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedAudio Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
func (*InlineQueryResultCachedAudio) Download ¶
func (impl *InlineQueryResultCachedAudio) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedAudio) DownloadTemp ¶
func (*InlineQueryResultCachedAudio) OptArticle ¶
func (impl *InlineQueryResultCachedAudio) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedAudio) OptAudio ¶
func (impl *InlineQueryResultCachedAudio) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedAudio) OptCachedAudio ¶
func (impl *InlineQueryResultCachedAudio) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedAudio) OptCachedDocument ¶
func (impl *InlineQueryResultCachedAudio) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedAudio) OptCachedGif ¶
func (impl *InlineQueryResultCachedAudio) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedAudio) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedAudio) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedAudio) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedAudio) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedAudio) OptCachedSticker ¶
func (impl *InlineQueryResultCachedAudio) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedAudio) OptCachedVideo ¶
func (impl *InlineQueryResultCachedAudio) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedAudio) OptCachedVoice ¶
func (impl *InlineQueryResultCachedAudio) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedAudio) OptContact ¶
func (impl *InlineQueryResultCachedAudio) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedAudio) OptDocument ¶
func (impl *InlineQueryResultCachedAudio) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedAudio) OptGame ¶
func (impl *InlineQueryResultCachedAudio) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedAudio) OptGif ¶
func (impl *InlineQueryResultCachedAudio) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedAudio) OptLocation ¶
func (impl *InlineQueryResultCachedAudio) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedAudio) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedAudio) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedAudio) OptPhoto ¶
func (impl *InlineQueryResultCachedAudio) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedAudio) OptVenue ¶
func (impl *InlineQueryResultCachedAudio) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedAudio) OptVideo ¶
func (impl *InlineQueryResultCachedAudio) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedAudio) OptVoice ¶
func (impl *InlineQueryResultCachedAudio) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedAudio) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedAudio) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedDocument ¶
type InlineQueryResultCachedDocument struct {
// Type of the result, must be document
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// Title for the result
Title string `json:"title"`
// A valid file identifier for the file
DocumentFileId string `json:"document_file_id"`
// Optional. Short description of the result
Description string `json:"description,omitempty"`
// Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the document caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the file
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedDocument Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.
func (*InlineQueryResultCachedDocument) Download ¶
func (impl *InlineQueryResultCachedDocument) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedDocument) DownloadTemp ¶
func (*InlineQueryResultCachedDocument) OptArticle ¶
func (impl *InlineQueryResultCachedDocument) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedDocument) OptAudio ¶
func (impl *InlineQueryResultCachedDocument) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedDocument) OptCachedAudio ¶
func (impl *InlineQueryResultCachedDocument) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedDocument) OptCachedDocument ¶
func (impl *InlineQueryResultCachedDocument) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedDocument) OptCachedGif ¶
func (impl *InlineQueryResultCachedDocument) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedDocument) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedDocument) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedDocument) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedDocument) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedDocument) OptCachedSticker ¶
func (impl *InlineQueryResultCachedDocument) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedDocument) OptCachedVideo ¶
func (impl *InlineQueryResultCachedDocument) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedDocument) OptCachedVoice ¶
func (impl *InlineQueryResultCachedDocument) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedDocument) OptContact ¶
func (impl *InlineQueryResultCachedDocument) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedDocument) OptDocument ¶
func (impl *InlineQueryResultCachedDocument) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedDocument) OptGame ¶
func (impl *InlineQueryResultCachedDocument) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedDocument) OptGif ¶
func (impl *InlineQueryResultCachedDocument) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedDocument) OptLocation ¶
func (impl *InlineQueryResultCachedDocument) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedDocument) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedDocument) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedDocument) OptPhoto ¶
func (impl *InlineQueryResultCachedDocument) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedDocument) OptVenue ¶
func (impl *InlineQueryResultCachedDocument) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedDocument) OptVideo ¶
func (impl *InlineQueryResultCachedDocument) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedDocument) OptVoice ¶
func (impl *InlineQueryResultCachedDocument) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedDocument) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedDocument) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedGif ¶
type InlineQueryResultCachedGif struct {
// Type of the result, must be gif
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid file identifier for the GIF file
GifFileId string `json:"gif_file_id"`
// Optional. Title for the result
Title string `json:"title,omitempty"`
// Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the GIF animation
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedGif Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
func (*InlineQueryResultCachedGif) Download ¶
func (impl *InlineQueryResultCachedGif) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedGif) DownloadTemp ¶
func (*InlineQueryResultCachedGif) OptArticle ¶
func (impl *InlineQueryResultCachedGif) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedGif) OptAudio ¶
func (impl *InlineQueryResultCachedGif) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedGif) OptCachedAudio ¶
func (impl *InlineQueryResultCachedGif) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedGif) OptCachedDocument ¶
func (impl *InlineQueryResultCachedGif) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedGif) OptCachedGif ¶
func (impl *InlineQueryResultCachedGif) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedGif) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedGif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedGif) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedGif) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedGif) OptCachedSticker ¶
func (impl *InlineQueryResultCachedGif) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedGif) OptCachedVideo ¶
func (impl *InlineQueryResultCachedGif) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedGif) OptCachedVoice ¶
func (impl *InlineQueryResultCachedGif) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedGif) OptContact ¶
func (impl *InlineQueryResultCachedGif) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedGif) OptDocument ¶
func (impl *InlineQueryResultCachedGif) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedGif) OptGame ¶
func (impl *InlineQueryResultCachedGif) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedGif) OptGif ¶
func (impl *InlineQueryResultCachedGif) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedGif) OptLocation ¶
func (impl *InlineQueryResultCachedGif) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedGif) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedGif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedGif) OptPhoto ¶
func (impl *InlineQueryResultCachedGif) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedGif) OptVenue ¶
func (impl *InlineQueryResultCachedGif) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedGif) OptVideo ¶
func (impl *InlineQueryResultCachedGif) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedGif) OptVoice ¶
func (impl *InlineQueryResultCachedGif) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedGif) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedGif) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedMpeg4Gif ¶
type InlineQueryResultCachedMpeg4Gif struct {
// Type of the result, must be mpeg4_gif
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid file identifier for the MPEG4 file
Mpeg4FileId string `json:"mpeg4_file_id"`
// Optional. Title for the result
Title string `json:"title,omitempty"`
// Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the video animation
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedMpeg4Gif Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
func (*InlineQueryResultCachedMpeg4Gif) Download ¶
func (impl *InlineQueryResultCachedMpeg4Gif) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedMpeg4Gif) DownloadTemp ¶
func (*InlineQueryResultCachedMpeg4Gif) OptArticle ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedMpeg4Gif) OptAudio ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedMpeg4Gif) OptCachedAudio ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedMpeg4Gif) OptCachedDocument ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedMpeg4Gif) OptCachedGif ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedMpeg4Gif) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedMpeg4Gif) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedMpeg4Gif) OptCachedSticker ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedMpeg4Gif) OptCachedVideo ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedMpeg4Gif) OptCachedVoice ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedMpeg4Gif) OptContact ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedMpeg4Gif) OptDocument ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedMpeg4Gif) OptGame ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedMpeg4Gif) OptGif ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedMpeg4Gif) OptLocation ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedMpeg4Gif) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedMpeg4Gif) OptPhoto ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedMpeg4Gif) OptVenue ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedMpeg4Gif) OptVideo ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedMpeg4Gif) OptVoice ¶
func (impl *InlineQueryResultCachedMpeg4Gif) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedMpeg4Gif) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedMpeg4Gif) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedPhoto ¶
type InlineQueryResultCachedPhoto struct {
// Type of the result, must be photo
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid file identifier of the photo
PhotoFileId string `json:"photo_file_id"`
// Optional. Title for the result
Title string `json:"title,omitempty"`
// Optional. Short description of the result
Description string `json:"description,omitempty"`
// Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the photo
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedPhoto Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
func (*InlineQueryResultCachedPhoto) Download ¶
func (impl *InlineQueryResultCachedPhoto) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedPhoto) DownloadTemp ¶
func (*InlineQueryResultCachedPhoto) OptArticle ¶
func (impl *InlineQueryResultCachedPhoto) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedPhoto) OptAudio ¶
func (impl *InlineQueryResultCachedPhoto) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedPhoto) OptCachedAudio ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedPhoto) OptCachedDocument ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedPhoto) OptCachedGif ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedPhoto) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedPhoto) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedPhoto) OptCachedSticker ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedPhoto) OptCachedVideo ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedPhoto) OptCachedVoice ¶
func (impl *InlineQueryResultCachedPhoto) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedPhoto) OptContact ¶
func (impl *InlineQueryResultCachedPhoto) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedPhoto) OptDocument ¶
func (impl *InlineQueryResultCachedPhoto) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedPhoto) OptGame ¶
func (impl *InlineQueryResultCachedPhoto) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedPhoto) OptGif ¶
func (impl *InlineQueryResultCachedPhoto) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedPhoto) OptLocation ¶
func (impl *InlineQueryResultCachedPhoto) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedPhoto) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedPhoto) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedPhoto) OptPhoto ¶
func (impl *InlineQueryResultCachedPhoto) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedPhoto) OptVenue ¶
func (impl *InlineQueryResultCachedPhoto) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedPhoto) OptVideo ¶
func (impl *InlineQueryResultCachedPhoto) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedPhoto) OptVoice ¶
func (impl *InlineQueryResultCachedPhoto) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedPhoto) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedPhoto) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedSticker ¶
type InlineQueryResultCachedSticker struct {
// Type of the result, must be sticker
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid file identifier of the sticker
StickerFileId string `json:"sticker_file_id"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the sticker
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedSticker Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.
func (*InlineQueryResultCachedSticker) Download ¶
func (impl *InlineQueryResultCachedSticker) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedSticker) DownloadTemp ¶
func (*InlineQueryResultCachedSticker) OptArticle ¶
func (impl *InlineQueryResultCachedSticker) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedSticker) OptAudio ¶
func (impl *InlineQueryResultCachedSticker) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedSticker) OptCachedAudio ¶
func (impl *InlineQueryResultCachedSticker) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedSticker) OptCachedDocument ¶
func (impl *InlineQueryResultCachedSticker) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedSticker) OptCachedGif ¶
func (impl *InlineQueryResultCachedSticker) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedSticker) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedSticker) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedSticker) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedSticker) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedSticker) OptCachedSticker ¶
func (impl *InlineQueryResultCachedSticker) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedSticker) OptCachedVideo ¶
func (impl *InlineQueryResultCachedSticker) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedSticker) OptCachedVoice ¶
func (impl *InlineQueryResultCachedSticker) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedSticker) OptContact ¶
func (impl *InlineQueryResultCachedSticker) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedSticker) OptDocument ¶
func (impl *InlineQueryResultCachedSticker) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedSticker) OptGame ¶
func (impl *InlineQueryResultCachedSticker) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedSticker) OptGif ¶
func (impl *InlineQueryResultCachedSticker) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedSticker) OptLocation ¶
func (impl *InlineQueryResultCachedSticker) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedSticker) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedSticker) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedSticker) OptPhoto ¶
func (impl *InlineQueryResultCachedSticker) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedSticker) OptVenue ¶
func (impl *InlineQueryResultCachedSticker) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedSticker) OptVideo ¶
func (impl *InlineQueryResultCachedSticker) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedSticker) OptVoice ¶
func (impl *InlineQueryResultCachedSticker) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedSticker) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedSticker) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedVideo ¶
type InlineQueryResultCachedVideo struct {
// Type of the result, must be video
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid file identifier for the video file
VideoFileId string `json:"video_file_id"`
// Title for the result
Title string `json:"title"`
// Optional. Short description of the result
Description string `json:"description,omitempty"`
// Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the video caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the video
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedVideo Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
func (*InlineQueryResultCachedVideo) Download ¶
func (impl *InlineQueryResultCachedVideo) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedVideo) DownloadTemp ¶
func (*InlineQueryResultCachedVideo) OptArticle ¶
func (impl *InlineQueryResultCachedVideo) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedVideo) OptAudio ¶
func (impl *InlineQueryResultCachedVideo) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedVideo) OptCachedAudio ¶
func (impl *InlineQueryResultCachedVideo) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedVideo) OptCachedDocument ¶
func (impl *InlineQueryResultCachedVideo) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedVideo) OptCachedGif ¶
func (impl *InlineQueryResultCachedVideo) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedVideo) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedVideo) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedVideo) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedVideo) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedVideo) OptCachedSticker ¶
func (impl *InlineQueryResultCachedVideo) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedVideo) OptCachedVideo ¶
func (impl *InlineQueryResultCachedVideo) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedVideo) OptCachedVoice ¶
func (impl *InlineQueryResultCachedVideo) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedVideo) OptContact ¶
func (impl *InlineQueryResultCachedVideo) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedVideo) OptDocument ¶
func (impl *InlineQueryResultCachedVideo) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedVideo) OptGame ¶
func (impl *InlineQueryResultCachedVideo) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedVideo) OptGif ¶
func (impl *InlineQueryResultCachedVideo) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedVideo) OptLocation ¶
func (impl *InlineQueryResultCachedVideo) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedVideo) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedVideo) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedVideo) OptPhoto ¶
func (impl *InlineQueryResultCachedVideo) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedVideo) OptVenue ¶
func (impl *InlineQueryResultCachedVideo) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedVideo) OptVideo ¶
func (impl *InlineQueryResultCachedVideo) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedVideo) OptVoice ¶
func (impl *InlineQueryResultCachedVideo) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedVideo) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedVideo) UnmarshalJSON(data []byte) error
type InlineQueryResultCachedVoice ¶
type InlineQueryResultCachedVoice struct {
// Type of the result, must be voice
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid file identifier for the voice message
VoiceFileId string `json:"voice_file_id"`
// Voice message title
Title string `json:"title"`
// Optional. Caption, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the voice message
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedVoice Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
func (*InlineQueryResultCachedVoice) Download ¶
func (impl *InlineQueryResultCachedVoice) Download(ctx context.Context, path string) error
func (*InlineQueryResultCachedVoice) DownloadTemp ¶
func (*InlineQueryResultCachedVoice) OptArticle ¶
func (impl *InlineQueryResultCachedVoice) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultCachedVoice) OptAudio ¶
func (impl *InlineQueryResultCachedVoice) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultCachedVoice) OptCachedAudio ¶
func (impl *InlineQueryResultCachedVoice) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultCachedVoice) OptCachedDocument ¶
func (impl *InlineQueryResultCachedVoice) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultCachedVoice) OptCachedGif ¶
func (impl *InlineQueryResultCachedVoice) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultCachedVoice) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultCachedVoice) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultCachedVoice) OptCachedPhoto ¶
func (impl *InlineQueryResultCachedVoice) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultCachedVoice) OptCachedSticker ¶
func (impl *InlineQueryResultCachedVoice) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultCachedVoice) OptCachedVideo ¶
func (impl *InlineQueryResultCachedVoice) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultCachedVoice) OptCachedVoice ¶
func (impl *InlineQueryResultCachedVoice) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultCachedVoice) OptContact ¶
func (impl *InlineQueryResultCachedVoice) OptContact() *InlineQueryResultContact
func (*InlineQueryResultCachedVoice) OptDocument ¶
func (impl *InlineQueryResultCachedVoice) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultCachedVoice) OptGame ¶
func (impl *InlineQueryResultCachedVoice) OptGame() *InlineQueryResultGame
func (*InlineQueryResultCachedVoice) OptGif ¶
func (impl *InlineQueryResultCachedVoice) OptGif() *InlineQueryResultGif
func (*InlineQueryResultCachedVoice) OptLocation ¶
func (impl *InlineQueryResultCachedVoice) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultCachedVoice) OptMpeg4Gif ¶
func (impl *InlineQueryResultCachedVoice) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultCachedVoice) OptPhoto ¶
func (impl *InlineQueryResultCachedVoice) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultCachedVoice) OptVenue ¶
func (impl *InlineQueryResultCachedVoice) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultCachedVoice) OptVideo ¶
func (impl *InlineQueryResultCachedVoice) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultCachedVoice) OptVoice ¶
func (impl *InlineQueryResultCachedVoice) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultCachedVoice) UnmarshalJSON ¶
func (impl *InlineQueryResultCachedVoice) UnmarshalJSON(data []byte) error
type InlineQueryResultContact ¶
type InlineQueryResultContact struct {
// Type of the result, must be contact
Type string `json:"type"`
// Unique identifier for this result, 1-64 Bytes
Id string `json:"id"`
// Contact's phone number
PhoneNumber string `json:"phone_number"`
// Contact's first name
FirstName string `json:"first_name"`
// Optional. Contact's last name
LastName string `json:"last_name,omitempty"`
// Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
Vcard string `json:"vcard,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the contact
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
// Optional. Url of the thumbnail for the result
ThumbnailUrl string `json:"thumbnail_url,omitempty"`
// Optional. Thumbnail width
ThumbnailWidth int64 `json:"thumbnail_width,omitempty"`
// Optional. Thumbnail height
ThumbnailHeight int64 `json:"thumbnail_height,omitempty"`
}
InlineQueryResultContact Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
func (*InlineQueryResultContact) OptArticle ¶
func (impl *InlineQueryResultContact) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultContact) OptAudio ¶
func (impl *InlineQueryResultContact) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultContact) OptCachedAudio ¶
func (impl *InlineQueryResultContact) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultContact) OptCachedDocument ¶
func (impl *InlineQueryResultContact) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultContact) OptCachedGif ¶
func (impl *InlineQueryResultContact) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultContact) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultContact) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultContact) OptCachedPhoto ¶
func (impl *InlineQueryResultContact) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultContact) OptCachedSticker ¶
func (impl *InlineQueryResultContact) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultContact) OptCachedVideo ¶
func (impl *InlineQueryResultContact) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultContact) OptCachedVoice ¶
func (impl *InlineQueryResultContact) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultContact) OptContact ¶
func (impl *InlineQueryResultContact) OptContact() *InlineQueryResultContact
func (*InlineQueryResultContact) OptDocument ¶
func (impl *InlineQueryResultContact) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultContact) OptGame ¶
func (impl *InlineQueryResultContact) OptGame() *InlineQueryResultGame
func (*InlineQueryResultContact) OptGif ¶
func (impl *InlineQueryResultContact) OptGif() *InlineQueryResultGif
func (*InlineQueryResultContact) OptLocation ¶
func (impl *InlineQueryResultContact) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultContact) OptMpeg4Gif ¶
func (impl *InlineQueryResultContact) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultContact) OptPhoto ¶
func (impl *InlineQueryResultContact) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultContact) OptVenue ¶
func (impl *InlineQueryResultContact) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultContact) OptVideo ¶
func (impl *InlineQueryResultContact) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultContact) OptVoice ¶
func (impl *InlineQueryResultContact) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultContact) UnmarshalJSON ¶
func (impl *InlineQueryResultContact) UnmarshalJSON(data []byte) error
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct {
// Type of the result, must be document
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// Title for the result
Title string `json:"title"`
// Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the document caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// A valid URL for the file
DocumentUrl string `json:"document_url"`
// MIME type of the content of the file, either "application/pdf" or "application/zip"
MimeType string `json:"mime_type"`
// Optional. Short description of the result
Description string `json:"description,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the file
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
// Optional. URL of the thumbnail (JPEG only) for the file
ThumbnailUrl string `json:"thumbnail_url,omitempty"`
// Optional. Thumbnail width
ThumbnailWidth int64 `json:"thumbnail_width,omitempty"`
// Optional. Thumbnail height
ThumbnailHeight int64 `json:"thumbnail_height,omitempty"`
}
InlineQueryResultDocument Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.
func (*InlineQueryResultDocument) OptArticle ¶
func (impl *InlineQueryResultDocument) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultDocument) OptAudio ¶
func (impl *InlineQueryResultDocument) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultDocument) OptCachedAudio ¶
func (impl *InlineQueryResultDocument) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultDocument) OptCachedDocument ¶
func (impl *InlineQueryResultDocument) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultDocument) OptCachedGif ¶
func (impl *InlineQueryResultDocument) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultDocument) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultDocument) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultDocument) OptCachedPhoto ¶
func (impl *InlineQueryResultDocument) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultDocument) OptCachedSticker ¶
func (impl *InlineQueryResultDocument) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultDocument) OptCachedVideo ¶
func (impl *InlineQueryResultDocument) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultDocument) OptCachedVoice ¶
func (impl *InlineQueryResultDocument) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultDocument) OptContact ¶
func (impl *InlineQueryResultDocument) OptContact() *InlineQueryResultContact
func (*InlineQueryResultDocument) OptDocument ¶
func (impl *InlineQueryResultDocument) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultDocument) OptGame ¶
func (impl *InlineQueryResultDocument) OptGame() *InlineQueryResultGame
func (*InlineQueryResultDocument) OptGif ¶
func (impl *InlineQueryResultDocument) OptGif() *InlineQueryResultGif
func (*InlineQueryResultDocument) OptLocation ¶
func (impl *InlineQueryResultDocument) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultDocument) OptMpeg4Gif ¶
func (impl *InlineQueryResultDocument) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultDocument) OptPhoto ¶
func (impl *InlineQueryResultDocument) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultDocument) OptVenue ¶
func (impl *InlineQueryResultDocument) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultDocument) OptVideo ¶
func (impl *InlineQueryResultDocument) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultDocument) OptVoice ¶
func (impl *InlineQueryResultDocument) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultDocument) UnmarshalJSON ¶
func (impl *InlineQueryResultDocument) UnmarshalJSON(data []byte) error
type InlineQueryResultGame ¶
type InlineQueryResultGame struct {
// Type of the result, must be game
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// Short name of the game
GameShortName string `json:"game_short_name"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultGame Represents a Game.
func (*InlineQueryResultGame) OptArticle ¶
func (impl *InlineQueryResultGame) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultGame) OptAudio ¶
func (impl *InlineQueryResultGame) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultGame) OptCachedAudio ¶
func (impl *InlineQueryResultGame) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultGame) OptCachedDocument ¶
func (impl *InlineQueryResultGame) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultGame) OptCachedGif ¶
func (impl *InlineQueryResultGame) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultGame) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultGame) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultGame) OptCachedPhoto ¶
func (impl *InlineQueryResultGame) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultGame) OptCachedSticker ¶
func (impl *InlineQueryResultGame) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultGame) OptCachedVideo ¶
func (impl *InlineQueryResultGame) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultGame) OptCachedVoice ¶
func (impl *InlineQueryResultGame) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultGame) OptContact ¶
func (impl *InlineQueryResultGame) OptContact() *InlineQueryResultContact
func (*InlineQueryResultGame) OptDocument ¶
func (impl *InlineQueryResultGame) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultGame) OptGame ¶
func (impl *InlineQueryResultGame) OptGame() *InlineQueryResultGame
func (*InlineQueryResultGame) OptGif ¶
func (impl *InlineQueryResultGame) OptGif() *InlineQueryResultGif
func (*InlineQueryResultGame) OptLocation ¶
func (impl *InlineQueryResultGame) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultGame) OptMpeg4Gif ¶
func (impl *InlineQueryResultGame) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultGame) OptPhoto ¶
func (impl *InlineQueryResultGame) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultGame) OptVenue ¶
func (impl *InlineQueryResultGame) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultGame) OptVideo ¶
func (impl *InlineQueryResultGame) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultGame) OptVoice ¶
func (impl *InlineQueryResultGame) OptVoice() *InlineQueryResultVoice
type InlineQueryResultGif ¶
type InlineQueryResultGif struct {
// Type of the result, must be gif
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid URL for the GIF file. File size must not exceed 1MB
GifUrl string `json:"gif_url"`
// Optional. Width of the GIF
GifWidth int64 `json:"gif_width,omitempty"`
// Optional. Height of the GIF
GifHeight int64 `json:"gif_height,omitempty"`
// Optional. Duration of the GIF in seconds
GifDuration int64 `json:"gif_duration,omitempty"`
// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
ThumbnailUrl string `json:"thumbnail_url"`
// Optional. MIME type of the thumbnail, must be one of "image/jpeg", "image/gif", or "video/mp4".
// Defaults to "image/jpeg"
ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"`
// Optional. Title for the result
Title string `json:"title,omitempty"`
// Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the GIF animation
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultGif Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
func (*InlineQueryResultGif) OptArticle ¶
func (impl *InlineQueryResultGif) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultGif) OptAudio ¶
func (impl *InlineQueryResultGif) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultGif) OptCachedAudio ¶
func (impl *InlineQueryResultGif) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultGif) OptCachedDocument ¶
func (impl *InlineQueryResultGif) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultGif) OptCachedGif ¶
func (impl *InlineQueryResultGif) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultGif) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultGif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultGif) OptCachedPhoto ¶
func (impl *InlineQueryResultGif) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultGif) OptCachedSticker ¶
func (impl *InlineQueryResultGif) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultGif) OptCachedVideo ¶
func (impl *InlineQueryResultGif) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultGif) OptCachedVoice ¶
func (impl *InlineQueryResultGif) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultGif) OptContact ¶
func (impl *InlineQueryResultGif) OptContact() *InlineQueryResultContact
func (*InlineQueryResultGif) OptDocument ¶
func (impl *InlineQueryResultGif) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultGif) OptGame ¶
func (impl *InlineQueryResultGif) OptGame() *InlineQueryResultGame
func (*InlineQueryResultGif) OptGif ¶
func (impl *InlineQueryResultGif) OptGif() *InlineQueryResultGif
func (*InlineQueryResultGif) OptLocation ¶
func (impl *InlineQueryResultGif) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultGif) OptMpeg4Gif ¶
func (impl *InlineQueryResultGif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultGif) OptPhoto ¶
func (impl *InlineQueryResultGif) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultGif) OptVenue ¶
func (impl *InlineQueryResultGif) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultGif) OptVideo ¶
func (impl *InlineQueryResultGif) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultGif) OptVoice ¶
func (impl *InlineQueryResultGif) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultGif) UnmarshalJSON ¶
func (impl *InlineQueryResultGif) UnmarshalJSON(data []byte) error
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct {
// Type of the result, must be location
Type string `json:"type"`
// Unique identifier for this result, 1-64 Bytes
Id string `json:"id"`
// Location latitude in degrees
Latitude float64 `json:"latitude"`
// Location longitude in degrees
Longitude float64 `json:"longitude"`
// Location title
Title string `json:"title"`
// Optional. The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
// Optional.
// Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
LivePeriod int64 `json:"live_period,omitempty"`
// Optional. For live locations, a direction in which the user is moving, in degrees.
// Must be between 1 and 360 if specified.
Heading int64 `json:"heading,omitempty"`
// Optional. Must be between 1 and 100000 if specified.
// For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters.
ProximityAlertRadius int64 `json:"proximity_alert_radius,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the location
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
// Optional. Url of the thumbnail for the result
ThumbnailUrl string `json:"thumbnail_url,omitempty"`
// Optional. Thumbnail width
ThumbnailWidth int64 `json:"thumbnail_width,omitempty"`
// Optional. Thumbnail height
ThumbnailHeight int64 `json:"thumbnail_height,omitempty"`
}
InlineQueryResultLocation Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.
func (*InlineQueryResultLocation) OptArticle ¶
func (impl *InlineQueryResultLocation) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultLocation) OptAudio ¶
func (impl *InlineQueryResultLocation) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultLocation) OptCachedAudio ¶
func (impl *InlineQueryResultLocation) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultLocation) OptCachedDocument ¶
func (impl *InlineQueryResultLocation) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultLocation) OptCachedGif ¶
func (impl *InlineQueryResultLocation) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultLocation) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultLocation) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultLocation) OptCachedPhoto ¶
func (impl *InlineQueryResultLocation) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultLocation) OptCachedSticker ¶
func (impl *InlineQueryResultLocation) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultLocation) OptCachedVideo ¶
func (impl *InlineQueryResultLocation) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultLocation) OptCachedVoice ¶
func (impl *InlineQueryResultLocation) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultLocation) OptContact ¶
func (impl *InlineQueryResultLocation) OptContact() *InlineQueryResultContact
func (*InlineQueryResultLocation) OptDocument ¶
func (impl *InlineQueryResultLocation) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultLocation) OptGame ¶
func (impl *InlineQueryResultLocation) OptGame() *InlineQueryResultGame
func (*InlineQueryResultLocation) OptGif ¶
func (impl *InlineQueryResultLocation) OptGif() *InlineQueryResultGif
func (*InlineQueryResultLocation) OptLocation ¶
func (impl *InlineQueryResultLocation) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultLocation) OptMpeg4Gif ¶
func (impl *InlineQueryResultLocation) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultLocation) OptPhoto ¶
func (impl *InlineQueryResultLocation) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultLocation) OptVenue ¶
func (impl *InlineQueryResultLocation) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultLocation) OptVideo ¶
func (impl *InlineQueryResultLocation) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultLocation) OptVoice ¶
func (impl *InlineQueryResultLocation) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultLocation) UnmarshalJSON ¶
func (impl *InlineQueryResultLocation) UnmarshalJSON(data []byte) error
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct {
// Type of the result, must be mpeg4_gif
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid URL for the MPEG4 file. File size must not exceed 1MB
Mpeg4Url string `json:"mpeg4_url"`
// Optional. Video width
Mpeg4Width int64 `json:"mpeg4_width,omitempty"`
// Optional. Video height
Mpeg4Height int64 `json:"mpeg4_height,omitempty"`
// Optional. Video duration in seconds
Mpeg4Duration int64 `json:"mpeg4_duration,omitempty"`
// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
ThumbnailUrl string `json:"thumbnail_url"`
// Optional. MIME type of the thumbnail, must be one of "image/jpeg", "image/gif", or "video/mp4".
// Defaults to "image/jpeg"
ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"`
// Optional. Title for the result
Title string `json:"title,omitempty"`
// Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the video animation
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultMpeg4Gif Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
func (*InlineQueryResultMpeg4Gif) OptArticle ¶
func (impl *InlineQueryResultMpeg4Gif) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultMpeg4Gif) OptAudio ¶
func (impl *InlineQueryResultMpeg4Gif) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultMpeg4Gif) OptCachedAudio ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultMpeg4Gif) OptCachedDocument ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultMpeg4Gif) OptCachedGif ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultMpeg4Gif) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultMpeg4Gif) OptCachedPhoto ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultMpeg4Gif) OptCachedSticker ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultMpeg4Gif) OptCachedVideo ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultMpeg4Gif) OptCachedVoice ¶
func (impl *InlineQueryResultMpeg4Gif) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultMpeg4Gif) OptContact ¶
func (impl *InlineQueryResultMpeg4Gif) OptContact() *InlineQueryResultContact
func (*InlineQueryResultMpeg4Gif) OptDocument ¶
func (impl *InlineQueryResultMpeg4Gif) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultMpeg4Gif) OptGame ¶
func (impl *InlineQueryResultMpeg4Gif) OptGame() *InlineQueryResultGame
func (*InlineQueryResultMpeg4Gif) OptGif ¶
func (impl *InlineQueryResultMpeg4Gif) OptGif() *InlineQueryResultGif
func (*InlineQueryResultMpeg4Gif) OptLocation ¶
func (impl *InlineQueryResultMpeg4Gif) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultMpeg4Gif) OptMpeg4Gif ¶
func (impl *InlineQueryResultMpeg4Gif) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultMpeg4Gif) OptPhoto ¶
func (impl *InlineQueryResultMpeg4Gif) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultMpeg4Gif) OptVenue ¶
func (impl *InlineQueryResultMpeg4Gif) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultMpeg4Gif) OptVideo ¶
func (impl *InlineQueryResultMpeg4Gif) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultMpeg4Gif) OptVoice ¶
func (impl *InlineQueryResultMpeg4Gif) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultMpeg4Gif) UnmarshalJSON ¶
func (impl *InlineQueryResultMpeg4Gif) UnmarshalJSON(data []byte) error
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct {
// Type of the result, must be photo
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
PhotoUrl string `json:"photo_url"`
// URL of the thumbnail for the photo
ThumbnailUrl string `json:"thumbnail_url"`
// Optional. Width of the photo
PhotoWidth int64 `json:"photo_width,omitempty"`
// Optional. Height of the photo
PhotoHeight int64 `json:"photo_height,omitempty"`
// Optional. Title for the result
Title string `json:"title,omitempty"`
// Optional. Short description of the result
Description string `json:"description,omitempty"`
// Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the photo
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultPhoto Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
func (*InlineQueryResultPhoto) OptArticle ¶
func (impl *InlineQueryResultPhoto) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultPhoto) OptAudio ¶
func (impl *InlineQueryResultPhoto) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultPhoto) OptCachedAudio ¶
func (impl *InlineQueryResultPhoto) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultPhoto) OptCachedDocument ¶
func (impl *InlineQueryResultPhoto) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultPhoto) OptCachedGif ¶
func (impl *InlineQueryResultPhoto) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultPhoto) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultPhoto) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultPhoto) OptCachedPhoto ¶
func (impl *InlineQueryResultPhoto) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultPhoto) OptCachedSticker ¶
func (impl *InlineQueryResultPhoto) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultPhoto) OptCachedVideo ¶
func (impl *InlineQueryResultPhoto) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultPhoto) OptCachedVoice ¶
func (impl *InlineQueryResultPhoto) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultPhoto) OptContact ¶
func (impl *InlineQueryResultPhoto) OptContact() *InlineQueryResultContact
func (*InlineQueryResultPhoto) OptDocument ¶
func (impl *InlineQueryResultPhoto) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultPhoto) OptGame ¶
func (impl *InlineQueryResultPhoto) OptGame() *InlineQueryResultGame
func (*InlineQueryResultPhoto) OptGif ¶
func (impl *InlineQueryResultPhoto) OptGif() *InlineQueryResultGif
func (*InlineQueryResultPhoto) OptLocation ¶
func (impl *InlineQueryResultPhoto) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultPhoto) OptMpeg4Gif ¶
func (impl *InlineQueryResultPhoto) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultPhoto) OptPhoto ¶
func (impl *InlineQueryResultPhoto) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultPhoto) OptVenue ¶
func (impl *InlineQueryResultPhoto) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultPhoto) OptVideo ¶
func (impl *InlineQueryResultPhoto) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultPhoto) OptVoice ¶
func (impl *InlineQueryResultPhoto) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultPhoto) UnmarshalJSON ¶
func (impl *InlineQueryResultPhoto) UnmarshalJSON(data []byte) error
type InlineQueryResultVenue ¶
type InlineQueryResultVenue struct {
// Type of the result, must be venue
Type string `json:"type"`
// Unique identifier for this result, 1-64 Bytes
Id string `json:"id"`
// Latitude of the venue location in degrees
Latitude float64 `json:"latitude"`
// Longitude of the venue location in degrees
Longitude float64 `json:"longitude"`
// Title of the venue
Title string `json:"title"`
// Address of the venue
Address string `json:"address"`
// Optional. Foursquare identifier of the venue if known
FoursquareId string `json:"foursquare_id,omitempty"`
// Optional. Foursquare type of the venue, if known.
// (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".)
FoursquareType string `json:"foursquare_type,omitempty"`
// Optional. Google Places identifier of the venue
GooglePlaceId string `json:"google_place_id,omitempty"`
// Optional. Google Places type of the venue. (See supported types.)
GooglePlaceType string `json:"google_place_type,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the venue
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
// Optional. Url of the thumbnail for the result
ThumbnailUrl string `json:"thumbnail_url,omitempty"`
// Optional. Thumbnail width
ThumbnailWidth int64 `json:"thumbnail_width,omitempty"`
// Optional. Thumbnail height
ThumbnailHeight int64 `json:"thumbnail_height,omitempty"`
}
InlineQueryResultVenue Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.
func (*InlineQueryResultVenue) OptArticle ¶
func (impl *InlineQueryResultVenue) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultVenue) OptAudio ¶
func (impl *InlineQueryResultVenue) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultVenue) OptCachedAudio ¶
func (impl *InlineQueryResultVenue) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultVenue) OptCachedDocument ¶
func (impl *InlineQueryResultVenue) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultVenue) OptCachedGif ¶
func (impl *InlineQueryResultVenue) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultVenue) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultVenue) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultVenue) OptCachedPhoto ¶
func (impl *InlineQueryResultVenue) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultVenue) OptCachedSticker ¶
func (impl *InlineQueryResultVenue) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultVenue) OptCachedVideo ¶
func (impl *InlineQueryResultVenue) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultVenue) OptCachedVoice ¶
func (impl *InlineQueryResultVenue) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultVenue) OptContact ¶
func (impl *InlineQueryResultVenue) OptContact() *InlineQueryResultContact
func (*InlineQueryResultVenue) OptDocument ¶
func (impl *InlineQueryResultVenue) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultVenue) OptGame ¶
func (impl *InlineQueryResultVenue) OptGame() *InlineQueryResultGame
func (*InlineQueryResultVenue) OptGif ¶
func (impl *InlineQueryResultVenue) OptGif() *InlineQueryResultGif
func (*InlineQueryResultVenue) OptLocation ¶
func (impl *InlineQueryResultVenue) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultVenue) OptMpeg4Gif ¶
func (impl *InlineQueryResultVenue) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultVenue) OptPhoto ¶
func (impl *InlineQueryResultVenue) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultVenue) OptVenue ¶
func (impl *InlineQueryResultVenue) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultVenue) OptVideo ¶
func (impl *InlineQueryResultVenue) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultVenue) OptVoice ¶
func (impl *InlineQueryResultVenue) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultVenue) UnmarshalJSON ¶
func (impl *InlineQueryResultVenue) UnmarshalJSON(data []byte) error
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct {
// Type of the result, must be video
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid URL for the embedded video player or video file
VideoUrl string `json:"video_url"`
// MIME type of the content of the video URL, "text/html" or "video/mp4"
MimeType string `json:"mime_type"`
// URL of the thumbnail (JPEG only) for the video
ThumbnailUrl string `json:"thumbnail_url"`
// Title for the result
Title string `json:"title"`
// Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the video caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Video width
VideoWidth int64 `json:"video_width,omitempty"`
// Optional. Video height
VideoHeight int64 `json:"video_height,omitempty"`
// Optional. Video duration in seconds
VideoDuration int64 `json:"video_duration,omitempty"`
// Optional. Short description of the result
Description string `json:"description,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the video.
// This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultVideo Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
func (*InlineQueryResultVideo) OptArticle ¶
func (impl *InlineQueryResultVideo) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultVideo) OptAudio ¶
func (impl *InlineQueryResultVideo) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultVideo) OptCachedAudio ¶
func (impl *InlineQueryResultVideo) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultVideo) OptCachedDocument ¶
func (impl *InlineQueryResultVideo) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultVideo) OptCachedGif ¶
func (impl *InlineQueryResultVideo) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultVideo) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultVideo) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultVideo) OptCachedPhoto ¶
func (impl *InlineQueryResultVideo) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultVideo) OptCachedSticker ¶
func (impl *InlineQueryResultVideo) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultVideo) OptCachedVideo ¶
func (impl *InlineQueryResultVideo) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultVideo) OptCachedVoice ¶
func (impl *InlineQueryResultVideo) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultVideo) OptContact ¶
func (impl *InlineQueryResultVideo) OptContact() *InlineQueryResultContact
func (*InlineQueryResultVideo) OptDocument ¶
func (impl *InlineQueryResultVideo) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultVideo) OptGame ¶
func (impl *InlineQueryResultVideo) OptGame() *InlineQueryResultGame
func (*InlineQueryResultVideo) OptGif ¶
func (impl *InlineQueryResultVideo) OptGif() *InlineQueryResultGif
func (*InlineQueryResultVideo) OptLocation ¶
func (impl *InlineQueryResultVideo) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultVideo) OptMpeg4Gif ¶
func (impl *InlineQueryResultVideo) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultVideo) OptPhoto ¶
func (impl *InlineQueryResultVideo) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultVideo) OptVenue ¶
func (impl *InlineQueryResultVideo) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultVideo) OptVideo ¶
func (impl *InlineQueryResultVideo) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultVideo) OptVoice ¶
func (impl *InlineQueryResultVideo) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultVideo) UnmarshalJSON ¶
func (impl *InlineQueryResultVideo) UnmarshalJSON(data []byte) error
type InlineQueryResultVoice ¶
type InlineQueryResultVoice struct {
// Type of the result, must be voice
Type string `json:"type"`
// Unique identifier for this result, 1-64 bytes
Id string `json:"id"`
// A valid URL for the voice recording
VoiceUrl string `json:"voice_url"`
// Recording title
Title string `json:"title"`
// Optional. Caption, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Recording duration in seconds
VoiceDuration int64 `json:"voice_duration,omitempty"`
// Optional. Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Optional. Content of the message to be sent instead of the voice recording
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultVoice Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.
func (*InlineQueryResultVoice) OptArticle ¶
func (impl *InlineQueryResultVoice) OptArticle() *InlineQueryResultArticle
func (*InlineQueryResultVoice) OptAudio ¶
func (impl *InlineQueryResultVoice) OptAudio() *InlineQueryResultAudio
func (*InlineQueryResultVoice) OptCachedAudio ¶
func (impl *InlineQueryResultVoice) OptCachedAudio() *InlineQueryResultCachedAudio
func (*InlineQueryResultVoice) OptCachedDocument ¶
func (impl *InlineQueryResultVoice) OptCachedDocument() *InlineQueryResultCachedDocument
func (*InlineQueryResultVoice) OptCachedGif ¶
func (impl *InlineQueryResultVoice) OptCachedGif() *InlineQueryResultCachedGif
func (*InlineQueryResultVoice) OptCachedMpeg4Gif ¶
func (impl *InlineQueryResultVoice) OptCachedMpeg4Gif() *InlineQueryResultCachedMpeg4Gif
func (*InlineQueryResultVoice) OptCachedPhoto ¶
func (impl *InlineQueryResultVoice) OptCachedPhoto() *InlineQueryResultCachedPhoto
func (*InlineQueryResultVoice) OptCachedSticker ¶
func (impl *InlineQueryResultVoice) OptCachedSticker() *InlineQueryResultCachedSticker
func (*InlineQueryResultVoice) OptCachedVideo ¶
func (impl *InlineQueryResultVoice) OptCachedVideo() *InlineQueryResultCachedVideo
func (*InlineQueryResultVoice) OptCachedVoice ¶
func (impl *InlineQueryResultVoice) OptCachedVoice() *InlineQueryResultCachedVoice
func (*InlineQueryResultVoice) OptContact ¶
func (impl *InlineQueryResultVoice) OptContact() *InlineQueryResultContact
func (*InlineQueryResultVoice) OptDocument ¶
func (impl *InlineQueryResultVoice) OptDocument() *InlineQueryResultDocument
func (*InlineQueryResultVoice) OptGame ¶
func (impl *InlineQueryResultVoice) OptGame() *InlineQueryResultGame
func (*InlineQueryResultVoice) OptGif ¶
func (impl *InlineQueryResultVoice) OptGif() *InlineQueryResultGif
func (*InlineQueryResultVoice) OptLocation ¶
func (impl *InlineQueryResultVoice) OptLocation() *InlineQueryResultLocation
func (*InlineQueryResultVoice) OptMpeg4Gif ¶
func (impl *InlineQueryResultVoice) OptMpeg4Gif() *InlineQueryResultMpeg4Gif
func (*InlineQueryResultVoice) OptPhoto ¶
func (impl *InlineQueryResultVoice) OptPhoto() *InlineQueryResultPhoto
func (*InlineQueryResultVoice) OptVenue ¶
func (impl *InlineQueryResultVoice) OptVenue() *InlineQueryResultVenue
func (*InlineQueryResultVoice) OptVideo ¶
func (impl *InlineQueryResultVoice) OptVideo() *InlineQueryResultVideo
func (*InlineQueryResultVoice) OptVoice ¶
func (impl *InlineQueryResultVoice) OptVoice() *InlineQueryResultVoice
func (*InlineQueryResultVoice) UnmarshalJSON ¶
func (impl *InlineQueryResultVoice) UnmarshalJSON(data []byte) error
type InlineQueryResultsButton ¶
type InlineQueryResultsButton struct {
// Label text on the button
Text string `json:"text"`
// Optional. Description of the Web App that will be launched when the user presses the button.
// The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App.
WebApp *WebAppInfo `json:"web_app,omitempty"`
// Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button.
// 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
// Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly.
// To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any.
// The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link.
// Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.
StartParameter string `json:"start_parameter,omitempty"`
}
InlineQueryResultsButton This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.
type InputContactMessageContent ¶
type InputContactMessageContent struct {
// Contact's phone number
PhoneNumber string `json:"phone_number"`
// Contact's first name
FirstName string `json:"first_name"`
// Optional. Contact's last name
LastName string `json:"last_name,omitempty"`
// Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
Vcard string `json:"vcard,omitempty"`
}
InputContactMessageContent Represents the content of a contact message to be sent as the result of an inline query.
func (*InputContactMessageContent) OptInputContactMessageContent ¶
func (impl *InputContactMessageContent) OptInputContactMessageContent() *InputContactMessageContent
func (*InputContactMessageContent) OptInputInvoiceMessageContent ¶
func (impl *InputContactMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
func (*InputContactMessageContent) OptInputLocationMessageContent ¶
func (impl *InputContactMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
func (*InputContactMessageContent) OptInputTextMessageContent ¶
func (impl *InputContactMessageContent) OptInputTextMessageContent() *InputTextMessageContent
func (*InputContactMessageContent) OptInputVenueMessageContent ¶
func (impl *InputContactMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
type InputFile ¶
type InputFile interface {
WriteMultipart(multipart *multipart.Writer, field string) error
WriteMultipartAsAttachment(multipart *multipart.Writer) (value string, err error)
}
InputFile is either: - LocalFile for local files. - CloudFile for files in the cloud (i.e. by an id/url).
type InputInvoiceMessageContent ¶
type InputInvoiceMessageContent struct {
// Product name, 1-32 characters
Title string `json:"title"`
// Product description, 1-255 characters
Description string `json:"description"`
// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
Payload string `json:"payload"`
// Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
ProviderToken string `json:"provider_token,omitempty"`
// Three-letter ISO 4217 currency code, see more on currencies. Pass "XTR" for payments in Telegram Stars.
Currency string `json:"currency"`
// Price breakdown, a JSON-serialized list of components (e.g.
// product price, tax, discount, delivery cost, delivery tax, bonus, etc.).
// Must contain exactly one item for payments in Telegram Stars.
Prices []*LabeledPrice `json:"prices"`
// Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double).
// For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. Defaults to 0.
// See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
// Not supported for payments in Telegram Stars.
MaxTipAmount int64 `json:"max_tip_amount,omitempty"`
// Optional. At most 4 suggested tip amounts can be specified.
// A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double).
// The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
SuggestedTipAmounts []int64 `json:"suggested_tip_amounts,omitempty"`
// Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider.
// A detailed description of the required fields should be provided by the payment provider.
ProviderData string `json:"provider_data,omitempty"`
// Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
PhotoUrl string `json:"photo_url,omitempty"`
// Optional. Photo size in bytes
PhotoSize int64 `json:"photo_size,omitempty"`
// Optional. Photo width
PhotoWidth int64 `json:"photo_width,omitempty"`
// Optional. Photo height
PhotoHeight int64 `json:"photo_height,omitempty"`
// Optional. Pass True if you require the user's full name to complete the order.
// Ignored for payments in Telegram Stars.
NeedName bool `json:"need_name,omitempty"`
// Optional. Pass True if you require the user's phone number to complete the order.
// Ignored for payments in Telegram Stars.
NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
// Optional. Pass True if you require the user's email address to complete the order.
// Ignored for payments in Telegram Stars.
NeedEmail bool `json:"need_email,omitempty"`
// Optional. Pass True if you require the user's shipping address to complete the order.
// Ignored for payments in Telegram Stars.
NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
// Optional. Pass True if the user's phone number should be sent to the provider.
// Ignored for payments in Telegram Stars.
SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"`
// Optional. Pass True if the user's email address should be sent to the provider.
// Ignored for payments in Telegram Stars.
SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
// Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.
IsFlexible bool `json:"is_flexible,omitempty"`
}
InputInvoiceMessageContent Represents the content of an invoice message to be sent as the result of an inline query.
func (*InputInvoiceMessageContent) OptInputContactMessageContent ¶
func (impl *InputInvoiceMessageContent) OptInputContactMessageContent() *InputContactMessageContent
func (*InputInvoiceMessageContent) OptInputInvoiceMessageContent ¶
func (impl *InputInvoiceMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
func (*InputInvoiceMessageContent) OptInputLocationMessageContent ¶
func (impl *InputInvoiceMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
func (*InputInvoiceMessageContent) OptInputTextMessageContent ¶
func (impl *InputInvoiceMessageContent) OptInputTextMessageContent() *InputTextMessageContent
func (*InputInvoiceMessageContent) OptInputVenueMessageContent ¶
func (impl *InputInvoiceMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
type InputLocationMessageContent ¶
type InputLocationMessageContent struct {
// Latitude of the location in degrees
Latitude float64 `json:"latitude"`
// Longitude of the location in degrees
Longitude float64 `json:"longitude"`
// Optional. The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
// Optional.
// Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
LivePeriod int64 `json:"live_period,omitempty"`
// Optional. For live locations, a direction in which the user is moving, in degrees.
// Must be between 1 and 360 if specified.
Heading int64 `json:"heading,omitempty"`
// Optional. Must be between 1 and 100000 if specified.
// For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters.
ProximityAlertRadius int64 `json:"proximity_alert_radius,omitempty"`
}
InputLocationMessageContent Represents the content of a location message to be sent as the result of an inline query.
func (*InputLocationMessageContent) OptInputContactMessageContent ¶
func (impl *InputLocationMessageContent) OptInputContactMessageContent() *InputContactMessageContent
func (*InputLocationMessageContent) OptInputInvoiceMessageContent ¶
func (impl *InputLocationMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
func (*InputLocationMessageContent) OptInputLocationMessageContent ¶
func (impl *InputLocationMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
func (*InputLocationMessageContent) OptInputTextMessageContent ¶
func (impl *InputLocationMessageContent) OptInputTextMessageContent() *InputTextMessageContent
func (*InputLocationMessageContent) OptInputVenueMessageContent ¶
func (impl *InputLocationMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
type InputMedia ¶
type InputMedia interface {
OptAnimation() *Animation
OptDocument() *Document
OptAudio() *Audio
OptPhoto() *Photo
OptVideo() *Video
}
InputMedia This object represents the content of a media message to be sent. It should be one of - InputMediaAnimation - InputMediaDocument - InputMediaAudio - InputMediaPhoto - InputMediaVideo
type InputMessageContent ¶
type InputMessageContent interface {
OptInputTextMessageContent() *InputTextMessageContent
OptInputLocationMessageContent() *InputLocationMessageContent
OptInputVenueMessageContent() *InputVenueMessageContent
OptInputContactMessageContent() *InputContactMessageContent
OptInputInvoiceMessageContent() *InputInvoiceMessageContent
}
InputMessageContent This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types: - InputTextMessageContent - InputLocationMessageContent - InputVenueMessageContent - InputContactMessageContent - InputInvoiceMessageContent
type InputPaidMedia ¶
type InputPaidMedia interface {
OptPhoto() *InputPaidMediaPhoto
OptVideo() *InputPaidMediaVideo
}
InputPaidMedia This object describes the paid media to be sent. Currently, it can be one of - InputPaidMediaPhoto - InputPaidMediaVideo
type InputPaidMediaPhoto ¶
type InputPaidMediaPhoto struct {
// Type of the media, must be photo
Type string `json:"type"`
// File to send. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
Media string `json:"media"`
}
InputPaidMediaPhoto The paid media to send is a photo.
func (*InputPaidMediaPhoto) OptPhoto ¶
func (impl *InputPaidMediaPhoto) OptPhoto() *InputPaidMediaPhoto
func (*InputPaidMediaPhoto) OptVideo ¶
func (impl *InputPaidMediaPhoto) OptVideo() *InputPaidMediaVideo
type InputPaidMediaVideo ¶
type InputPaidMediaVideo struct {
// Type of the media, must be video
Type string `json:"type"`
// File to send. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
Media string `json:"media"`
// Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
// The thumbnail should be in JPEG format and less than 200 kB in size.
// A thumbnail's width and height should not exceed 320.
// Ignored if the file is not uploaded using multipart/form-data.
// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
// More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// >> either: String
Thumbnail InputFile `json:"thumbnail,omitempty"`
// Optional. Video width
Width int64 `json:"width,omitempty"`
// Optional. Video height
Height int64 `json:"height,omitempty"`
// Optional. Video duration in seconds
Duration int64 `json:"duration,omitempty"`
// Optional. Pass True if the uploaded video is suitable for streaming
SupportsStreaming bool `json:"supports_streaming,omitempty"`
}
InputPaidMediaVideo The paid media to send is a video.
func (*InputPaidMediaVideo) OptPhoto ¶
func (impl *InputPaidMediaVideo) OptPhoto() *InputPaidMediaPhoto
func (*InputPaidMediaVideo) OptVideo ¶
func (impl *InputPaidMediaVideo) OptVideo() *InputPaidMediaVideo
type InputPollOption ¶
type InputPollOption struct {
// Option text, 1-100 characters
Text string `json:"text"`
// Optional. Mode for parsing entities in the text. See formatting options for more details.
// Currently, only custom emoji entities are allowed
TextParseMode string `json:"text_parse_mode,omitempty"`
// Optional. A JSON-serialized list of special entities that appear in the poll option text.
// It can be specified instead of text_parse_mode
TextEntities []*MessageEntity `json:"text_entities,omitempty"`
}
InputPollOption This object contains information about one answer option in a poll to be sent.
type InputSticker ¶
type InputSticker struct {
// The added sticker. Animated and video stickers can't be uploaded via HTTP URL.
// Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
// More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// >> either: String
Sticker InputFile `json:"sticker"`
// Format of the added sticker, must be one of "static" for a .WEBP or .PNG image, "animated" for a .TGS animation, "video" for a WEBM video
Format string `json:"format"`
// List of 1-20 emoji associated with the sticker
EmojiList []string `json:"emoji_list"`
// Optional. Position where the mask should be placed on faces. For "mask" stickers only.
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
// Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters.
// For "regular" and "custom_emoji" stickers only.
Keywords []string `json:"keywords,omitempty"`
}
InputSticker This object describes a sticker to be added to a sticker set.
type InputTextMessageContent ¶
type InputTextMessageContent struct {
// Text of the message to be sent, 1-4096 characters
MessageText string `json:"message_text"`
// Optional. Mode for parsing entities in the message text. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in message text, which can be specified instead of parse_mode
Entities []*MessageEntity `json:"entities,omitempty"`
// Optional. Link preview generation options for the message
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
}
InputTextMessageContent Represents the content of a text message to be sent as the result of an inline query.
func (*InputTextMessageContent) OptInputContactMessageContent ¶
func (impl *InputTextMessageContent) OptInputContactMessageContent() *InputContactMessageContent
func (*InputTextMessageContent) OptInputInvoiceMessageContent ¶
func (impl *InputTextMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
func (*InputTextMessageContent) OptInputLocationMessageContent ¶
func (impl *InputTextMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
func (*InputTextMessageContent) OptInputTextMessageContent ¶
func (impl *InputTextMessageContent) OptInputTextMessageContent() *InputTextMessageContent
func (*InputTextMessageContent) OptInputVenueMessageContent ¶
func (impl *InputTextMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
type InputVenueMessageContent ¶
type InputVenueMessageContent struct {
// Latitude of the venue in degrees
Latitude float64 `json:"latitude"`
// Longitude of the venue in degrees
Longitude float64 `json:"longitude"`
// Name of the venue
Title string `json:"title"`
// Address of the venue
Address string `json:"address"`
// Optional. Foursquare identifier of the venue, if known
FoursquareId string `json:"foursquare_id,omitempty"`
// Optional. Foursquare type of the venue, if known.
// (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".)
FoursquareType string `json:"foursquare_type,omitempty"`
// Optional. Google Places identifier of the venue
GooglePlaceId string `json:"google_place_id,omitempty"`
// Optional. Google Places type of the venue. (See supported types.)
GooglePlaceType string `json:"google_place_type,omitempty"`
}
InputVenueMessageContent Represents the content of a venue message to be sent as the result of an inline query.
func (*InputVenueMessageContent) OptInputContactMessageContent ¶
func (impl *InputVenueMessageContent) OptInputContactMessageContent() *InputContactMessageContent
func (*InputVenueMessageContent) OptInputInvoiceMessageContent ¶
func (impl *InputVenueMessageContent) OptInputInvoiceMessageContent() *InputInvoiceMessageContent
func (*InputVenueMessageContent) OptInputLocationMessageContent ¶
func (impl *InputVenueMessageContent) OptInputLocationMessageContent() *InputLocationMessageContent
func (*InputVenueMessageContent) OptInputTextMessageContent ¶
func (impl *InputVenueMessageContent) OptInputTextMessageContent() *InputTextMessageContent
func (*InputVenueMessageContent) OptInputVenueMessageContent ¶
func (impl *InputVenueMessageContent) OptInputVenueMessageContent() *InputVenueMessageContent
type Invoice ¶
type Invoice struct {
// Product name
Title string `json:"title"`
// Product description
Description string `json:"description"`
// Unique bot deep-linking parameter that can be used to generate this invoice
StartParameter string `json:"start_parameter"`
// Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars
Currency string `json:"currency"`
// Total price in the smallest units of the currency (integer, not float/double).
// For example, for a price of US$ 1.45 pass amount = 145.
// See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
TotalAmount int64 `json:"total_amount"`
}
Invoice This object contains basic information about an invoice.
type Keyboard ¶
type Keyboard struct {
Layout [][]ButtonI
// contains filtered or unexported fields
}
func (*Keyboard) Build ¶
func (k *Keyboard) Build() *InlineKeyboardMarkup
func (*Keyboard) FilterFunc ¶
func (k *Keyboard) FilterFunc() FilterFunc
func (*Keyboard) HandlerFunc ¶
func (k *Keyboard) HandlerFunc() HandlerFunc
type KeyboardButton ¶
type KeyboardButton struct {
// Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed
Text string `json:"text"`
// Optional. If specified, pressing the button will open a list of suitable users. Available in private chats only.
// Identifiers of selected users will be sent to the bot in a "users_shared" service message.
RequestUsers *KeyboardButtonRequestUsers `json:"request_users,omitempty"`
// Optional. If specified, pressing the button will open a list of suitable chats. Available in private chats only.
// Tapping on a chat will send its identifier to the bot in a "chat_shared" service message.
RequestChat *KeyboardButtonRequestChat `json:"request_chat,omitempty"`
// Optional. If True, the user's phone number will be sent as a contact when the button is pressed.
// Available in private chats only.
RequestContact bool `json:"request_contact,omitempty"`
// Optional. If True, the user's current location will be sent when the button is pressed.
// Available in private chats only.
RequestLocation bool `json:"request_location,omitempty"`
// Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed.
// Available in private chats only.
RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"`
// Optional. If specified, the described Web App will be launched when the button is pressed.
// The Web App will be able to send a "web_app_data" service message. Available in private chats only.
WebApp *WebAppInfo `json:"web_app,omitempty"`
}
KeyboardButton This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text. Note: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.
type KeyboardButtonPollType ¶
type KeyboardButtonPollType struct {
// Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode.
// If regular is passed, only regular polls will be allowed.
// Otherwise, the user will be allowed to create a poll of any type.
Type string `json:"type,omitempty"`
}
KeyboardButtonPollType This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
type KeyboardButtonRequestChat ¶
type KeyboardButtonRequestChat struct {
// Signed 32-bit identifier of the request, which will be received back in the ChatShared object.
// Must be unique within the message
RequestId int64 `json:"request_id"`
// Pass True to request a channel chat, pass False to request a group or a supergroup chat.
ChatIsChannel bool `json:"chat_is_channel"`
// Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat.
// If not specified, no additional restrictions are applied.
ChatIsForum bool `json:"chat_is_forum,omitempty"`
// Optional. If not specified, no additional restrictions are applied.
// Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username.
ChatHasUsername bool `json:"chat_has_username,omitempty"`
// Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
ChatIsCreated bool `json:"chat_is_created,omitempty"`
// Optional. A JSON-serialized object listing the required administrator rights of the user in the chat.
// The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"`
// Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat.
// The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"`
// Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
BotIsMember bool `json:"bot_is_member,omitempty"`
// Optional. Pass True to request the chat's title
RequestTitle bool `json:"request_title,omitempty"`
// Optional. Pass True to request the chat's username
RequestUsername bool `json:"request_username,omitempty"`
// Optional. Pass True to request the chat's photo
RequestPhoto bool `json:"request_photo,omitempty"`
}
KeyboardButtonRequestChat This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats: https://core.telegram.org/bots/features#chat-and-user-selection.
type KeyboardButtonRequestUsers ¶
type KeyboardButtonRequestUsers struct {
// Signed 32-bit identifier of the request that will be received back in the UsersShared object.
// Must be unique within the message
RequestId int64 `json:"request_id"`
// Optional. Pass True to request bots, pass False to request regular users.
// If not specified, no additional restrictions are applied.
UserIsBot bool `json:"user_is_bot,omitempty"`
// Optional. Pass True to request premium users, pass False to request non-premium users.
// If not specified, no additional restrictions are applied.
UserIsPremium bool `json:"user_is_premium,omitempty"`
// Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
MaxQuantity int64 `json:"max_quantity,omitempty"`
// Optional. Pass True to request the users' first and last names
RequestName bool `json:"request_name,omitempty"`
// Optional. Pass True to request the users' usernames
RequestUsername bool `json:"request_username,omitempty"`
// Optional. Pass True to request the users' photos
RequestPhoto bool `json:"request_photo,omitempty"`
}
KeyboardButtonRequestUsers This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users: https://core.telegram.org/bots/features#chat-and-user-selection
type LabeledPrice ¶
type LabeledPrice struct {
// Portion label
Label string `json:"label"`
// Price of the product in the smallest units of the currency (integer, not float/double).
// For example, for a price of US$ 1.45 pass amount = 145.
// See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
Amount int64 `json:"amount"`
}
LabeledPrice This object represents a portion of the price for goods or services.
type LinkPreviewOptions ¶
type LinkPreviewOptions struct {
// Optional. True, if the link preview is disabled
IsDisabled bool `json:"is_disabled,omitempty"`
// Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used
Url string `json:"url,omitempty"`
// Optional.
// True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
PreferSmallMedia bool `json:"prefer_small_media,omitempty"`
// Optional.
// True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
PreferLargeMedia bool `json:"prefer_large_media,omitempty"`
// Optional.
// True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text
ShowAboveText bool `json:"show_above_text,omitempty"`
}
LinkPreviewOptions Describes the options used for link preview generation.
type LocalFile ¶
LocalFile This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser. Use tg.FromDisk(filename) for uploading files.
func (*LocalFile) WriteMultipart ¶
type Location ¶
type Location struct {
// Latitude as defined by the sender
Latitude float64 `json:"latitude"`
// Longitude as defined by the sender
Longitude float64 `json:"longitude"`
// Optional. The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
// Optional. Time relative to the message sending date, during which the location can be updated; in seconds.
// For active live locations only.
LivePeriod int64 `json:"live_period,omitempty"`
// Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
Heading int64 `json:"heading,omitempty"`
// Optional. The maximum distance for proximity alerts about approaching another chat member, in meters.
// For sent live locations only.
ProximityAlertRadius int64 `json:"proximity_alert_radius,omitempty"`
}
Location This object represents a point on the map.
type LoginUrl ¶
type LoginUrl struct {
// An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed.
// If the user refuses to provide authorization data, the original URL without information about the user will be opened.
// The data added is the same as described in Receiving authorization data.
// NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
Url string `json:"url"`
// Optional. New text of the button in forwarded messages.
ForwardText string `json:"forward_text,omitempty"`
// Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details.
// If not specified, the current bot's username will be assumed. See Linking your domain to the bot for more details.
// The url's domain must be the same as the domain linked with the bot.
BotUsername string `json:"bot_username,omitempty"`
// Optional. Pass True to request the permission for your bot to send messages to the user.
RequestWriteAccess bool `json:"request_write_access,omitempty"`
}
LoginUrl This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in: Telegram apps support these buttons as of version 5.7.
type MaskPosition ¶
type MaskPosition struct {
// The part of the face relative to which the mask should be placed. One of "forehead", "eyes", "mouth", or "chin".
Point string `json:"point"`
// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right.
// For example, choosing -1.0 will place mask just to the left of the default mask position.
XShift float64 `json:"x_shift"`
// Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom.
// For example, 1.0 will place the mask just below the default mask position.
YShift float64 `json:"y_shift"`
// Mask scaling coefficient. For example, 2.0 means double size.
Scale float64 `json:"scale"`
}
MaskPosition This object describes the position on faces where a mask should be placed by default.
type MenuButton ¶
type MenuButton interface {
OptCommands() *MenuButtonCommands
OptWebApp() *MenuButtonWebApp
OptDefault() *MenuButtonDefault
}
MenuButton This object describes the bot's menu button in a private chat. It should be one of - MenuButtonCommands - MenuButtonWebApp - MenuButtonDefault If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.
func GetChatMenuButton ¶
func GetChatMenuButton(ctx context.Context, opts ...*OptGetChatMenuButton) (MenuButton, error)
GetChatMenuButton Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
type MenuButtonCommands ¶
type MenuButtonCommands struct {
// Type of the button, must be commands
Type string `json:"type" default:"commands"`
}
MenuButtonCommands Represents a menu button, which opens the bot's list of commands.
func (*MenuButtonCommands) OptCommands ¶
func (impl *MenuButtonCommands) OptCommands() *MenuButtonCommands
func (*MenuButtonCommands) OptDefault ¶
func (impl *MenuButtonCommands) OptDefault() *MenuButtonDefault
func (*MenuButtonCommands) OptWebApp ¶
func (impl *MenuButtonCommands) OptWebApp() *MenuButtonWebApp
type MenuButtonDefault ¶
type MenuButtonDefault struct {
// Type of the button, must be default
Type string `json:"type" default:"default"`
}
MenuButtonDefault Describes that no specific value for the menu button was set.
func (*MenuButtonDefault) OptCommands ¶
func (impl *MenuButtonDefault) OptCommands() *MenuButtonCommands
func (*MenuButtonDefault) OptDefault ¶
func (impl *MenuButtonDefault) OptDefault() *MenuButtonDefault
func (*MenuButtonDefault) OptWebApp ¶
func (impl *MenuButtonDefault) OptWebApp() *MenuButtonWebApp
type MenuButtonWebApp ¶
type MenuButtonWebApp struct {
// Type of the button, must be web_app
Type string `json:"type" default:"web_app"`
// Text on the button
Text string `json:"text"`
// Description of the Web App that will be launched when the user presses the button.
// The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.
// Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.
WebApp *WebAppInfo `json:"web_app"`
}
MenuButtonWebApp Represents a menu button, which launches a Web App.
func (*MenuButtonWebApp) OptCommands ¶
func (impl *MenuButtonWebApp) OptCommands() *MenuButtonCommands
func (*MenuButtonWebApp) OptDefault ¶
func (impl *MenuButtonWebApp) OptDefault() *MenuButtonDefault
func (*MenuButtonWebApp) OptWebApp ¶
func (impl *MenuButtonWebApp) OptWebApp() *MenuButtonWebApp
type Message ¶
type Message struct {
// Unique message identifier inside this chat.
// In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately.
// In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent
MessageId int64 `json:"message_id"`
// Optional. Unique identifier of a message thread to which the message belongs; for supergroups only
MessageThreadId int64 `json:"message_thread_id,omitempty"`
// Optional. Sender of the message; may be empty for messages sent to channels.
// For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats
From *User `json:"from,omitempty"`
// Optional. Sender of the message when sent on behalf of a chat.
// For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group.
// For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.
SenderChat *Chat `json:"sender_chat,omitempty"`
// Optional. If the sender of the message boosted the chat, the number of boosts added by the user
SenderBoostCount int64 `json:"sender_boost_count,omitempty"`
// Optional. The bot that actually sent the message on behalf of the business account.
// Available only for outgoing messages sent on behalf of the connected business account.
SenderBusinessBot *User `json:"sender_business_bot,omitempty"`
// Date the message was sent in Unix time. It is always a positive number, representing a valid date.
Date int64 `json:"date"`
// Optional. Unique identifier of the business connection from which the message was received.
// If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.
BusinessConnectionId string `json:"business_connection_id,omitempty"`
// Chat the message belongs to
Chat *Chat `json:"chat"`
// Optional. Information about the original message for forwarded messages
ForwardOrigin MessageOrigin `json:"forward_origin,omitempty"`
// Optional. True, if the message is sent to a forum topic
IsTopicMessage bool `json:"is_topic_message,omitempty"`
// Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group
IsAutomaticForward bool `json:"is_automatic_forward,omitempty"`
// Optional. For replies in the same chat and message thread, the original message.
// Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
ReplyToMessage *Message `json:"reply_to_message,omitempty"`
// Optional. Information about the message that is being replied to, which may come from another chat or forum topic
ExternalReply *ExternalReplyInfo `json:"external_reply,omitempty"`
// Optional. For replies that quote part of the original message, the quoted part of the message
Quote *TextQuote `json:"quote,omitempty"`
// Optional. For replies to a story, the original story
ReplyToStory *Story `json:"reply_to_story,omitempty"`
// Optional. Bot through which the message was sent
ViaBot *User `json:"via_bot,omitempty"`
// Optional. Date the message was last edited in Unix time
EditDate int64 `json:"edit_date,omitempty"`
// Optional. True, if the message can't be forwarded
HasProtectedContent bool `json:"has_protected_content,omitempty"`
// Optional.
// True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message
IsFromOffline bool `json:"is_from_offline,omitempty"`
// Optional. The unique identifier of a media message group this message belongs to
MediaGroupId string `json:"media_group_id,omitempty"`
// Optional.
// Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
AuthorSignature string `json:"author_signature,omitempty"`
// Optional. For text messages, the actual UTF-8 text of the message
Text string `json:"text,omitempty"`
// Optional. For text messages, special entities like usernames, URLs, bot commands, etc.
// that appear in the text
Entities []*MessageEntity `json:"entities,omitempty"`
// Optional.
// Options used for link preview generation for the message, if it is a text message and link preview options were changed
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
// Optional. Unique identifier of the message effect added to the message
EffectId string `json:"effect_id,omitempty"`
// Optional. Message is an animation, information about the animation.
// For backward compatibility, when this field is set, the document field will also be set
Animation *TelegramAnimation `json:"animation,omitempty"`
// Optional. Message is an audio file, information about the file
Audio *TelegramAudio `json:"audio,omitempty"`
// Optional. Message is a general file, information about the file
Document *TelegramDocument `json:"document,omitempty"`
// Optional. Message contains paid media; information about the paid media
PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"`
// Optional. Message is a photo, available sizes of the photo
Photo TelegramPhoto `json:"photo,omitempty"`
// Optional. Message is a sticker, information about the sticker
Sticker *Sticker `json:"sticker,omitempty"`
// Optional. Message is a forwarded story
Story *Story `json:"story,omitempty"`
// Optional. Message is a video, information about the video
Video *TelegramVideo `json:"video,omitempty"`
// Optional. Message is a video note, information about the video message
VideoNote *VideoNote `json:"video_note,omitempty"`
// Optional. Message is a voice message, information about the file
Voice *Voice `json:"voice,omitempty"`
// Optional. Caption for the animation, audio, document, paid media, photo, video or voice
Caption string `json:"caption,omitempty"`
// Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc.
// that appear in the caption
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. True, if the message media is covered by a spoiler animation
HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"`
// Optional. Message is a shared contact, information about the contact
Contact *Contact `json:"contact,omitempty"`
// Optional. Message is a dice with random value
Dice *Dice `json:"dice,omitempty"`
// Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games
Game *Game `json:"game,omitempty"`
// Optional. Message is a native poll, information about the poll
Poll *Poll `json:"poll,omitempty"`
// Optional. Message is a venue, information about the venue.
// For backward compatibility, when this field is set, the location field will also be set
Venue *Venue `json:"venue,omitempty"`
// Optional. Message is a shared location, information about the location
Location *Location `json:"location,omitempty"`
// Optional.
// New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
NewChatMembers []*User `json:"new_chat_members,omitempty"`
// Optional. A member was removed from the group, information about them (this member may be the bot itself)
LeftChatMember *User `json:"left_chat_member,omitempty"`
// Optional. A chat title was changed to this value
NewChatTitle string `json:"new_chat_title,omitempty"`
// Optional. A chat photo was change to this value
NewChatPhoto TelegramPhoto `json:"new_chat_photo,omitempty"`
// Optional. Service message: the chat photo was deleted
DeleteChatPhoto bool `json:"delete_chat_photo,omitempty"`
// Optional. Service message: the group has been created
GroupChatCreated bool `json:"group_chat_created,omitempty"`
// Optional. Service message: the supergroup has been created.
// This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created.
// It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
SupergroupChatCreated bool `json:"supergroup_chat_created,omitempty"`
// Optional. Service message: the channel has been created.
// This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created.
// It can only be found in reply_to_message if someone replies to a very first message in a channel.
ChannelChatCreated bool `json:"channel_chat_created,omitempty"`
// Optional. Service message: auto-delete timer settings changed in the chat
MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"`
// Optional. The group has been migrated to a supergroup with the specified identifier.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
MigrateToChatId int64 `json:"migrate_to_chat_id,omitempty"`
// Optional. The supergroup has been migrated from a group with the specified identifier.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
MigrateFromChatId int64 `json:"migrate_from_chat_id,omitempty"`
// Optional. Specified message was pinned.
// Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
PinnedMessage *Message `json:"pinned_message,omitempty"`
// Optional. Message is an invoice for a payment, information about the invoice.
// More about payments: https://core.telegram.org/bots/api#payments
Invoice *Invoice `json:"invoice,omitempty"`
// Optional. Message is a service message about a successful payment, information about the payment.
// More about payments: https://core.telegram.org/bots/api#payments
SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"`
// Optional. Message is a service message about a refunded payment, information about the payment.
// More about payments: https://core.telegram.org/bots/api#payments
RefundedPayment *RefundedPayment `json:"refunded_payment,omitempty"`
UsersShared *UsersShared `json:"users_shared,omitempty"`
ChatShared *ChatShared `json:"chat_shared,omitempty"`
// Optional. The domain name of the website on which the user has logged in.
// More about Telegram Login: https://core.telegram.org/widgets/login
ConnectedWebsite string `json:"connected_website,omitempty"`
// Optional.
// Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess
WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed,omitempty"`
// Optional. Telegram Passport data
PassportData *PassportData `json:"passport_data,omitempty"`
// Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"`
// Optional. Service message: user boosted the chat
BoostAdded *ChatBoostAdded `json:"boost_added,omitempty"`
// Optional. Service message: chat background set
ChatBackgroundSet *ChatBackground `json:"chat_background_set,omitempty"`
// Optional. Service message: forum topic created
ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created,omitempty"`
// Optional. Service message: forum topic edited
ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited,omitempty"`
// Optional. Service message: forum topic closed
ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed,omitempty"`
// Optional. Service message: forum topic reopened
ForumTopicReopened *ForumTopicReopened `json:"forum_topic_reopened,omitempty"`
// Optional. Service message: the 'General' forum topic hidden
GeneralForumTopicHidden *GeneralForumTopicHidden `json:"general_forum_topic_hidden,omitempty"`
GeneralForumTopicUnhidden *GeneralForumTopicUnhidden `json:"general_forum_topic_unhidden,omitempty"`
// Optional. Service message: a scheduled giveaway was created
GiveawayCreated *GiveawayCreated `json:"giveaway_created,omitempty"`
// Optional. The message is a scheduled giveaway message
Giveaway *Giveaway `json:"giveaway,omitempty"`
// Optional. A giveaway with public winners was completed
GiveawayWinners *GiveawayWinners `json:"giveaway_winners,omitempty"`
// Optional. Service message: a giveaway without public winners was completed
GiveawayCompleted *GiveawayCompleted `json:"giveaway_completed,omitempty"`
// Optional. Service message: video chat scheduled
VideoChatScheduled *VideoChatScheduled `json:"video_chat_scheduled,omitempty"`
// Optional. Service message: video chat started
VideoChatStarted *VideoChatStarted `json:"video_chat_started,omitempty"`
// Optional. Service message: video chat ended
VideoChatEnded *VideoChatEnded `json:"video_chat_ended,omitempty"`
// Optional. Service message: new participants invited to a video chat
VideoChatParticipantsInvited *VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"`
// Optional. Service message: data sent by a Web App
WebAppData *WebAppData `json:"web_app_data,omitempty"`
// Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
Message This object represents a message.
func EditMessageCaption ¶
func EditMessageCaption(ctx context.Context, opts ...*OptEditMessageCaption) (*Message, error)
EditMessageCaption Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
func EditMessageLiveLocation ¶
func EditMessageLiveLocation(ctx context.Context, latitude float64, longitude float64, opts ...*OptEditMessageLiveLocation) (*Message, error)
EditMessageLiveLocation Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
func EditMessageMedia ¶
func EditMessageMedia(ctx context.Context, media InputMedia, opts ...*OptEditMessageMedia) (*Message, error)
EditMessageMedia Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
func EditMessageReplyMarkup ¶
func EditMessageReplyMarkup(ctx context.Context, opts ...*OptEditMessageReplyMarkup) (*Message, error)
EditMessageReplyMarkup Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
func EditMessageText ¶
func EditMessageText(ctx context.Context, text string, opts ...*OptEditMessageText) (*Message, error)
EditMessageText Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
func ForwardMessage ¶
func ForwardMessage(ctx context.Context, chatId int64, fromChatId int64, messageId int64, opts ...*OptForwardMessage) (*Message, error)
ForwardMessage Use this method to forward messages of any kind. On success, the sent Message is returned. Service messages and messages with protected content can't be forwarded.
func SendAnimation ¶
func SendAnimation(ctx context.Context, chatId int64, animation InputFile, opts ...*OptSendAnimation) (*Message, error)
SendAnimation Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
func SendAudio ¶
func SendAudio(ctx context.Context, chatId int64, audio InputFile, opts ...*OptSendAudio) (*Message, error)
SendAudio Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the sendVoice method instead.
func SendContact ¶
func SendContact(ctx context.Context, chatId int64, phoneNumber string, firstName string, opts ...*OptSendContact) (*Message, error)
SendContact Use this method to send phone contacts. On success, the sent Message is returned.
func SendDice ¶
SendDice Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
func SendDocument ¶
func SendDocument(ctx context.Context, chatId int64, document InputFile, opts ...*OptSendDocument) (*Message, error)
SendDocument Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
func SendGame ¶
func SendGame(ctx context.Context, chatId int64, gameShortName string, opts ...*OptSendGame) (*Message, error)
SendGame Use this method to send a game. On success, the sent Message is returned.
func SendInvoice ¶
func SendInvoice(ctx context.Context, chatId int64, title string, description string, payload string, currency string, prices []*LabeledPrice, opts ...*OptSendInvoice) (*Message, error)
SendInvoice Use this method to send invoices. On success, the sent Message is returned.
func SendLocation ¶
func SendLocation(ctx context.Context, chatId int64, latitude float64, longitude float64, opts ...*OptSendLocation) (*Message, error)
SendLocation Use this method to send point on the map. On success, the sent Message is returned.
func SendMediaGroup ¶
func SendMediaGroup(ctx context.Context, chatId int64, media Album, opts ...*OptSendMediaGroup) ([]*Message, error)
SendMediaGroup Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
func SendMessage ¶
func SendMessage(ctx context.Context, chatId int64, text string, opts ...*OptSendMessage) (*Message, error)
SendMessage Use this method to send text messages. On success, the sent Message is returned.
func SendPaidMedia ¶
func SendPaidMedia(ctx context.Context, chatId int64, starCount int64, media []InputPaidMedia, opts ...*OptSendPaidMedia) (*Message, error)
SendPaidMedia Use this method to send paid media. On success, the sent Message is returned.
func SendPhoto ¶
func SendPhoto(ctx context.Context, chatId int64, photo InputFile, opts ...*OptSendPhoto) (*Message, error)
SendPhoto Use this method to send photos. On success, the sent Message is returned.
func SendPoll ¶
func SendPoll(ctx context.Context, chatId int64, question string, options []*InputPollOption, opts ...*OptSendPoll) (*Message, error)
SendPoll Use this method to send a native poll. On success, the sent Message is returned.
func SendSticker ¶
func SendSticker(ctx context.Context, chatId int64, sticker InputFile, opts ...*OptSendSticker) (*Message, error)
SendSticker Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.
func SendVenue ¶
func SendVenue(ctx context.Context, chatId int64, latitude float64, longitude float64, title string, address string, opts ...*OptSendVenue) (*Message, error)
SendVenue Use this method to send information about a venue. On success, the sent Message is returned.
func SendVideo ¶
func SendVideo(ctx context.Context, chatId int64, video InputFile, opts ...*OptSendVideo) (*Message, error)
SendVideo Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
func SendVideoNote ¶
func SendVideoNote(ctx context.Context, chatId int64, videoNote InputFile, opts ...*OptSendVideoNote) (*Message, error)
SendVideoNote As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.
func SendVoice ¶
func SendVoice(ctx context.Context, chatId int64, voice InputFile, opts ...*OptSendVoice) (*Message, error)
SendVoice Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
func SetGameScore ¶
func SetGameScore(ctx context.Context, userId int64, score int64, opts ...*OptSetGameScore) (*Message, error)
SetGameScore Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
func StopMessageLiveLocation ¶
func StopMessageLiveLocation(ctx context.Context, opts ...*OptStopMessageLiveLocation) (*Message, error)
StopMessageLiveLocation Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
func (*Message) TextOrCaption ¶
func (*Message) UnmarshalJSON ¶
type MessageAutoDeleteTimerChanged ¶
type MessageAutoDeleteTimerChanged struct {
// New auto-delete time for messages in the chat; in seconds
MessageAutoDeleteTime int64 `json:"message_auto_delete_time"`
}
MessageAutoDeleteTimerChanged This object represents a service message about a change in auto-delete timer settings.
type MessageEntity ¶
type MessageEntity struct {
// Type of the entity.
// Currently, can be "mention" (@username), "hashtag" (#hashtag or #hashtag@chatusername), "cashtag" ($USD or $USD@chatusername), "bot_command" (/start@jobs_bot), "url" (https://telegram.org), "email" ([email protected]), "phone_number" (+1-212-555-0123), "bold" (bold text), "italic" (italic text), "underline" (underlined text), "strikethrough" (strikethrough text), "spoiler" (spoiler message), "blockquote" (block quotation), "expandable_blockquote" (collapsed-by-default block quotation), "code" (monowidth string), "pre" (monowidth block), "text_link" (for clickable text URLs), "text_mention" (for users without usernames), "custom_emoji" (for inline custom emoji stickers)
Type string `json:"type"`
// Offset in UTF-16 code units to the start of the entity
Offset int64 `json:"offset"`
// Length of the entity in UTF-16 code units
Length int64 `json:"length"`
// Optional. For "text_link" only, URL that will be opened after user taps on the text
Url string `json:"url,omitempty"`
// Optional. For "text_mention" only, the mentioned user
User *User `json:"user,omitempty"`
// Optional. For "pre" only, the programming language of the entity text
Language string `json:"language,omitempty"`
// Optional. For "custom_emoji" only, unique identifier of the custom emoji.
// Use getCustomEmojiStickers to get full information about the sticker
CustomEmojiId string `json:"custom_emoji_id,omitempty"`
}
MessageEntity This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
type MessageId ¶
type MessageId struct {
// Unique message identifier.
// In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately.
// In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent
MessageId int64 `json:"message_id"`
}
MessageId This object represents a unique message identifier.
func CopyMessage ¶
func CopyMessage(ctx context.Context, chatId int64, fromChatId int64, messageId int64, opts ...*OptCopyMessage) (*MessageId, error)
CopyMessage Use this method to copy messages of any kind. Returns the MessageId of the sent message on success. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message.
func CopyMessages ¶
func CopyMessages(ctx context.Context, chatId int64, fromChatId int64, messageIds []int64, opts ...*OptCopyMessages) ([]*MessageId, error)
CopyMessages Use this method to copy messages of any kind. Album grouping is kept for copied messages. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. On success, an array of MessageId of the sent messages is returned.
func ForwardMessages ¶
func ForwardMessages(ctx context.Context, chatId int64, fromChatId int64, messageIds []int64, opts ...*OptForwardMessages) ([]*MessageId, error)
ForwardMessages Use this method to forward multiple messages of any kind. Album grouping is kept for forwarded messages. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. On success, an array of MessageId of the sent messages is returned.
type MessageOrigin ¶
type MessageOrigin interface {
OptUser() *MessageOriginUser
OptHiddenUser() *MessageOriginHiddenUser
OptChat() *MessageOriginChat
OptChannel() *MessageOriginChannel
}
MessageOrigin This object describes the origin of a message. It can be one of - MessageOriginUser - MessageOriginHiddenUser - MessageOriginChat - MessageOriginChannel
type MessageOriginChannel ¶
type MessageOriginChannel struct {
// Type of the message origin, always "channel"
Type string `json:"type" default:"channel"`
// Date the message was sent originally in Unix time
Date int64 `json:"date"`
// Channel chat to which the message was originally sent
Chat *Chat `json:"chat"`
// Unique message identifier inside the chat
MessageId int64 `json:"message_id"`
// Optional. Signature of the original post author
AuthorSignature string `json:"author_signature,omitempty"`
}
MessageOriginChannel The message was originally sent to a channel chat.
func (*MessageOriginChannel) OptChannel ¶
func (impl *MessageOriginChannel) OptChannel() *MessageOriginChannel
func (*MessageOriginChannel) OptChat ¶
func (impl *MessageOriginChannel) OptChat() *MessageOriginChat
func (*MessageOriginChannel) OptHiddenUser ¶
func (impl *MessageOriginChannel) OptHiddenUser() *MessageOriginHiddenUser
func (*MessageOriginChannel) OptUser ¶
func (impl *MessageOriginChannel) OptUser() *MessageOriginUser
type MessageOriginChat ¶
type MessageOriginChat struct {
// Type of the message origin, always "chat"
Type string `json:"type" default:"chat"`
// Date the message was sent originally in Unix time
Date int64 `json:"date"`
// Chat that sent the message originally
SenderChat *Chat `json:"sender_chat"`
// Optional. For messages originally sent by an anonymous chat administrator, original message author signature
AuthorSignature string `json:"author_signature,omitempty"`
}
MessageOriginChat The message was originally sent on behalf of a chat to a group chat.
func (*MessageOriginChat) OptChannel ¶
func (impl *MessageOriginChat) OptChannel() *MessageOriginChannel
func (*MessageOriginChat) OptChat ¶
func (impl *MessageOriginChat) OptChat() *MessageOriginChat
func (*MessageOriginChat) OptHiddenUser ¶
func (impl *MessageOriginChat) OptHiddenUser() *MessageOriginHiddenUser
func (*MessageOriginChat) OptUser ¶
func (impl *MessageOriginChat) OptUser() *MessageOriginUser
type MessageOriginHiddenUser ¶
type MessageOriginHiddenUser struct {
// Type of the message origin, always "hidden_user"
Type string `json:"type" default:"hidden_user"`
// Date the message was sent originally in Unix time
Date int64 `json:"date"`
// Name of the user that sent the message originally
SenderUserName string `json:"sender_user_name"`
}
MessageOriginHiddenUser The message was originally sent by an unknown user.
func (*MessageOriginHiddenUser) OptChannel ¶
func (impl *MessageOriginHiddenUser) OptChannel() *MessageOriginChannel
func (*MessageOriginHiddenUser) OptChat ¶
func (impl *MessageOriginHiddenUser) OptChat() *MessageOriginChat
func (*MessageOriginHiddenUser) OptHiddenUser ¶
func (impl *MessageOriginHiddenUser) OptHiddenUser() *MessageOriginHiddenUser
func (*MessageOriginHiddenUser) OptUser ¶
func (impl *MessageOriginHiddenUser) OptUser() *MessageOriginUser
type MessageOriginUser ¶
type MessageOriginUser struct {
// Type of the message origin, always "user"
Type string `json:"type" default:"user"`
// Date the message was sent originally in Unix time
Date int64 `json:"date"`
// User that sent the message originally
SenderUser *User `json:"sender_user"`
}
MessageOriginUser The message was originally sent by a known user.
func (*MessageOriginUser) OptChannel ¶
func (impl *MessageOriginUser) OptChannel() *MessageOriginChannel
func (*MessageOriginUser) OptChat ¶
func (impl *MessageOriginUser) OptChat() *MessageOriginChat
func (*MessageOriginUser) OptHiddenUser ¶
func (impl *MessageOriginUser) OptHiddenUser() *MessageOriginHiddenUser
func (*MessageOriginUser) OptUser ¶
func (impl *MessageOriginUser) OptUser() *MessageOriginUser
type MessageReactionCountUpdated ¶
type MessageReactionCountUpdated struct {
// The chat containing the message
Chat *Chat `json:"chat"`
// Unique message identifier inside the chat
MessageId int64 `json:"message_id"`
// Date of the change in Unix time
Date int64 `json:"date"`
// List of reactions that are present on the message
Reactions []*ReactionCount `json:"reactions"`
}
MessageReactionCountUpdated This object represents reaction changes on a message with anonymous reactions.
type MessageReactionUpdated ¶
type MessageReactionUpdated struct {
// The chat containing the message the user reacted to
Chat *Chat `json:"chat"`
// Unique identifier of the message inside the chat
MessageId int64 `json:"message_id"`
// Optional. The user that changed the reaction, if the user isn't anonymous
User *User `json:"user,omitempty"`
// Optional. The chat on behalf of which the reaction was changed, if the user is anonymous
ActorChat *Chat `json:"actor_chat,omitempty"`
// Date of the change in Unix time
Date int64 `json:"date"`
// Previous list of reaction types that were set by the user
OldReaction []ReactionType `json:"old_reaction"`
// New list of reaction types that have been set by the user
NewReaction []ReactionType `json:"new_reaction"`
}
MessageReactionUpdated This object represents a change of a reaction on a message performed by a user.
func (*MessageReactionUpdated) UnmarshalJSON ¶
func (impl *MessageReactionUpdated) UnmarshalJSON(data []byte) error
type OnErrorFunc ¶
type OptAnswerCallbackQuery ¶
type OptAnswerInlineQuery ¶
type OptAnswerInlineQuery struct {
CacheTime int64
IsPersonal bool
NextOffset string
Button *InlineQueryResultsButton
}
type OptAnswerPreCheckoutQuery ¶
type OptAnswerPreCheckoutQuery struct {
ErrorMessage string
}
type OptAnswerShippingQuery ¶
type OptAnswerShippingQuery struct {
ShippingOptions []*ShippingOption
ErrorMessage string
}
type OptBanChatMember ¶
type OptCopyMessage ¶
type OptCopyMessage struct {
MessageThreadId int64
Caption string
ParseMode string
CaptionEntities []*MessageEntity
ShowCaptionAboveMedia bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptCopyMessages ¶
type OptCreateChatInviteLink ¶
type OptCreateChatSubscriptionInviteLink ¶
type OptCreateChatSubscriptionInviteLink struct {
Name string
}
type OptCreateForumTopic ¶
type OptCreateInvoiceLink ¶
type OptCreateInvoiceLink struct {
BusinessConnectionId string
ProviderToken string
SubscriptionPeriod int64
MaxTipAmount int64
SuggestedTipAmounts []int64
ProviderData string
PhotoUrl string
PhotoSize int64
PhotoWidth int64
PhotoHeight int64
NeedName bool
NeedPhoneNumber bool
NeedEmail bool
NeedShippingAddress bool
SendPhoneNumberToProvider bool
SendEmailToProvider bool
IsFlexible bool
}
type OptCreateNewStickerSet ¶
type OptDeleteMyCommands ¶
type OptDeleteMyCommands struct {
Scope BotCommandScope
LanguageCode string
}
type OptDeleteWebhook ¶
type OptDeleteWebhook struct {
DropPendingUpdates bool
}
type OptEditChatInviteLink ¶
type OptEditChatSubscriptionInviteLink ¶
type OptEditChatSubscriptionInviteLink struct {
Name string
}
type OptEditForumTopic ¶
type OptEditMessageCaption ¶
type OptEditMessageCaption struct {
BusinessConnectionId string
ChatId int64
MessageId int64
InlineMessageId string
Caption string
ParseMode string
CaptionEntities []*MessageEntity
ShowCaptionAboveMedia bool
ReplyMarkup *InlineKeyboardMarkup
}
type OptEditMessageMedia ¶
type OptEditMessageMedia struct {
BusinessConnectionId string
ChatId int64
MessageId int64
InlineMessageId string
ReplyMarkup *InlineKeyboardMarkup
}
type OptEditMessageReplyMarkup ¶
type OptEditMessageReplyMarkup struct {
BusinessConnectionId string
ChatId int64
MessageId int64
InlineMessageId string
ReplyMarkup *InlineKeyboardMarkup
}
type OptEditMessageText ¶
type OptEditMessageText struct {
BusinessConnectionId string
ChatId int64
MessageId int64
InlineMessageId string
ParseMode string
Entities []*MessageEntity
LinkPreviewOptions *LinkPreviewOptions
ReplyMarkup *InlineKeyboardMarkup
}
type OptForwardMessage ¶
type OptForwardMessages ¶
type OptGetChatMenuButton ¶
type OptGetChatMenuButton struct {
ChatId int64
}
type OptGetGameHighScores ¶
type OptGetMyCommands ¶
type OptGetMyCommands struct {
Scope BotCommandScope
LanguageCode string
}
type OptGetMyDefaultAdministratorRights ¶
type OptGetMyDefaultAdministratorRights struct {
ForChannels bool
}
type OptGetMyDescription ¶
type OptGetMyDescription struct {
LanguageCode string
}
type OptGetMyName ¶
type OptGetMyName struct {
LanguageCode string
}
type OptGetMyShortDescription ¶
type OptGetMyShortDescription struct {
LanguageCode string
}
type OptGetStarTransactions ¶
type OptGetUpdates ¶
type OptGetUserProfilePhotos ¶
type OptPinChatMessage ¶
type OptPromoteChatMember ¶
type OptPromoteChatMember struct {
IsAnonymous bool
CanManageChat bool
CanDeleteMessages bool
CanManageVideoChats bool
CanRestrictMembers bool
CanPromoteMembers bool
CanChangeInfo bool
CanInviteUsers bool
CanPostStories bool
CanEditStories bool
CanDeleteStories bool
CanPostMessages bool
CanEditMessages bool
CanPinMessages bool
CanManageTopics bool
}
type OptRestrictChatMember ¶
type OptSendAnimation ¶
type OptSendAnimation struct {
BusinessConnectionId string
MessageThreadId int64
Duration int64
Width int64
Height int64
Thumbnail InputFile
Caption string
ParseMode string
CaptionEntities []*MessageEntity
ShowCaptionAboveMedia bool
HasSpoiler bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendAudio ¶
type OptSendAudio struct {
BusinessConnectionId string
MessageThreadId int64
Caption string
ParseMode string
CaptionEntities []*MessageEntity
Duration int64
Performer string
Title string
Thumbnail InputFile
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendChatAction ¶
type OptSendContact ¶
type OptSendContact struct {
BusinessConnectionId string
MessageThreadId int64
LastName string
Vcard string
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendDice ¶
type OptSendDice struct {
BusinessConnectionId string
MessageThreadId int64
Emoji string
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendDocument ¶
type OptSendDocument struct {
BusinessConnectionId string
MessageThreadId int64
Thumbnail InputFile
Caption string
ParseMode string
CaptionEntities []*MessageEntity
DisableContentTypeDetection bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendGame ¶
type OptSendGame struct {
BusinessConnectionId string
MessageThreadId int64
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup *InlineKeyboardMarkup
}
type OptSendGift ¶
type OptSendGift struct {
Text string
TextParseMode string
TextEntities []*MessageEntity
}
type OptSendInvoice ¶
type OptSendInvoice struct {
MessageThreadId int64
ProviderToken string
MaxTipAmount int64
SuggestedTipAmounts []int64
StartParameter string
ProviderData string
PhotoUrl string
PhotoSize int64
PhotoWidth int64
PhotoHeight int64
NeedName bool
NeedPhoneNumber bool
NeedEmail bool
NeedShippingAddress bool
SendPhoneNumberToProvider bool
SendEmailToProvider bool
IsFlexible bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup *InlineKeyboardMarkup
}
type OptSendLocation ¶
type OptSendLocation struct {
BusinessConnectionId string
MessageThreadId int64
HorizontalAccuracy float64
LivePeriod int64
Heading int64
ProximityAlertRadius int64
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendMediaGroup ¶
type OptSendMessage ¶
type OptSendMessage struct {
BusinessConnectionId string
MessageThreadId int64
ParseMode string
Entities []*MessageEntity
LinkPreviewOptions *LinkPreviewOptions
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendPaidMedia ¶
type OptSendPaidMedia struct {
BusinessConnectionId string
Payload string
Caption string
ParseMode string
CaptionEntities []*MessageEntity
ShowCaptionAboveMedia bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendPhoto ¶
type OptSendPhoto struct {
BusinessConnectionId string
MessageThreadId int64
Caption string
ParseMode string
CaptionEntities []*MessageEntity
ShowCaptionAboveMedia bool
HasSpoiler bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendPoll ¶
type OptSendPoll struct {
BusinessConnectionId string
MessageThreadId int64
QuestionParseMode string
QuestionEntities []*MessageEntity
IsAnonymous bool
Type string
AllowsMultipleAnswers bool
CorrectOptionId int64
Explanation string
ExplanationParseMode string
ExplanationEntities []*MessageEntity
OpenPeriod int64
CloseDate int64
IsClosed bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendSticker ¶
type OptSendSticker struct {
BusinessConnectionId string
MessageThreadId int64
Emoji string
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendVenue ¶
type OptSendVenue struct {
BusinessConnectionId string
MessageThreadId int64
FoursquareId string
FoursquareType string
GooglePlaceId string
GooglePlaceType string
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendVideo ¶
type OptSendVideo struct {
BusinessConnectionId string
MessageThreadId int64
Duration int64
Width int64
Height int64
Thumbnail InputFile
Caption string
ParseMode string
CaptionEntities []*MessageEntity
ShowCaptionAboveMedia bool
HasSpoiler bool
SupportsStreaming bool
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendVideoNote ¶
type OptSendVideoNote struct {
BusinessConnectionId string
MessageThreadId int64
Duration int64
Length int64
Thumbnail InputFile
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSendVoice ¶
type OptSendVoice struct {
BusinessConnectionId string
MessageThreadId int64
Caption string
ParseMode string
CaptionEntities []*MessageEntity
Duration int64
DisableNotification bool
ProtectContent bool
AllowPaidBroadcast bool
MessageEffectId string
ReplyParameters *ReplyParameters
ReplyMarkup VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply
}
type OptSetChatDescription ¶
type OptSetChatDescription struct {
Description string
}
type OptSetChatMenuButton ¶
type OptSetChatMenuButton struct {
ChatId int64
MenuButton MenuButton
}
type OptSetChatPermissions ¶
type OptSetChatPermissions struct {
UseIndependentChatPermissions bool
}
type OptSetCustomEmojiStickerSetThumbnail ¶
type OptSetCustomEmojiStickerSetThumbnail struct {
CustomEmojiId string
}
type OptSetGameScore ¶
type OptSetMessageReaction ¶
type OptSetMessageReaction struct {
Reaction []ReactionType
IsBig bool
}
func CommonReaction ¶
func CommonReaction(emoji string, big ...bool) *OptSetMessageReaction
CommonReaction helps you not to have emoji in your code, i.e. ":ok:" -> "👌" (via CommonReactionEmojiMap)
type OptSetMyCommands ¶
type OptSetMyCommands struct {
Scope BotCommandScope
LanguageCode string
}
type OptSetMyDefaultAdministratorRights ¶
type OptSetMyDefaultAdministratorRights struct {
Rights *ChatAdministratorRights
ForChannels bool
}
type OptSetMyDescription ¶
type OptSetMyName ¶
type OptSetStickerKeywords ¶
type OptSetStickerKeywords struct {
Keywords []string
}
type OptSetStickerMaskPosition ¶
type OptSetStickerMaskPosition struct {
MaskPosition *MaskPosition
}
type OptSetStickerSetThumbnail ¶
type OptSetStickerSetThumbnail struct {
Thumbnail InputFile
}
type OptSetUserEmojiStatus ¶
type OptSetWebhook ¶
type OptStopMessageLiveLocation ¶
type OptStopMessageLiveLocation struct {
BusinessConnectionId string
ChatId int64
MessageId int64
InlineMessageId string
ReplyMarkup *InlineKeyboardMarkup
}
type OptStopPoll ¶
type OptStopPoll struct {
BusinessConnectionId string
ReplyMarkup *InlineKeyboardMarkup
}
type OptUnbanChatMember ¶
type OptUnbanChatMember struct {
OnlyIfBanned bool
}
type OptUnpinChatMessage ¶
type OrderInfo ¶
type OrderInfo struct {
// Optional. User name
Name string `json:"name,omitempty"`
// Optional. User's phone number
PhoneNumber string `json:"phone_number,omitempty"`
// Optional. User email
Email string `json:"email,omitempty"`
// Optional. User shipping address
ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"`
}
OrderInfo This object represents information about an order.
type PaidMedia ¶
type PaidMedia interface {
OptPreview() *PaidMediaPreview
OptPhoto() *PaidMediaPhoto
OptVideo() *PaidMediaVideo
}
PaidMedia This object describes paid media. Currently, it can be one of - PaidMediaPreview - PaidMediaPhoto - PaidMediaVideo
type PaidMediaInfo ¶
type PaidMediaInfo struct {
// The number of Telegram Stars that must be paid to buy access to the media
StarCount int64 `json:"star_count"`
// Information about the paid media
PaidMedia []PaidMedia `json:"paid_media"`
}
PaidMediaInfo Describes the paid media added to a message.
func (*PaidMediaInfo) UnmarshalJSON ¶
func (impl *PaidMediaInfo) UnmarshalJSON(data []byte) error
type PaidMediaPhoto ¶
type PaidMediaPhoto struct {
// Type of the paid media, always "photo"
Type string `json:"type"`
// The photo
Photo TelegramPhoto `json:"photo"`
}
PaidMediaPhoto The paid media is a photo.
func (*PaidMediaPhoto) OptPhoto ¶
func (impl *PaidMediaPhoto) OptPhoto() *PaidMediaPhoto
func (*PaidMediaPhoto) OptPreview ¶
func (impl *PaidMediaPhoto) OptPreview() *PaidMediaPreview
func (*PaidMediaPhoto) OptVideo ¶
func (impl *PaidMediaPhoto) OptVideo() *PaidMediaVideo
type PaidMediaPreview ¶
type PaidMediaPreview struct {
// Type of the paid media, always "preview"
Type string `json:"type"`
// Optional. Media width as defined by the sender
Width int64 `json:"width,omitempty"`
// Optional. Media height as defined by the sender
Height int64 `json:"height,omitempty"`
// Optional. Duration of the media in seconds as defined by the sender
Duration int64 `json:"duration,omitempty"`
}
PaidMediaPreview The paid media isn't available before the payment.
func (*PaidMediaPreview) OptPhoto ¶
func (impl *PaidMediaPreview) OptPhoto() *PaidMediaPhoto
func (*PaidMediaPreview) OptPreview ¶
func (impl *PaidMediaPreview) OptPreview() *PaidMediaPreview
func (*PaidMediaPreview) OptVideo ¶
func (impl *PaidMediaPreview) OptVideo() *PaidMediaVideo
type PaidMediaPurchased ¶
type PaidMediaPurchased struct {
// User who purchased the media
From *User `json:"from"`
// Bot-specified paid media payload
PaidMediaPayload string `json:"paid_media_payload"`
}
PaidMediaPurchased This object contains information about a paid media purchase.
type PaidMediaVideo ¶
type PaidMediaVideo struct {
// Type of the paid media, always "video"
Type string `json:"type"`
// The video
Video *TelegramVideo `json:"video"`
}
PaidMediaVideo The paid media is a video.
func (*PaidMediaVideo) OptPhoto ¶
func (impl *PaidMediaVideo) OptPhoto() *PaidMediaPhoto
func (*PaidMediaVideo) OptPreview ¶
func (impl *PaidMediaVideo) OptPreview() *PaidMediaPreview
func (*PaidMediaVideo) OptVideo ¶
func (impl *PaidMediaVideo) OptVideo() *PaidMediaVideo
type PassportData ¶
type PassportData struct {
// Array with information about documents and other Telegram Passport elements that was shared with the bot
Data []*EncryptedPassportElement `json:"data"`
// Encrypted credentials required to decrypt the data
Credentials *EncryptedCredentials `json:"credentials"`
}
PassportData Describes Telegram Passport data shared with the bot by the user.
type PassportElementError ¶
type PassportElementError interface {
OptDataField() *PassportElementErrorDataField
OptFrontSide() *PassportElementErrorFrontSide
OptReverseSide() *PassportElementErrorReverseSide
OptSelfie() *PassportElementErrorSelfie
OptFile() *PassportElementErrorFile
OptFiles() *PassportElementErrorFiles
OptTranslationFile() *PassportElementErrorTranslationFile
OptTranslationFiles() *PassportElementErrorTranslationFiles
OptUnspecified() *PassportElementErrorUnspecified
}
PassportElementError This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of: - PassportElementErrorDataField - PassportElementErrorFrontSide - PassportElementErrorReverseSide - PassportElementErrorSelfie - PassportElementErrorFile - PassportElementErrorFiles - PassportElementErrorTranslationFile - PassportElementErrorTranslationFiles - PassportElementErrorUnspecified
type PassportElementErrorDataField ¶
type PassportElementErrorDataField struct {
// Error source, must be data
Source string `json:"source" default:"data"`
// The section of the user's Telegram Passport which has the error, one of "personal_details", "passport", "driver_license", "identity_card", "internal_passport", "address"
Type string `json:"type"`
// Name of the data field which has the error
FieldName string `json:"field_name"`
// Base64-encoded data hash
DataHash string `json:"data_hash"`
// Error message
Message string `json:"message"`
}
PassportElementErrorDataField Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
func (*PassportElementErrorDataField) OptDataField ¶
func (impl *PassportElementErrorDataField) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorDataField) OptFile ¶
func (impl *PassportElementErrorDataField) OptFile() *PassportElementErrorFile
func (*PassportElementErrorDataField) OptFiles ¶
func (impl *PassportElementErrorDataField) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorDataField) OptFrontSide ¶
func (impl *PassportElementErrorDataField) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorDataField) OptReverseSide ¶
func (impl *PassportElementErrorDataField) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorDataField) OptSelfie ¶
func (impl *PassportElementErrorDataField) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorDataField) OptTranslationFile ¶
func (impl *PassportElementErrorDataField) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorDataField) OptTranslationFiles ¶
func (impl *PassportElementErrorDataField) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorDataField) OptUnspecified ¶
func (impl *PassportElementErrorDataField) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorFile ¶
type PassportElementErrorFile struct {
// Error source, must be file
Source string `json:"source" default:"file"`
// The section of the user's Telegram Passport which has the issue, one of "utility_bill", "bank_statement", "rental_agreement", "passport_registration", "temporary_registration"
Type string `json:"type"`
// Base64-encoded file hash
FileHash string `json:"file_hash"`
// Error message
Message string `json:"message"`
}
PassportElementErrorFile Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
func (*PassportElementErrorFile) OptDataField ¶
func (impl *PassportElementErrorFile) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorFile) OptFile ¶
func (impl *PassportElementErrorFile) OptFile() *PassportElementErrorFile
func (*PassportElementErrorFile) OptFiles ¶
func (impl *PassportElementErrorFile) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorFile) OptFrontSide ¶
func (impl *PassportElementErrorFile) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorFile) OptReverseSide ¶
func (impl *PassportElementErrorFile) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorFile) OptSelfie ¶
func (impl *PassportElementErrorFile) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorFile) OptTranslationFile ¶
func (impl *PassportElementErrorFile) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorFile) OptTranslationFiles ¶
func (impl *PassportElementErrorFile) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorFile) OptUnspecified ¶
func (impl *PassportElementErrorFile) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorFiles ¶
type PassportElementErrorFiles struct {
// Error source, must be files
Source string `json:"source" default:"files"`
// The section of the user's Telegram Passport which has the issue, one of "utility_bill", "bank_statement", "rental_agreement", "passport_registration", "temporary_registration"
Type string `json:"type"`
// List of base64-encoded file hashes
FileHashes []string `json:"file_hashes"`
// Error message
Message string `json:"message"`
}
PassportElementErrorFiles Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
func (*PassportElementErrorFiles) OptDataField ¶
func (impl *PassportElementErrorFiles) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorFiles) OptFile ¶
func (impl *PassportElementErrorFiles) OptFile() *PassportElementErrorFile
func (*PassportElementErrorFiles) OptFiles ¶
func (impl *PassportElementErrorFiles) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorFiles) OptFrontSide ¶
func (impl *PassportElementErrorFiles) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorFiles) OptReverseSide ¶
func (impl *PassportElementErrorFiles) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorFiles) OptSelfie ¶
func (impl *PassportElementErrorFiles) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorFiles) OptTranslationFile ¶
func (impl *PassportElementErrorFiles) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorFiles) OptTranslationFiles ¶
func (impl *PassportElementErrorFiles) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorFiles) OptUnspecified ¶
func (impl *PassportElementErrorFiles) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorFrontSide ¶
type PassportElementErrorFrontSide struct {
// Error source, must be front_side
Source string `json:"source" default:"front_side"`
// The section of the user's Telegram Passport which has the issue, one of "passport", "driver_license", "identity_card", "internal_passport"
Type string `json:"type"`
// Base64-encoded hash of the file with the front side of the document
FileHash string `json:"file_hash"`
// Error message
Message string `json:"message"`
}
PassportElementErrorFrontSide Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
func (*PassportElementErrorFrontSide) OptDataField ¶
func (impl *PassportElementErrorFrontSide) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorFrontSide) OptFile ¶
func (impl *PassportElementErrorFrontSide) OptFile() *PassportElementErrorFile
func (*PassportElementErrorFrontSide) OptFiles ¶
func (impl *PassportElementErrorFrontSide) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorFrontSide) OptFrontSide ¶
func (impl *PassportElementErrorFrontSide) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorFrontSide) OptReverseSide ¶
func (impl *PassportElementErrorFrontSide) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorFrontSide) OptSelfie ¶
func (impl *PassportElementErrorFrontSide) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorFrontSide) OptTranslationFile ¶
func (impl *PassportElementErrorFrontSide) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorFrontSide) OptTranslationFiles ¶
func (impl *PassportElementErrorFrontSide) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorFrontSide) OptUnspecified ¶
func (impl *PassportElementErrorFrontSide) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorReverseSide ¶
type PassportElementErrorReverseSide struct {
// Error source, must be reverse_side
Source string `json:"source" default:"reverse_side"`
// The section of the user's Telegram Passport which has the issue, one of "driver_license", "identity_card"
Type string `json:"type"`
// Base64-encoded hash of the file with the reverse side of the document
FileHash string `json:"file_hash"`
// Error message
Message string `json:"message"`
}
PassportElementErrorReverseSide Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
func (*PassportElementErrorReverseSide) OptDataField ¶
func (impl *PassportElementErrorReverseSide) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorReverseSide) OptFile ¶
func (impl *PassportElementErrorReverseSide) OptFile() *PassportElementErrorFile
func (*PassportElementErrorReverseSide) OptFiles ¶
func (impl *PassportElementErrorReverseSide) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorReverseSide) OptFrontSide ¶
func (impl *PassportElementErrorReverseSide) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorReverseSide) OptReverseSide ¶
func (impl *PassportElementErrorReverseSide) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorReverseSide) OptSelfie ¶
func (impl *PassportElementErrorReverseSide) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorReverseSide) OptTranslationFile ¶
func (impl *PassportElementErrorReverseSide) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorReverseSide) OptTranslationFiles ¶
func (impl *PassportElementErrorReverseSide) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorReverseSide) OptUnspecified ¶
func (impl *PassportElementErrorReverseSide) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorSelfie ¶
type PassportElementErrorSelfie struct {
// Error source, must be selfie
Source string `json:"source" default:"selfie"`
// The section of the user's Telegram Passport which has the issue, one of "passport", "driver_license", "identity_card", "internal_passport"
Type string `json:"type"`
// Base64-encoded hash of the file with the selfie
FileHash string `json:"file_hash"`
// Error message
Message string `json:"message"`
}
PassportElementErrorSelfie Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
func (*PassportElementErrorSelfie) OptDataField ¶
func (impl *PassportElementErrorSelfie) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorSelfie) OptFile ¶
func (impl *PassportElementErrorSelfie) OptFile() *PassportElementErrorFile
func (*PassportElementErrorSelfie) OptFiles ¶
func (impl *PassportElementErrorSelfie) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorSelfie) OptFrontSide ¶
func (impl *PassportElementErrorSelfie) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorSelfie) OptReverseSide ¶
func (impl *PassportElementErrorSelfie) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorSelfie) OptSelfie ¶
func (impl *PassportElementErrorSelfie) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorSelfie) OptTranslationFile ¶
func (impl *PassportElementErrorSelfie) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorSelfie) OptTranslationFiles ¶
func (impl *PassportElementErrorSelfie) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorSelfie) OptUnspecified ¶
func (impl *PassportElementErrorSelfie) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorTranslationFile ¶
type PassportElementErrorTranslationFile struct {
// Error source, must be translation_file
Source string `json:"source" default:"translation_file"`
// Type of element of the user's Telegram Passport which has the issue, one of "passport", "driver_license", "identity_card", "internal_passport", "utility_bill", "bank_statement", "rental_agreement", "passport_registration", "temporary_registration"
Type string `json:"type"`
// Base64-encoded file hash
FileHash string `json:"file_hash"`
// Error message
Message string `json:"message"`
}
PassportElementErrorTranslationFile Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
func (*PassportElementErrorTranslationFile) OptDataField ¶
func (impl *PassportElementErrorTranslationFile) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorTranslationFile) OptFile ¶
func (impl *PassportElementErrorTranslationFile) OptFile() *PassportElementErrorFile
func (*PassportElementErrorTranslationFile) OptFiles ¶
func (impl *PassportElementErrorTranslationFile) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorTranslationFile) OptFrontSide ¶
func (impl *PassportElementErrorTranslationFile) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorTranslationFile) OptReverseSide ¶
func (impl *PassportElementErrorTranslationFile) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorTranslationFile) OptSelfie ¶
func (impl *PassportElementErrorTranslationFile) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorTranslationFile) OptTranslationFile ¶
func (impl *PassportElementErrorTranslationFile) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorTranslationFile) OptTranslationFiles ¶
func (impl *PassportElementErrorTranslationFile) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorTranslationFile) OptUnspecified ¶
func (impl *PassportElementErrorTranslationFile) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorTranslationFiles ¶
type PassportElementErrorTranslationFiles struct {
// Error source, must be translation_files
Source string `json:"source" default:"translation_files"`
// Type of element of the user's Telegram Passport which has the issue, one of "passport", "driver_license", "identity_card", "internal_passport", "utility_bill", "bank_statement", "rental_agreement", "passport_registration", "temporary_registration"
Type string `json:"type"`
// List of base64-encoded file hashes
FileHashes []string `json:"file_hashes"`
// Error message
Message string `json:"message"`
}
PassportElementErrorTranslationFiles Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
func (*PassportElementErrorTranslationFiles) OptDataField ¶
func (impl *PassportElementErrorTranslationFiles) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorTranslationFiles) OptFile ¶
func (impl *PassportElementErrorTranslationFiles) OptFile() *PassportElementErrorFile
func (*PassportElementErrorTranslationFiles) OptFiles ¶
func (impl *PassportElementErrorTranslationFiles) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorTranslationFiles) OptFrontSide ¶
func (impl *PassportElementErrorTranslationFiles) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorTranslationFiles) OptReverseSide ¶
func (impl *PassportElementErrorTranslationFiles) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorTranslationFiles) OptSelfie ¶
func (impl *PassportElementErrorTranslationFiles) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorTranslationFiles) OptTranslationFile ¶
func (impl *PassportElementErrorTranslationFiles) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorTranslationFiles) OptTranslationFiles ¶
func (impl *PassportElementErrorTranslationFiles) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorTranslationFiles) OptUnspecified ¶
func (impl *PassportElementErrorTranslationFiles) OptUnspecified() *PassportElementErrorUnspecified
type PassportElementErrorUnspecified ¶
type PassportElementErrorUnspecified struct {
// Error source, must be unspecified
Source string `json:"source" default:"unspecified"`
// Type of element of the user's Telegram Passport which has the issue
Type string `json:"type"`
// Base64-encoded element hash
ElementHash string `json:"element_hash"`
// Error message
Message string `json:"message"`
}
PassportElementErrorUnspecified Represents an issue in an unspecified place. The error is considered resolved when new data is added.
func (*PassportElementErrorUnspecified) OptDataField ¶
func (impl *PassportElementErrorUnspecified) OptDataField() *PassportElementErrorDataField
func (*PassportElementErrorUnspecified) OptFile ¶
func (impl *PassportElementErrorUnspecified) OptFile() *PassportElementErrorFile
func (*PassportElementErrorUnspecified) OptFiles ¶
func (impl *PassportElementErrorUnspecified) OptFiles() *PassportElementErrorFiles
func (*PassportElementErrorUnspecified) OptFrontSide ¶
func (impl *PassportElementErrorUnspecified) OptFrontSide() *PassportElementErrorFrontSide
func (*PassportElementErrorUnspecified) OptReverseSide ¶
func (impl *PassportElementErrorUnspecified) OptReverseSide() *PassportElementErrorReverseSide
func (*PassportElementErrorUnspecified) OptSelfie ¶
func (impl *PassportElementErrorUnspecified) OptSelfie() *PassportElementErrorSelfie
func (*PassportElementErrorUnspecified) OptTranslationFile ¶
func (impl *PassportElementErrorUnspecified) OptTranslationFile() *PassportElementErrorTranslationFile
func (*PassportElementErrorUnspecified) OptTranslationFiles ¶
func (impl *PassportElementErrorUnspecified) OptTranslationFiles() *PassportElementErrorTranslationFiles
func (*PassportElementErrorUnspecified) OptUnspecified ¶
func (impl *PassportElementErrorUnspecified) OptUnspecified() *PassportElementErrorUnspecified
type PassportFile ¶
type PassportFile struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// File size in bytes
FileSize int64 `json:"file_size"`
// Unix time when the file was uploaded
FileDate int64 `json:"file_date"`
}
PassportFile This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
func (*PassportFile) Download ¶
func (impl *PassportFile) Download(ctx context.Context, path string) error
func (*PassportFile) DownloadTemp ¶
type Photo ¶
type Photo struct {
// Type of the result, must be photo
Type string `json:"type" default:"photo"`
// File to send. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
Media InputFile `json:"media"`
// Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Pass True if the photo needs to be covered with a spoiler animation
HasSpoiler bool `json:"has_spoiler,omitempty"`
// Used for uploading media.
InputFile InputFile `json:"-"`
}
Photo Represents a photo to be sent.
func (*Photo) OptAnimation ¶
func (*Photo) OptDocument ¶
type PhotoSize ¶
type PhotoSize struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Photo width
Width int64 `json:"width"`
// Photo height
Height int64 `json:"height"`
// Optional. File size in bytes
FileSize int64 `json:"file_size,omitempty"`
}
PhotoSize This object represents one size of a photo or a file / sticker thumbnail.
type Plugin ¶
type Plugin interface {
Hooks() []PluginHookType
Apply(ctx PluginHookContext)
}
Plugin allows minor modifications in Bot flow, i.e. logging requests, handling errors or even orchestrating bulk requests.
func PluginLogger ¶
func PluginLoggerFrom ¶
func PluginOnError ¶
func PluginOnError(fn OnErrorFunc) Plugin
type PluginHookContext ¶
type PluginHookContext = interface {
OnHook() PluginHookType
}
type PluginHookContextOnError ¶
func (*PluginHookContextOnError) OnHook ¶
func (p *PluginHookContextOnError) OnHook() PluginHookType
type PluginHookContextOnFilter ¶
type PluginHookContextOnFilter struct {
Context context.Context
Bot *Bot
Filter FilterFunc
}
func (*PluginHookContextOnFilter) OnHook ¶
func (p *PluginHookContextOnFilter) OnHook() PluginHookType
type PluginHookContextOnHandleFinish ¶
type PluginHookContextOnHandleFinish struct {
Context context.Context
Bot *Bot
Update *Update
Handler HandlerFunc
Error error
}
func (*PluginHookContextOnHandleFinish) OnHook ¶
func (p *PluginHookContextOnHandleFinish) OnHook() PluginHookType
type PluginHookContextOnHandleStart ¶
type PluginHookContextOnHandleStart struct {
Context context.Context
Bot *Bot
Update *Update
Handler HandlerFunc
}
func (*PluginHookContextOnHandleStart) OnHook ¶
func (p *PluginHookContextOnHandleStart) OnHook() PluginHookType
type PluginHookContextOnUpdate ¶
func (*PluginHookContextOnUpdate) OnHook ¶
func (p *PluginHookContextOnUpdate) OnHook() PluginHookType
type PluginHookType ¶
type PluginHookType int
const ( PluginHookOnUpdate PluginHookType = iota PluginHookOnFilter PluginHookOnHandleStart PluginHookOnHandleFinish PluginHookOnError )
type Poll ¶
type Poll struct {
// Unique poll identifier
Id string `json:"id"`
// Poll question, 1-300 characters
Question string `json:"question"`
// Optional. Special entities that appear in the question.
// Currently, only custom emoji entities are allowed in poll questions
QuestionEntities []*MessageEntity `json:"question_entities,omitempty"`
// List of poll options
Options []*PollOption `json:"options"`
// Total number of users that voted in the poll
TotalVoterCount int64 `json:"total_voter_count"`
// True, if the poll is closed
IsClosed bool `json:"is_closed"`
// True, if the poll is anonymous
IsAnonymous bool `json:"is_anonymous"`
// Poll type, currently can be "regular" or "quiz"
Type string `json:"type"`
// True, if the poll allows multiple answers
AllowsMultipleAnswers bool `json:"allows_multiple_answers"`
// Optional. 0-based identifier of the correct answer option.
// Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
CorrectOptionId int64 `json:"correct_option_id,omitempty"`
// Optional.
// Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters
Explanation string `json:"explanation,omitempty"`
// Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
ExplanationEntities []*MessageEntity `json:"explanation_entities,omitempty"`
// Optional. Amount of time in seconds the poll will be active after creation
OpenPeriod int64 `json:"open_period,omitempty"`
// Optional. Point in time (Unix timestamp) when the poll will be automatically closed
CloseDate int64 `json:"close_date,omitempty"`
}
Poll This object contains information about a poll.
type PollAnswer ¶
type PollAnswer struct {
// Unique poll identifier
PollId string `json:"poll_id"`
// Optional. The chat that changed the answer to the poll, if the voter is anonymous
VoterChat *Chat `json:"voter_chat,omitempty"`
// Optional. The user that changed the answer to the poll, if the voter isn't anonymous
User *User `json:"user,omitempty"`
// 0-based identifiers of chosen answer options. May be empty if the vote was retracted.
OptionIds []int64 `json:"option_ids"`
}
PollAnswer This object represents an answer of a user in a non-anonymous poll.
type PollOption ¶
type PollOption struct {
// Option text, 1-100 characters
Text string `json:"text"`
// Optional. Special entities that appear in the option text.
// Currently, only custom emoji entities are allowed in poll option texts
TextEntities []*MessageEntity `json:"text_entities,omitempty"`
// Number of users that voted for this option
VoterCount int64 `json:"voter_count"`
}
PollOption This object contains information about one answer option in a poll.
type PreCheckoutQuery ¶
type PreCheckoutQuery struct {
// Unique query identifier
Id string `json:"id"`
// User who sent the query
From *User `json:"from"`
// Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars
Currency string `json:"currency"`
// Total price in the smallest units of the currency (integer, not float/double).
// For example, for a price of US$ 1.45 pass amount = 145.
// See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
TotalAmount int64 `json:"total_amount"`
// Bot-specified invoice payload
InvoicePayload string `json:"invoice_payload"`
// Optional. Identifier of the shipping option chosen by the user
ShippingOptionId string `json:"shipping_option_id,omitempty"`
// Optional. Order information provided by the user
OrderInfo *OrderInfo `json:"order_info,omitempty"`
}
PreCheckoutQuery This object contains information about an incoming pre-checkout query.
type PreparedInlineMessage ¶
type PreparedInlineMessage struct {
// Unique identifier of the prepared message
Id string `json:"id"`
// Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used
ExpirationDate int64 `json:"expiration_date"`
}
PreparedInlineMessage Describes an inline message to be sent by a user of a Mini App.
func SavePreparedInlineMessage ¶
func SavePreparedInlineMessage(ctx context.Context, userId int64, result InlineQueryResult, opts ...*OptSavePreparedInlineMessage) (*PreparedInlineMessage, error)
SavePreparedInlineMessage Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
type ProximityAlertTriggered ¶
type ProximityAlertTriggered struct {
// User that triggered the alert
Traveler *User `json:"traveler"`
// User that set the alert
Watcher *User `json:"watcher"`
// The distance between the users
Distance int64 `json:"distance"`
}
ProximityAlertTriggered This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
type ReactionCount ¶
type ReactionCount struct {
// Type of the reaction
Type ReactionType `json:"type"`
// Number of times the reaction was added
TotalCount int64 `json:"total_count"`
}
ReactionCount Represents a reaction added to a message along with the number of times it was added.
func (*ReactionCount) UnmarshalJSON ¶
func (impl *ReactionCount) UnmarshalJSON(data []byte) error
type ReactionType ¶
type ReactionType interface {
OptEmoji() *ReactionTypeEmoji
OptCustomEmoji() *ReactionTypeCustomEmoji
OptPaid() *ReactionTypePaid
}
ReactionType This object describes the type of a reaction. Currently, it can be one of - ReactionTypeEmoji - ReactionTypeCustomEmoji - ReactionTypePaid
type ReactionTypeCustomEmoji ¶
type ReactionTypeCustomEmoji struct {
// Type of the reaction, always "custom_emoji"
Type string `json:"type" default:"custom_emoji"`
// Custom emoji identifier
CustomEmojiId string `json:"custom_emoji_id"`
}
ReactionTypeCustomEmoji The reaction is based on a custom emoji.
func (*ReactionTypeCustomEmoji) OptCustomEmoji ¶
func (impl *ReactionTypeCustomEmoji) OptCustomEmoji() *ReactionTypeCustomEmoji
func (*ReactionTypeCustomEmoji) OptEmoji ¶
func (impl *ReactionTypeCustomEmoji) OptEmoji() *ReactionTypeEmoji
func (*ReactionTypeCustomEmoji) OptPaid ¶
func (impl *ReactionTypeCustomEmoji) OptPaid() *ReactionTypePaid
type ReactionTypeEmoji ¶
type ReactionTypeEmoji struct {
// Type of the reaction, always "emoji"
Type string `json:"type" default:"emoji"`
// Reaction emoji.
// Currently, it can be one of "👍", "👎", "❤", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷♂", "🤷", "🤷♀", "😡"
Emoji string `json:"emoji"`
}
ReactionTypeEmoji The reaction is based on an emoji.
func (*ReactionTypeEmoji) OptCustomEmoji ¶
func (impl *ReactionTypeEmoji) OptCustomEmoji() *ReactionTypeCustomEmoji
func (*ReactionTypeEmoji) OptEmoji ¶
func (impl *ReactionTypeEmoji) OptEmoji() *ReactionTypeEmoji
func (*ReactionTypeEmoji) OptPaid ¶
func (impl *ReactionTypeEmoji) OptPaid() *ReactionTypePaid
type ReactionTypePaid ¶
type ReactionTypePaid struct {
// Type of the reaction, always "paid"
Type string `json:"type" default:"paid"`
}
ReactionTypePaid The reaction is paid.
func (*ReactionTypePaid) OptCustomEmoji ¶
func (impl *ReactionTypePaid) OptCustomEmoji() *ReactionTypeCustomEmoji
func (*ReactionTypePaid) OptEmoji ¶
func (impl *ReactionTypePaid) OptEmoji() *ReactionTypeEmoji
func (*ReactionTypePaid) OptPaid ¶
func (impl *ReactionTypePaid) OptPaid() *ReactionTypePaid
type RefundedPayment ¶
type RefundedPayment struct {
// Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars. Currently, always "XTR"
Currency string `json:"currency"`
// Total refunded price in the smallest units of the currency (integer, not float/double).
// For example, for a price of US$ 1.45, total_amount = 145.
// See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
TotalAmount int64 `json:"total_amount"`
// Bot-specified invoice payload
InvoicePayload string `json:"invoice_payload"`
// Telegram payment identifier
TelegramPaymentChargeId string `json:"telegram_payment_charge_id"`
// Optional. Provider payment identifier
ProviderPaymentChargeId string `json:"provider_payment_charge_id,omitempty"`
}
RefundedPayment This object contains basic information about a refunded payment.
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct {
// Array of button rows, each represented by an Array of KeyboardButton objects
Keyboard [][]*KeyboardButton `json:"keyboard"`
// Optional. Requests clients to always show the keyboard when the regular keyboard is hidden.
// Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.
IsPersistent bool `json:"is_persistent,omitempty"`
// Optional.
// Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons).
// Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
ResizeKeyboard bool `json:"resize_keyboard,omitempty"`
// Optional. Requests clients to hide the keyboard as soon as it's been used. Defaults to false.
// The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again.
OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"`
// Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters
InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"`
// Optional. Use this parameter if you want to show the keyboard to specific users only.
// Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.
// Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language.
// Other users in the group don't see the keyboard.
Selective bool `json:"selective,omitempty"`
}
ReplyKeyboardMarkup This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.
type ReplyKeyboardRemove ¶
type ReplyKeyboardRemove struct {
// Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)
RemoveKeyboard bool `json:"remove_keyboard"`
// Optional. Use this parameter if you want to remove the keyboard for specific users only.
// Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.
// Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.
Selective bool `json:"selective,omitempty"`
}
ReplyKeyboardRemove Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account.
type ReplyParameters ¶
type ReplyParameters struct {
// Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified
MessageId int64 `json:"message_id"`
// Optional. Not supported for messages sent on behalf of a business account.
// If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername).
// >> either: String
ChatId int64 `json:"chat_id,omitempty"`
// Optional. Pass True if the message should be sent even if the specified message to be replied to is not found.
// Always False for replies in another chat or forum topic.
// Always True for messages sent on behalf of a business account.
AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"`
// Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing.
// The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities.
// The message will fail to send if the quote isn't found in the original message.
Quote string `json:"quote,omitempty"`
// Optional. Mode for parsing entities in the quote. See formatting options for more details.
QuoteParseMode string `json:"quote_parse_mode,omitempty"`
// Optional. A JSON-serialized list of special entities that appear in the quote.
// It can be specified instead of quote_parse_mode.
QuoteEntities []*MessageEntity `json:"quote_entities,omitempty"`
// Optional. Position of the quote in the original message in UTF-16 code units
QuotePosition int64 `json:"quote_position,omitempty"`
}
ReplyParameters Describes reply parameters for the message that is being sent.
func AsReplyTo ¶
func AsReplyTo(msg *Message) *ReplyParameters
type ResponseParameters ¶
type ResponseParameters struct {
// Optional. The group has been migrated to a supergroup with the specified identifier.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
MigrateToChatId int64 `json:"migrate_to_chat_id,omitempty"`
// Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated
RetryAfter int64 `json:"retry_after,omitempty"`
}
ResponseParameters Describes why a request was unsuccessful.
type RevenueWithdrawalState ¶
type RevenueWithdrawalState interface {
OptPending() *RevenueWithdrawalStatePending
OptSucceeded() *RevenueWithdrawalStateSucceeded
OptFailed() *RevenueWithdrawalStateFailed
}
RevenueWithdrawalState This object describes the state of a revenue withdrawal operation. Currently, it can be one of - RevenueWithdrawalStatePending - RevenueWithdrawalStateSucceeded - RevenueWithdrawalStateFailed
type RevenueWithdrawalStateFailed ¶
type RevenueWithdrawalStateFailed struct {
// Type of the state, always "failed"
Type string `json:"type"`
}
RevenueWithdrawalStateFailed The withdrawal failed and the transaction was refunded.
func (*RevenueWithdrawalStateFailed) OptFailed ¶
func (impl *RevenueWithdrawalStateFailed) OptFailed() *RevenueWithdrawalStateFailed
func (*RevenueWithdrawalStateFailed) OptPending ¶
func (impl *RevenueWithdrawalStateFailed) OptPending() *RevenueWithdrawalStatePending
func (*RevenueWithdrawalStateFailed) OptSucceeded ¶
func (impl *RevenueWithdrawalStateFailed) OptSucceeded() *RevenueWithdrawalStateSucceeded
type RevenueWithdrawalStatePending ¶
type RevenueWithdrawalStatePending struct {
// Type of the state, always "pending"
Type string `json:"type"`
}
RevenueWithdrawalStatePending The withdrawal is in progress.
func (*RevenueWithdrawalStatePending) OptFailed ¶
func (impl *RevenueWithdrawalStatePending) OptFailed() *RevenueWithdrawalStateFailed
func (*RevenueWithdrawalStatePending) OptPending ¶
func (impl *RevenueWithdrawalStatePending) OptPending() *RevenueWithdrawalStatePending
func (*RevenueWithdrawalStatePending) OptSucceeded ¶
func (impl *RevenueWithdrawalStatePending) OptSucceeded() *RevenueWithdrawalStateSucceeded
type RevenueWithdrawalStateSucceeded ¶
type RevenueWithdrawalStateSucceeded struct {
// Type of the state, always "succeeded"
Type string `json:"type"`
// Date the withdrawal was completed in Unix time
Date int64 `json:"date"`
// An HTTPS URL that can be used to see transaction details
Url string `json:"url"`
}
RevenueWithdrawalStateSucceeded The withdrawal succeeded.
func (*RevenueWithdrawalStateSucceeded) OptFailed ¶
func (impl *RevenueWithdrawalStateSucceeded) OptFailed() *RevenueWithdrawalStateFailed
func (*RevenueWithdrawalStateSucceeded) OptPending ¶
func (impl *RevenueWithdrawalStateSucceeded) OptPending() *RevenueWithdrawalStatePending
func (*RevenueWithdrawalStateSucceeded) OptSucceeded ¶
func (impl *RevenueWithdrawalStateSucceeded) OptSucceeded() *RevenueWithdrawalStateSucceeded
type Scheduler ¶
type Scheduler interface {
Schedule(ctx context.Context, chat int64, weight int)
Done(ctx context.Context, chat int64, weight int)
}
func NewScheduler ¶
func NewScheduler(clauses ...SchedulerClause) Scheduler
func NewSchedulerVerbose ¶
func NewSchedulerVerbose(pollingRate time.Duration, clauses ...SchedulerClause) Scheduler
type SchedulerClause ¶
type SchedulerClause interface {
TrySchedule(chat int64, weight int) bool
Schedule(chat int64, weight int)
Done(mutex *sync.Mutex, chat int64, weight int)
}
func SchedulerClauseChat ¶
func SchedulerClauseChat(quota int, timeout time.Duration) SchedulerClause
func SchedulerClauseGlobal ¶
func SchedulerClauseGlobal(quota int, timeout time.Duration) SchedulerClause
func SchedulerClauseUser ¶
func SchedulerClauseUser(quota int, timeout time.Duration) SchedulerClause
type SentWebAppMessage ¶
type SentWebAppMessage struct {
// Optional. Identifier of the sent inline message.
// Available only if there is an inline keyboard attached to the message.
InlineMessageId string `json:"inline_message_id,omitempty"`
}
SentWebAppMessage Describes an inline message sent by a Web App on behalf of a user.
func AnswerWebAppQuery ¶
func AnswerWebAppQuery(ctx context.Context, webAppQueryId string, result InlineQueryResult) (*SentWebAppMessage, error)
AnswerWebAppQuery Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.
type SharedUser ¶
type SharedUser struct {
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers.
// The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.
UserId int64 `json:"user_id"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Username string `json:"username,omitempty"`
Photo TelegramPhoto `json:"photo,omitempty"`
}
SharedUser This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.
type ShippingAddress ¶
type ShippingAddress struct {
// Two-letter ISO 3166-1 alpha-2 country code
CountryCode string `json:"country_code"`
// State, if applicable
State string `json:"state"`
// City
City string `json:"city"`
// First line for the address
StreetLine1 string `json:"street_line1"`
// Second line for the address
StreetLine2 string `json:"street_line2"`
// Address post code
PostCode string `json:"post_code"`
}
ShippingAddress This object represents a shipping address.
type ShippingOption ¶
type ShippingOption struct {
// Shipping option identifier
Id string `json:"id"`
// Option title
Title string `json:"title"`
// List of price portions
Prices []*LabeledPrice `json:"prices"`
}
ShippingOption This object represents one shipping option.
type ShippingQuery ¶
type ShippingQuery struct {
// Unique query identifier
Id string `json:"id"`
// User who sent the query
From *User `json:"from"`
// Bot-specified invoice payload
InvoicePayload string `json:"invoice_payload"`
// User specified shipping address
ShippingAddress *ShippingAddress `json:"shipping_address"`
}
ShippingQuery This object contains information about an incoming shipping query.
type StarTransaction ¶
type StarTransaction struct {
// Unique identifier of the transaction.
// Coincides with the identifier of the original transaction for refund transactions.
// Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.
Id string `json:"id"`
// Integer amount of Telegram Stars transferred by the transaction
Amount int64 `json:"amount"`
// Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999
NanostarAmount int64 `json:"nanostar_amount,omitempty"`
// Date the transaction was created in Unix time
Date int64 `json:"date"`
// Optional. Only for incoming transactions
// Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal).
Source TransactionPartner `json:"source,omitempty"`
// Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal).
// Only for outgoing transactions
Receiver TransactionPartner `json:"receiver,omitempty"`
}
StarTransaction Describes a Telegram Star transaction.
func (*StarTransaction) UnmarshalJSON ¶
func (impl *StarTransaction) UnmarshalJSON(data []byte) error
type StarTransactions ¶
type StarTransactions struct {
// The list of transactions
Transactions []*StarTransaction `json:"transactions"`
}
StarTransactions Contains a list of Telegram Star transactions.
func GetStarTransactions ¶
func GetStarTransactions(ctx context.Context, opts ...*OptGetStarTransactions) (*StarTransactions, error)
GetStarTransactions Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.
type Sticker ¶
type Sticker struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Type of the sticker, currently one of "regular", "mask", "custom_emoji".
// The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.
Type string `json:"type"`
// Sticker width
Width int64 `json:"width"`
// Sticker height
Height int64 `json:"height"`
// True, if the sticker is animated
IsAnimated bool `json:"is_animated"`
// True, if the sticker is a video sticker
IsVideo bool `json:"is_video"`
// Optional. Sticker thumbnail in the .WEBP or .JPG format
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
// Optional. Emoji associated with the sticker
Emoji string `json:"emoji,omitempty"`
// Optional. Name of the sticker set to which the sticker belongs
SetName string `json:"set_name,omitempty"`
// Optional. For premium regular stickers, premium animation for the sticker
PremiumAnimation *File `json:"premium_animation,omitempty"`
// Optional. For mask stickers, the position where the mask should be placed
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
// Optional. For custom emoji stickers, unique identifier of the custom emoji
CustomEmojiId string `json:"custom_emoji_id,omitempty"`
// Optional.
// True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places
NeedsRepainting bool `json:"needs_repainting,omitempty"`
// Optional. File size in bytes
FileSize int64 `json:"file_size,omitempty"`
}
Sticker This object represents a sticker.
func GetCustomEmojiStickers ¶
GetCustomEmojiStickers Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
func GetForumTopicIconStickers ¶
GetForumTopicIconStickers Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.
type StickerSet ¶
type StickerSet struct {
// Sticker set name
Name string `json:"name"`
// Sticker set title
Title string `json:"title"`
// Type of stickers in the set, currently one of "regular", "mask", "custom_emoji"
StickerType string `json:"sticker_type"`
// List of all set stickers
Stickers []*Sticker `json:"stickers"`
// Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
StickerSet This object represents a sticker set.
func GetStickerSet ¶
func GetStickerSet(ctx context.Context, name string) (*StickerSet, error)
GetStickerSet Use this method to get a sticker set. On success, a StickerSet object is returned.
type Story ¶
type Story struct {
// Chat that posted the story
Chat *Chat `json:"chat"`
// Unique identifier for the story in the chat
Id int64 `json:"id"`
}
Story This object represents a story.
type SuccessfulPayment ¶
type SuccessfulPayment struct {
// Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars
Currency string `json:"currency"`
// Total price in the smallest units of the currency (integer, not float/double).
// For example, for a price of US$ 1.45 pass amount = 145.
// See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
TotalAmount int64 `json:"total_amount"`
// Bot-specified invoice payload
InvoicePayload string `json:"invoice_payload"`
// Optional. Expiration date of the subscription, in Unix time; for recurring payments only
SubscriptionExpirationDate int64 `json:"subscription_expiration_date,omitempty"`
// Optional. True, if the payment is a recurring payment for a subscription
IsRecurring bool `json:"is_recurring,omitempty"`
// Optional. True, if the payment is the first payment for a subscription
IsFirstRecurring bool `json:"is_first_recurring,omitempty"`
// Optional. Identifier of the shipping option chosen by the user
ShippingOptionId string `json:"shipping_option_id,omitempty"`
// Optional. Order information provided by the user
OrderInfo *OrderInfo `json:"order_info,omitempty"`
// Telegram payment identifier
TelegramPaymentChargeId string `json:"telegram_payment_charge_id"`
// Provider payment identifier
ProviderPaymentChargeId string `json:"provider_payment_charge_id"`
}
SuccessfulPayment This object contains basic information about a successful payment.
type SwitchInlineQueryChosenChat ¶
type SwitchInlineQueryChosenChat struct {
// Optional. The default inline query to be inserted in the input field.
// If left empty, only the bot's username will be inserted
Query string `json:"query,omitempty"`
// Optional. True, if private chats with users can be chosen
AllowUserChats bool `json:"allow_user_chats,omitempty"`
// Optional. True, if private chats with bots can be chosen
AllowBotChats bool `json:"allow_bot_chats,omitempty"`
// Optional. True, if group and supergroup chats can be chosen
AllowGroupChats bool `json:"allow_group_chats,omitempty"`
// Optional. True, if channel chats can be chosen
AllowChannelChats bool `json:"allow_channel_chats,omitempty"`
}
SwitchInlineQueryChosenChat This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
type SyncedGroup ¶
type SyncedGroup struct {
// contains filtered or unexported fields
}
func (*SyncedGroup) Synced ¶
func (group *SyncedGroup) Synced(handler HandlerFunc) HandlerFunc
type TelegramAnimation ¶
type TelegramAnimation struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Video width as defined by the sender
Width int64 `json:"width"`
// Video height as defined by the sender
Height int64 `json:"height"`
// Duration of the video in seconds as defined by the sender
Duration int64 `json:"duration"`
// Optional. Animation thumbnail as defined by the sender
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
// Optional. Original animation filename as defined by the sender
FileName string `json:"file_name,omitempty"`
// Optional. MIME type of the file as defined by the sender
MimeType string `json:"mime_type,omitempty"`
// Optional. File size in bytes.
// It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
FileSize int64 `json:"file_size,omitempty"`
}
TelegramAnimation This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
func (*TelegramAnimation) Download ¶
func (impl *TelegramAnimation) Download(ctx context.Context, path string) error
func (*TelegramAnimation) DownloadTemp ¶
type TelegramAudio ¶
type TelegramAudio struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Duration of the audio in seconds as defined by the sender
Duration int64 `json:"duration"`
// Optional. Performer of the audio as defined by the sender or by audio tags
Performer string `json:"performer,omitempty"`
// Optional. Title of the audio as defined by the sender or by audio tags
Title string `json:"title,omitempty"`
// Optional. Original filename as defined by the sender
FileName string `json:"file_name,omitempty"`
// Optional. MIME type of the file as defined by the sender
MimeType string `json:"mime_type,omitempty"`
// Optional. File size in bytes.
// It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
FileSize int64 `json:"file_size,omitempty"`
// Optional. Thumbnail of the album cover to which the music file belongs
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
TelegramAudio This object represents an audio file to be treated as music by the Telegram clients.
func (*TelegramAudio) Download ¶
func (impl *TelegramAudio) Download(ctx context.Context, path string) error
func (*TelegramAudio) DownloadTemp ¶
type TelegramDocument ¶
type TelegramDocument struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Optional. Document thumbnail as defined by the sender
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
// Optional. Original filename as defined by the sender
FileName string `json:"file_name,omitempty"`
// Optional. MIME type of the file as defined by the sender
MimeType string `json:"mime_type,omitempty"`
// Optional. File size in bytes.
// It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
FileSize int64 `json:"file_size,omitempty"`
}
TelegramDocument This object represents a general file (as opposed to photos, voice messages and audio files).
func (*TelegramDocument) Download ¶
func (impl *TelegramDocument) Download(ctx context.Context, path string) error
func (*TelegramDocument) DownloadTemp ¶
type TelegramPhoto ¶
type TelegramPhoto []*PhotoSize
TelegramPhoto is wrapper around list of PhotoSize, the last in the list is the biggest picture.
func (TelegramPhoto) Download ¶
func (photo TelegramPhoto) Download(ctx context.Context, path string) error
func (TelegramPhoto) DownloadTemp ¶
func (TelegramPhoto) FileId ¶
func (photo TelegramPhoto) FileId() string
func (TelegramPhoto) FileSize ¶
func (photo TelegramPhoto) FileSize() int64
func (TelegramPhoto) FileUniqueId ¶
func (photo TelegramPhoto) FileUniqueId() string
func (TelegramPhoto) Height ¶
func (photo TelegramPhoto) Height() int64
func (TelegramPhoto) Width ¶
func (photo TelegramPhoto) Width() int64
type TelegramVideo ¶
type TelegramVideo struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Video width as defined by the sender
Width int64 `json:"width"`
// Video height as defined by the sender
Height int64 `json:"height"`
// Duration of the video in seconds as defined by the sender
Duration int64 `json:"duration"`
// Optional. Video thumbnail
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
// Optional. Original filename as defined by the sender
FileName string `json:"file_name,omitempty"`
// Optional. MIME type of the file as defined by the sender
MimeType string `json:"mime_type,omitempty"`
// Optional. File size in bytes.
// It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
FileSize int64 `json:"file_size,omitempty"`
}
TelegramVideo This object represents a video file.
func (*TelegramVideo) Download ¶
func (impl *TelegramVideo) Download(ctx context.Context, path string) error
func (*TelegramVideo) DownloadTemp ¶
type TextQuote ¶
type TextQuote struct {
// Text of the quoted part of a message that is replied to by the given message
Text string `json:"text"`
// Optional. Special entities that appear in the quote.
// Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.
Entities []*MessageEntity `json:"entities,omitempty"`
// Approximate quote position in the original message in UTF-16 code units as specified by the sender
Position int64 `json:"position"`
// Optional. True, if the quote was chosen manually by the message sender.
// Otherwise, the quote was added automatically by the server.
IsManual bool `json:"is_manual,omitempty"`
}
TextQuote This object contains information about the quoted part of a message that is replied to by the given message.
type TransactionPartner ¶
type TransactionPartner interface {
OptUser() *TransactionPartnerUser
OptAffiliateProgram() *TransactionPartnerAffiliateProgram
OptFragment() *TransactionPartnerFragment
OptTelegramAds() *TransactionPartnerTelegramAds
OptTelegramApi() *TransactionPartnerTelegramApi
OptOther() *TransactionPartnerOther
}
TransactionPartner This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of - TransactionPartnerUser - TransactionPartnerAffiliateProgram - TransactionPartnerFragment - TransactionPartnerTelegramAds - TransactionPartnerTelegramApi - TransactionPartnerOther
type TransactionPartnerAffiliateProgram ¶
type TransactionPartnerAffiliateProgram struct {
// Type of the transaction partner, always "affiliate_program"
Type string `json:"type"`
// Optional. Information about the bot that sponsored the affiliate program
SponsorUser *User `json:"sponsor_user,omitempty"`
// The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users
CommissionPerMille int64 `json:"commission_per_mille"`
}
TransactionPartnerAffiliateProgram Describes the affiliate program that issued the affiliate commission received via this transaction.
func (*TransactionPartnerAffiliateProgram) OptAffiliateProgram ¶
func (impl *TransactionPartnerAffiliateProgram) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
func (*TransactionPartnerAffiliateProgram) OptFragment ¶
func (impl *TransactionPartnerAffiliateProgram) OptFragment() *TransactionPartnerFragment
func (*TransactionPartnerAffiliateProgram) OptOther ¶
func (impl *TransactionPartnerAffiliateProgram) OptOther() *TransactionPartnerOther
func (*TransactionPartnerAffiliateProgram) OptTelegramAds ¶
func (impl *TransactionPartnerAffiliateProgram) OptTelegramAds() *TransactionPartnerTelegramAds
func (*TransactionPartnerAffiliateProgram) OptTelegramApi ¶
func (impl *TransactionPartnerAffiliateProgram) OptTelegramApi() *TransactionPartnerTelegramApi
func (*TransactionPartnerAffiliateProgram) OptUser ¶
func (impl *TransactionPartnerAffiliateProgram) OptUser() *TransactionPartnerUser
type TransactionPartnerFragment ¶
type TransactionPartnerFragment struct {
// Type of the transaction partner, always "fragment"
Type string `json:"type"`
// Optional. State of the transaction if the transaction is outgoing
WithdrawalState RevenueWithdrawalState `json:"withdrawal_state,omitempty"`
}
TransactionPartnerFragment Describes a withdrawal transaction with Fragment.
func (*TransactionPartnerFragment) OptAffiliateProgram ¶
func (impl *TransactionPartnerFragment) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
func (*TransactionPartnerFragment) OptFragment ¶
func (impl *TransactionPartnerFragment) OptFragment() *TransactionPartnerFragment
func (*TransactionPartnerFragment) OptOther ¶
func (impl *TransactionPartnerFragment) OptOther() *TransactionPartnerOther
func (*TransactionPartnerFragment) OptTelegramAds ¶
func (impl *TransactionPartnerFragment) OptTelegramAds() *TransactionPartnerTelegramAds
func (*TransactionPartnerFragment) OptTelegramApi ¶
func (impl *TransactionPartnerFragment) OptTelegramApi() *TransactionPartnerTelegramApi
func (*TransactionPartnerFragment) OptUser ¶
func (impl *TransactionPartnerFragment) OptUser() *TransactionPartnerUser
func (*TransactionPartnerFragment) UnmarshalJSON ¶
func (impl *TransactionPartnerFragment) UnmarshalJSON(data []byte) error
type TransactionPartnerOther ¶
type TransactionPartnerOther struct {
// Type of the transaction partner, always "other"
Type string `json:"type"`
}
TransactionPartnerOther Describes a transaction with an unknown source or recipient.
func (*TransactionPartnerOther) OptAffiliateProgram ¶
func (impl *TransactionPartnerOther) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
func (*TransactionPartnerOther) OptFragment ¶
func (impl *TransactionPartnerOther) OptFragment() *TransactionPartnerFragment
func (*TransactionPartnerOther) OptOther ¶
func (impl *TransactionPartnerOther) OptOther() *TransactionPartnerOther
func (*TransactionPartnerOther) OptTelegramAds ¶
func (impl *TransactionPartnerOther) OptTelegramAds() *TransactionPartnerTelegramAds
func (*TransactionPartnerOther) OptTelegramApi ¶
func (impl *TransactionPartnerOther) OptTelegramApi() *TransactionPartnerTelegramApi
func (*TransactionPartnerOther) OptUser ¶
func (impl *TransactionPartnerOther) OptUser() *TransactionPartnerUser
type TransactionPartnerTelegramAds ¶
type TransactionPartnerTelegramAds struct {
// Type of the transaction partner, always "telegram_ads"
Type string `json:"type"`
}
TransactionPartnerTelegramAds Describes a withdrawal transaction to the Telegram Ads platform.
func (*TransactionPartnerTelegramAds) OptAffiliateProgram ¶
func (impl *TransactionPartnerTelegramAds) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
func (*TransactionPartnerTelegramAds) OptFragment ¶
func (impl *TransactionPartnerTelegramAds) OptFragment() *TransactionPartnerFragment
func (*TransactionPartnerTelegramAds) OptOther ¶
func (impl *TransactionPartnerTelegramAds) OptOther() *TransactionPartnerOther
func (*TransactionPartnerTelegramAds) OptTelegramAds ¶
func (impl *TransactionPartnerTelegramAds) OptTelegramAds() *TransactionPartnerTelegramAds
func (*TransactionPartnerTelegramAds) OptTelegramApi ¶
func (impl *TransactionPartnerTelegramAds) OptTelegramApi() *TransactionPartnerTelegramApi
func (*TransactionPartnerTelegramAds) OptUser ¶
func (impl *TransactionPartnerTelegramAds) OptUser() *TransactionPartnerUser
type TransactionPartnerTelegramApi ¶
type TransactionPartnerTelegramApi struct {
// Type of the transaction partner, always "telegram_api"
Type string `json:"type"`
// The number of successful requests that exceeded regular limits and were therefore billed
RequestCount int64 `json:"request_count"`
}
TransactionPartnerTelegramApi Describes a transaction with payment for paid broadcasting.
func (*TransactionPartnerTelegramApi) OptAffiliateProgram ¶
func (impl *TransactionPartnerTelegramApi) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
func (*TransactionPartnerTelegramApi) OptFragment ¶
func (impl *TransactionPartnerTelegramApi) OptFragment() *TransactionPartnerFragment
func (*TransactionPartnerTelegramApi) OptOther ¶
func (impl *TransactionPartnerTelegramApi) OptOther() *TransactionPartnerOther
func (*TransactionPartnerTelegramApi) OptTelegramAds ¶
func (impl *TransactionPartnerTelegramApi) OptTelegramAds() *TransactionPartnerTelegramAds
func (*TransactionPartnerTelegramApi) OptTelegramApi ¶
func (impl *TransactionPartnerTelegramApi) OptTelegramApi() *TransactionPartnerTelegramApi
func (*TransactionPartnerTelegramApi) OptUser ¶
func (impl *TransactionPartnerTelegramApi) OptUser() *TransactionPartnerUser
type TransactionPartnerUser ¶
type TransactionPartnerUser struct {
// Type of the transaction partner, always "user"
Type string `json:"type"`
// Information about the user
User *User `json:"user"`
// Optional. Information about the affiliate that received a commission via this transaction
Affiliate *AffiliateInfo `json:"affiliate,omitempty"`
// Optional. Bot-specified invoice payload
InvoicePayload string `json:"invoice_payload,omitempty"`
// Optional. The duration of the paid subscription
SubscriptionPeriod int64 `json:"subscription_period,omitempty"`
// Optional. Information about the paid media bought by the user
PaidMedia []PaidMedia `json:"paid_media,omitempty"`
// Optional. Bot-specified paid media payload
PaidMediaPayload string `json:"paid_media_payload,omitempty"`
// Optional. The gift sent to the user by the bot
Gift *Gift `json:"gift,omitempty"`
}
TransactionPartnerUser Describes a transaction with a user.
func (*TransactionPartnerUser) OptAffiliateProgram ¶
func (impl *TransactionPartnerUser) OptAffiliateProgram() *TransactionPartnerAffiliateProgram
func (*TransactionPartnerUser) OptFragment ¶
func (impl *TransactionPartnerUser) OptFragment() *TransactionPartnerFragment
func (*TransactionPartnerUser) OptOther ¶
func (impl *TransactionPartnerUser) OptOther() *TransactionPartnerOther
func (*TransactionPartnerUser) OptTelegramAds ¶
func (impl *TransactionPartnerUser) OptTelegramAds() *TransactionPartnerTelegramAds
func (*TransactionPartnerUser) OptTelegramApi ¶
func (impl *TransactionPartnerUser) OptTelegramApi() *TransactionPartnerTelegramApi
func (*TransactionPartnerUser) OptUser ¶
func (impl *TransactionPartnerUser) OptUser() *TransactionPartnerUser
func (*TransactionPartnerUser) UnmarshalJSON ¶
func (impl *TransactionPartnerUser) UnmarshalJSON(data []byte) error
type Update ¶
type Update struct {
// The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially.
// This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order.
// If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
UpdateId int64 `json:"update_id"`
// Optional. New incoming message of any kind - text, photo, sticker, etc.
Message *Message `json:"message,omitempty"`
// Optional. New version of a message that is known to the bot and was edited.
// This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
EditedMessage *Message `json:"edited_message,omitempty"`
// Optional. New incoming channel post of any kind - text, photo, sticker, etc.
ChannelPost *Message `json:"channel_post,omitempty"`
// Optional. New version of a channel post that is known to the bot and was edited.
// This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
EditedChannelPost *Message `json:"edited_channel_post,omitempty"`
// Optional.
// The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot
BusinessConnection *BusinessConnection `json:"business_connection,omitempty"`
// Optional. New message from a connected business account
BusinessMessage *Message `json:"business_message,omitempty"`
// Optional. New version of a message from a connected business account
EditedBusinessMessage *Message `json:"edited_business_message,omitempty"`
// Optional. Messages were deleted from a connected business account
DeletedBusinessMessages *BusinessMessagesDeleted `json:"deleted_business_messages,omitempty"`
// Optional. A reaction to a message was changed by a user. The update isn't received for reactions set by bots.
// The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates.
MessageReaction *MessageReactionUpdated `json:"message_reaction,omitempty"`
// Optional. Reactions to a message with anonymous reactions were changed.
// The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates.
// The updates are grouped and can be sent with delay up to a few minutes.
MessageReactionCount *MessageReactionCountUpdated `json:"message_reaction_count,omitempty"`
// Optional. New incoming inline query
InlineQuery *InlineQuery `json:"inline_query,omitempty"`
// Optional. The result of an inline query that was chosen by a user and sent to their chat partner.
// Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"`
// Optional. New incoming callback query
CallbackQuery *CallbackQuery `json:"callback_query,omitempty"`
// Optional. New incoming shipping query. Only for invoices with flexible price
ShippingQuery *ShippingQuery `json:"shipping_query,omitempty"`
// Optional. New incoming pre-checkout query. Contains full information about checkout
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query,omitempty"`
// Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat
PurchasedPaidMedia *PaidMediaPurchased `json:"purchased_paid_media,omitempty"`
// Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot
Poll *Poll `json:"poll,omitempty"`
// Optional. A user changed their answer in a non-anonymous poll.
// Bots receive new votes only in polls that were sent by the bot itself.
PollAnswer *PollAnswer `json:"poll_answer,omitempty"`
// Optional. The bot's chat member status was updated in a chat.
// For private chats, this update is received only when the bot is blocked or unblocked by the user.
MyChatMember *ChatMemberUpdated `json:"my_chat_member,omitempty"`
// Optional. A chat member's status was updated in a chat.
// The bot must be an administrator in the chat and must explicitly specify "chat_member" in the list of allowed_updates to receive these updates.
ChatMember *ChatMemberUpdated `json:"chat_member,omitempty"`
// Optional. A request to join the chat has been sent.
// The bot must have the can_invite_users administrator right in the chat to receive these updates.
ChatJoinRequest *ChatJoinRequest `json:"chat_join_request,omitempty"`
// Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
ChatBoost *ChatBoostUpdated `json:"chat_boost,omitempty"`
// Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
RemovedChatBoost *ChatBoostRemoved `json:"removed_chat_boost,omitempty"`
}
Update This object represents an incoming update. At most one of the optional parameters can be present in any given update.
func GetUpdates ¶
func GetUpdates(ctx context.Context, opts ...*OptGetUpdates) ([]*Update, error)
GetUpdates Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
type User ¶
type User struct {
// Unique identifier for this user or bot.
// This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
Id int64 `json:"id"`
// True, if this user is a bot
IsBot bool `json:"is_bot"`
// User's or bot's first name
FirstName string `json:"first_name"`
// Optional. User's or bot's last name
LastName string `json:"last_name,omitempty"`
// Optional. User's or bot's username
Username string `json:"username,omitempty"`
// Optional. IETF language tag of the user's language
LanguageCode string `json:"language_code,omitempty"`
// Optional. True, if this user is a Telegram Premium user
IsPremium bool `json:"is_premium,omitempty"`
// Optional. True, if this user added the bot to the attachment menu
AddedToAttachmentMenu bool `json:"added_to_attachment_menu,omitempty"`
// Optional. True, if the bot can be invited to groups. Returned only in getMe.
CanJoinGroups bool `json:"can_join_groups,omitempty"`
// Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
CanReadAllGroupMessages bool `json:"can_read_all_group_messages,omitempty"`
// Optional. True, if the bot supports inline queries. Returned only in getMe.
SupportsInlineQueries bool `json:"supports_inline_queries,omitempty"`
// Optional. True, if the bot can be connected to a Telegram Business account to receive its messages.
// Returned only in getMe.
CanConnectToBusiness bool `json:"can_connect_to_business,omitempty"`
// Optional. True, if the bot has a main Web App. Returned only in getMe.
HasMainWebApp bool `json:"has_main_web_app,omitempty"`
}
User This object represents a Telegram user or bot.
type UserChatBoosts ¶
type UserChatBoosts struct {
// The list of boosts added to the chat by the user
Boosts []*ChatBoost `json:"boosts"`
}
UserChatBoosts This object represents a list of boosts added to a chat by a user.
func GetUserChatBoosts ¶
GetUserChatBoosts Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
type UserProfilePhotos ¶
type UserProfilePhotos struct {
// Total number of profile pictures the target user has
TotalCount int64 `json:"total_count"`
// Requested profile pictures (in up to 4 sizes each)
Photos []TelegramPhoto `json:"photos"`
}
UserProfilePhotos This object represent a user's profile pictures.
func GetUserProfilePhotos ¶
func GetUserProfilePhotos(ctx context.Context, userId int64, opts ...*OptGetUserProfilePhotos) (*UserProfilePhotos, error)
GetUserProfilePhotos Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
type UsersShared ¶
type UsersShared struct {
RequestId int64 `json:"request_id"`
Users []*SharedUser `json:"users"`
}
UsersShared This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.
type VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply ¶
type VariantInlineKeyboardMarkupReplyKeyboardMarkupReplyKeyboardRemoveForceReply interface {
// contains filtered or unexported methods
}
type Venue ¶
type Venue struct {
// Venue location. Can't be a live location
Location *Location `json:"location"`
// Name of the venue
Title string `json:"title"`
// Address of the venue
Address string `json:"address"`
// Optional. Foursquare identifier of the venue
FoursquareId string `json:"foursquare_id,omitempty"`
// Optional. Foursquare type of the venue.
// (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".)
FoursquareType string `json:"foursquare_type,omitempty"`
// Optional. Google Places identifier of the venue
GooglePlaceId string `json:"google_place_id,omitempty"`
// Optional. Google Places type of the venue. (See supported types.)
GooglePlaceType string `json:"google_place_type,omitempty"`
}
Venue This object represents a venue.
type Video ¶
type Video struct {
// Type of the result, must be video
Type string `json:"type" default:"video"`
// File to send. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
Media InputFile `json:"media"`
// Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
// The thumbnail should be in JPEG format and less than 200 kB in size.
// A thumbnail's width and height should not exceed 320.
// Ignored if the file is not uploaded using multipart/form-data.
// Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
// More information on Sending Files: https://core.telegram.org/bots/api#sending-files
// >> either: String
Thumbnail InputFile `json:"thumbnail,omitempty"`
// Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// Optional. Mode for parsing entities in the video caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
CaptionEntities []*MessageEntity `json:"caption_entities,omitempty"`
// Optional. Pass True, if the caption must be shown above the message media
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
// Optional. Video width
Width int64 `json:"width,omitempty"`
// Optional. Video height
Height int64 `json:"height,omitempty"`
// Optional. Video duration in seconds
Duration int64 `json:"duration,omitempty"`
// Optional. Pass True if the uploaded video is suitable for streaming
SupportsStreaming bool `json:"supports_streaming,omitempty"`
// Optional. Pass True if the video needs to be covered with a spoiler animation
HasSpoiler bool `json:"has_spoiler,omitempty"`
// Used for uploading media.
InputFile InputFile `json:"-"`
}
Video Represents a video to be sent.
func (*Video) OptAnimation ¶
func (*Video) OptDocument ¶
type VideoChatEnded ¶
type VideoChatEnded struct {
// Video chat duration in seconds
Duration int64 `json:"duration"`
}
VideoChatEnded This object represents a service message about a video chat ended in the chat.
type VideoChatParticipantsInvited ¶
type VideoChatParticipantsInvited struct {
// New members that were invited to the video chat
Users []*User `json:"users"`
}
VideoChatParticipantsInvited This object represents a service message about new members invited to a video chat.
type VideoChatScheduled ¶
type VideoChatScheduled struct {
// Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator
StartDate int64 `json:"start_date"`
}
VideoChatScheduled This object represents a service message about a video chat scheduled in the chat.
type VideoChatStarted ¶
type VideoChatStarted struct {
}
VideoChatStarted This object represents a service message about a video chat started in the chat. Currently holds no information.
type VideoNote ¶
type VideoNote struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Video width and height (diameter of the video message) as defined by the sender
Length int64 `json:"length"`
// Duration of the video in seconds as defined by the sender
Duration int64 `json:"duration"`
// Optional. Video thumbnail
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
// Optional. File size in bytes
FileSize int64 `json:"file_size,omitempty"`
}
VideoNote This object represents a video message (available in Telegram apps as of v.4.0).
type Voice ¶
type Voice struct {
// Identifier for this file, which can be used to download or reuse the file
FileId string `json:"file_id"`
// Unique identifier for this file, which is supposed to be the same over time and for different bots.
// Can't be used to download or reuse the file.
FileUniqueId string `json:"file_unique_id"`
// Duration of the audio in seconds as defined by the sender
Duration int64 `json:"duration"`
// Optional. MIME type of the file as defined by the sender
MimeType string `json:"mime_type,omitempty"`
// Optional. File size in bytes.
// It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it.
// But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
FileSize int64 `json:"file_size,omitempty"`
}
Voice This object represents a voice note.
type WebAppData ¶
type WebAppData struct {
// The data. Be aware that a bad client can send arbitrary data in this field.
Data string `json:"data"`
// Text of the web_app keyboard button from which the Web App was opened.
// Be aware that a bad client can send arbitrary data in this field.
ButtonText string `json:"button_text"`
}
WebAppData Describes data sent from a Web App to the bot.
type WebAppInfo ¶
type WebAppInfo struct {
// An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps
Url string `json:"url"`
}
WebAppInfo Describes a Web App.
type WebhookInfo ¶
type WebhookInfo struct {
// Webhook URL, may be empty if webhook is not set up
Url string `json:"url"`
// True, if a custom certificate was provided for webhook certificate checks
HasCustomCertificate bool `json:"has_custom_certificate"`
// Number of updates awaiting delivery
PendingUpdateCount int64 `json:"pending_update_count"`
// Optional. Currently used webhook IP address
IpAddress string `json:"ip_address,omitempty"`
// Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook
LastErrorDate int64 `json:"last_error_date,omitempty"`
// Optional.
// Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook
LastErrorMessage string `json:"last_error_message,omitempty"`
// Optional.
// Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters
LastSynchronizationErrorDate int64 `json:"last_synchronization_error_date,omitempty"`
// Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery
MaxConnections int64 `json:"max_connections,omitempty"`
// Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member
AllowedUpdates []string `json:"allowed_updates,omitempty"`
}
WebhookInfo Describes the current status of a webhook.
func GetWebhookInfo ¶
func GetWebhookInfo(ctx context.Context) (*WebhookInfo, error)
GetWebhookInfo Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
type WriteAccessAllowed ¶
type WriteAccessAllowed struct {
// Optional.
// True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess
FromRequest bool `json:"from_request,omitempty"`
// Optional. Name of the Web App, if the access was granted when the Web App was launched from a link
WebAppName string `json:"web_app_name,omitempty"`
// Optional. True, if the access was granted when the bot was added to the attachment or side menu
FromAttachmentMenu bool `json:"from_attachment_menu,omitempty"`
}
WriteAccessAllowed This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.