Documentation
¶
Index ¶
- Variables
- func EscapeMarkdown(s string) string
- func EscapeMarkdownUnescaped(s string) string
- func False() *bool
- func IsMigrateError(err error) bool
- func IsTooManyRequestsError(err error) bool
- func RandomString(n int) string
- func True() *bool
- type AddStickerToSetParams
- type AllowedUpdates
- type AnswerCallbackQueryParams
- type AnswerGuestQueryParams
- type AnswerInlineQueryParams
- type AnswerPreCheckoutQueryParams
- type AnswerShippingQueryParams
- type AnswerWebAppQueryParams
- type AnswerWidgetQueryParams
- type ApproveChatJoinRequestParams
- type ApproveSuggestedPostParams
- type BanChatMemberParams
- type BanChatSenderChatParams
- type Bot
- func (b *Bot) AddStickerToSet(ctx context.Context, params *AddStickerToSetParams) (bool, error)
- func (b *Bot) AnswerCallbackQuery(ctx context.Context, params *AnswerCallbackQueryParams) (bool, error)
- func (b *Bot) AnswerGuestQuery(ctx context.Context, params *AnswerGuestQueryParams) (*models.SentGuestMessage, error)
- func (b *Bot) AnswerInlineQuery(ctx context.Context, params *AnswerInlineQueryParams) (bool, error)
- func (b *Bot) AnswerPreCheckoutQuery(ctx context.Context, params *AnswerPreCheckoutQueryParams) (bool, error)
- func (b *Bot) AnswerShippingQuery(ctx context.Context, params *AnswerShippingQueryParams) (bool, error)
- func (b *Bot) AnswerWebAppQuery(ctx context.Context, params *AnswerWebAppQueryParams) (*models.SentWebAppMessage, error)
- func (b *Bot) AnswerWidgetQuery(ctx context.Context, params *AnswerWidgetQueryParams) (bool, error)
- func (b *Bot) ApproveChatJoinRequest(ctx context.Context, params *ApproveChatJoinRequestParams) (bool, error)
- func (b *Bot) ApproveSuggestedPost(ctx context.Context, params *ApproveSuggestedPostParams) (bool, error)
- func (b *Bot) BanChatMember(ctx context.Context, params *BanChatMemberParams) (bool, error)
- func (b *Bot) BanChatSenderChat(ctx context.Context, params *BanChatSenderChatParams) (bool, error)
- func (b *Bot) Close(ctx context.Context) (bool, error)
- func (b *Bot) CloseForumTopic(ctx context.Context, params *CloseForumTopicParams) (bool, error)
- func (b *Bot) CloseGeneralForumTopic(ctx context.Context, params *CloseGeneralForumTopicParams) (bool, error)
- func (b *Bot) ConvertGiftToStars(ctx context.Context, params *ConvertGiftToStarsParams) (bool, error)
- func (b *Bot) CopyMessage(ctx context.Context, params *CopyMessageParams) (*models.MessageID, error)
- func (b *Bot) CopyMessages(ctx context.Context, params *CopyMessagesParams) ([]models.MessageID, error)
- func (b *Bot) CreateChatInviteLink(ctx context.Context, params *CreateChatInviteLinkParams) (*models.ChatInviteLink, error)
- func (b *Bot) CreateChatSubscriptionInviteLink(ctx context.Context, params *CreateChatSubscriptionInviteLinkParams) (*models.ChatInviteLink, error)
- func (b *Bot) CreateForumTopic(ctx context.Context, params *CreateForumTopicParams) (*models.ForumTopic, error)
- func (b *Bot) CreateInvoiceLink(ctx context.Context, params *CreateInvoiceLinkParams) (string, error)
- func (b *Bot) CreateNewStickerSet(ctx context.Context, params *CreateNewStickerSetParams) (bool, error)
- func (b *Bot) DeclineChatJoinRequest(ctx context.Context, params *DeclineChatJoinRequestParams) (bool, error)
- func (b *Bot) DeclineSuggestedPost(ctx context.Context, params *DeclineSuggestedPostParams) (bool, error)
- func (b *Bot) DeleteAllMessageReactions(ctx context.Context, params *DeleteAllMessageReactionsParams) (bool, error)
- func (b *Bot) DeleteBusinessAccountGift(ctx context.Context, params *DeleteBusinessAccountGiftParams) (bool, error)
- func (b *Bot) DeleteBusinessMessages(ctx context.Context, params *DeleteBusinessMessagesParams) (bool, error)
- func (b *Bot) DeleteChatPhoto(ctx context.Context, params *DeleteChatPhotoParams) (bool, error)
- func (b *Bot) DeleteChatStickerSet(ctx context.Context, params *DeleteChatStickerSetParams) (bool, error)
- func (b *Bot) DeleteEphemeralMessage(ctx context.Context, params *DeleteEphemeralMessageParams) (bool, error)
- func (b *Bot) DeleteForumTopic(ctx context.Context, params *DeleteForumTopicParams) (bool, error)
- func (b *Bot) DeleteMessage(ctx context.Context, params *DeleteMessageParams) (bool, error)
- func (b *Bot) DeleteMessageReaction(ctx context.Context, params *DeleteMessageReactionParams) (bool, error)
- func (b *Bot) DeleteMessages(ctx context.Context, params *DeleteMessagesParams) (bool, error)
- func (b *Bot) DeleteMyCommands(ctx context.Context, params *DeleteMyCommandsParams) (bool, error)
- func (b *Bot) DeleteStickerFromSet(ctx context.Context, params *DeleteStickerFromSetParams) (bool, error)
- func (b *Bot) DeleteStickerSet(ctx context.Context, params *DeleteStickerSetParams) (bool, error)
- func (b *Bot) DeleteStory(ctx context.Context, params *DeleteStoryParams) (bool, error)
- func (b *Bot) DeleteWebhook(ctx context.Context, params *DeleteWebhookParams) (bool, error)
- func (b *Bot) EditChatInviteLink(ctx context.Context, params *EditChatInviteLinkParams) (*models.ChatInviteLink, error)
- func (b *Bot) EditChatSubscriptionInviteLink(ctx context.Context, params *EditChatSubscriptionInviteLinkParams) (*models.ChatInviteLink, error)
- func (b *Bot) EditEphemeralMessageCaption(ctx context.Context, params *EditEphemeralMessageCaptionParams) (bool, error)
- func (b *Bot) EditEphemeralMessageMedia(ctx context.Context, params *EditEphemeralMessageMediaParams) (bool, error)
- func (b *Bot) EditEphemeralMessageReplyMarkup(ctx context.Context, params *EditEphemeralMessageReplyMarkupParams) (bool, error)
- func (b *Bot) EditEphemeralMessageText(ctx context.Context, params *EditEphemeralMessageTextParams) (bool, error)
- func (b *Bot) EditForumTopic(ctx context.Context, params *EditForumTopicParams) (bool, error)
- func (b *Bot) EditGeneralForumTopic(ctx context.Context, params *EditGeneralForumTopicParams) (bool, error)
- func (b *Bot) EditMessageCaption(ctx context.Context, params *EditMessageCaptionParams) (*models.Message, error)
- func (b *Bot) EditMessageChecklist(ctx context.Context, params *EditMessageChecklistParams) (*models.Message, error)
- func (b *Bot) EditMessageLiveLocation(ctx context.Context, params *EditMessageLiveLocationParams) (*models.Message, error)
- func (b *Bot) EditMessageMedia(ctx context.Context, params *EditMessageMediaParams) (*models.Message, error)
- func (b *Bot) EditMessageReplyMarkup(ctx context.Context, params *EditMessageReplyMarkupParams) (*models.Message, error)
- func (b *Bot) EditMessageText(ctx context.Context, params *EditMessageTextParams) (*models.Message, error)
- func (b *Bot) EditMessageWidgetData(ctx context.Context, params *EditMessageWidgetDataParams) (bool, error)
- func (b *Bot) EditSharedWidgetData(ctx context.Context, params *EditSharedWidgetDataParams) (bool, error)
- func (b *Bot) EditStory(ctx context.Context, params *EditStoryParams) (*models.Story, error)
- func (b *Bot) EditUserStarSubscription(ctx context.Context, params *EditUserStarSubscriptionParams) (bool, error)
- func (b *Bot) ExportChatInviteLink(ctx context.Context, params *ExportChatInviteLinkParams) (string, error)
- func (b *Bot) FileDownloadLink(f *models.File) string
- func (b *Bot) ForwardMessage(ctx context.Context, params *ForwardMessageParams) (*models.Message, error)
- func (b *Bot) ForwardMessages(ctx context.Context, params *ForwardMessagesParams) ([]models.MessageID, error)
- func (b *Bot) GetAvailableGifts(ctx context.Context) (*models.Gifts, error)
- func (b *Bot) GetBusinessAccountGifts(ctx context.Context, params *GetBusinessAccountGiftsParams) (*models.OwnedGifts, error)
- func (b *Bot) GetBusinessAccountStarBalance(ctx context.Context, params *GetBusinessAccountStarBalanceParams) (*models.StarAmount, error)
- func (b *Bot) GetBusinessConnection(ctx context.Context, params *GetBusinessConnectionParams) (*models.BusinessConnection, error)
- func (b *Bot) GetChat(ctx context.Context, params *GetChatParams) (*models.ChatFullInfo, error)
- func (b *Bot) GetChatAdministrators(ctx context.Context, params *GetChatAdministratorsParams) ([]models.ChatMember, error)
- func (b *Bot) GetChatGifts(ctx context.Context, params *GetChatGiftsParams) (*models.OwnedGifts, error)
- func (b *Bot) GetChatMember(ctx context.Context, params *GetChatMemberParams) (*models.ChatMember, error)
- func (b *Bot) GetChatMemberCount(ctx context.Context, params *GetChatMemberCountParams) (int, error)
- func (b *Bot) GetChatMenuButton(ctx context.Context, params *GetChatMenuButtonParams) (models.MenuButton, error)
- func (b *Bot) GetChatShareThemeBackdrops(ctx context.Context) (*models.ChatShareThemeBackdrops, error)
- func (b *Bot) GetCustomEmojiStickers(ctx context.Context, params *GetCustomEmojiStickersParams) ([]*models.Sticker, error)
- func (b *Bot) GetFile(ctx context.Context, params *GetFileParams) (*models.File, error)
- func (b *Bot) GetForumTopicIconStickers(ctx context.Context) ([]*models.Sticker, error)
- func (b *Bot) GetGameHighScores(ctx context.Context, params *GetGameHighScoresParams) ([]*models.GameHighScore, error)
- func (b *Bot) GetManagedBotAccessSettings(ctx context.Context, params *GetManagedBotAccessSettingsParams) (*models.BotAccessSettings, error)
- func (b *Bot) GetManagedBotToken(ctx context.Context, params *GetManagedBotTokenParams) (string, error)
- func (b *Bot) GetMe(ctx context.Context) (*models.User, error)
- func (b *Bot) GetMyCommands(ctx context.Context, params *GetMyCommandsParams) ([]models.BotCommand, error)
- func (b *Bot) GetMyDefaultAdministratorRights(ctx context.Context, params *GetMyDefaultAdministratorRightsParams) (*models.ChatAdministratorRights, error)
- func (b *Bot) GetMyDescription(ctx context.Context, params *GetMyDescriptionParams) (models.BotDescription, error)
- func (b *Bot) GetMyName(ctx context.Context, params *GetMyNameParams) (models.BotName, error)
- func (b *Bot) GetMyShortDescription(ctx context.Context, params *GetMyShortDescriptionParams) (models.BotShortDescription, error)
- func (b *Bot) GetMyStarBalance(ctx context.Context) (*models.StarAmount, error)
- func (b *Bot) GetStarTransactions(ctx context.Context, params *GetStarTransactionsParams) (*models.StarTransactions, error)
- func (b *Bot) GetStickerSet(ctx context.Context, params *GetStickerSetParams) (*models.StickerSet, error)
- func (b *Bot) GetUniqueGift(ctx context.Context, params *GetUniqueGiftParams) (*models.UniqueGift, error)
- func (b *Bot) GetUserChatBoosts(ctx context.Context, params *GetUserChatBoostsParams) (*models.UserChatBoosts, error)
- func (b *Bot) GetUserGifts(ctx context.Context, params *GetUserGiftsParams) (*models.OwnedGifts, error)
- func (b *Bot) GetUserPersonalChatMessages(ctx context.Context, params *GetUserPersonalChatMessagesParams) ([]models.Message, error)
- func (b *Bot) GetUserProfileAudios(ctx context.Context, params *GetUserProfileAudiosParams) (*models.UserProfileAudios, error)
- func (b *Bot) GetUserProfilePhotos(ctx context.Context, params *GetUserProfilePhotosParams) (*models.UserProfilePhotos, error)
- func (b *Bot) GetWebhookInfo(ctx context.Context) (*models.WebhookInfo, error)
- func (b *Bot) GiftPremiumSubscription(ctx context.Context, params *GiftPremiumSubscriptionParams) (bool, error)
- func (b *Bot) HideGeneralForumTopic(ctx context.Context, params *HideGeneralForumTopicParams) (bool, error)
- func (b *Bot) ID() int64
- func (b *Bot) LeaveChat(ctx context.Context, params *LeaveChatParams) (bool, error)
- func (b *Bot) Logout(ctx context.Context) (bool, error)
- func (b *Bot) PinChatMessage(ctx context.Context, params *PinChatMessageParams) (bool, error)
- func (b *Bot) PostStory(ctx context.Context, params *PostStoryParams) (*models.Story, error)
- func (b *Bot) ProcessUpdate(ctx context.Context, upd *models.Update)
- func (b *Bot) PromoteChatMember(ctx context.Context, params *PromoteChatMemberParams) (bool, error)
- func (b *Bot) ReadBusinessMessage(ctx context.Context, params *ReadBusinessMessageParams) (bool, error)
- func (b *Bot) RefundStarPayment(ctx context.Context, params *RefundStarPaymentParams) (bool, error)
- func (b *Bot) RegisterHandler(handlerType HandlerType, pattern string, matchType MatchType, f HandlerFunc, ...) string
- func (b *Bot) RegisterHandlerInlineQuery(f HandlerFunc, m ...Middleware) string
- func (b *Bot) RegisterHandlerMatchFunc(matchFunc MatchFunc, f HandlerFunc, m ...Middleware) string
- func (b *Bot) RegisterHandlerRegexp(handlerType HandlerType, re *regexp.Regexp, f HandlerFunc, m ...Middleware) string
- func (b *Bot) RemoveBusinessAccountProfilePhoto(ctx context.Context, params *RemoveBusinessAccountProfilePhotoParams) (bool, error)
- func (b *Bot) RemoveChatVerification(ctx context.Context, params *RemoveChatVerificationParams) (bool, error)
- func (b *Bot) RemoveMyProfilePhoto(ctx context.Context) (bool, error)
- func (b *Bot) RemoveUserVerification(ctx context.Context, params *RemoveUserVerificationParams) (bool, error)
- func (b *Bot) ReopenForumTopic(ctx context.Context, params *ReopenForumTopicParams) (bool, error)
- func (b *Bot) ReopenGeneralForumTopic(ctx context.Context, params *ReopenGeneralForumTopicParams) (bool, error)
- func (b *Bot) ReplaceManagedBotToken(ctx context.Context, params *ReplaceManagedBotTokenParams) (string, error)
- func (b *Bot) ReplaceStickerInSet(ctx context.Context, params *ReplaceStickerInSetParams) (bool, error)
- func (b *Bot) RepostStory(ctx context.Context, params *RepostStoryParams) (*models.Story, error)
- func (b *Bot) RestrictChatMember(ctx context.Context, params *RestrictChatMemberParams) (bool, error)
- func (b *Bot) RevokeChatInviteLink(ctx context.Context, params *RevokeChatInviteLinkParams) (*models.ChatInviteLink, error)
- func (b *Bot) SavePreparedInlineMessage(ctx context.Context, params *SavePreparedInlineMessageParams) (*models.PreparedInlineMessage, error)
- func (b *Bot) SavePreparedKeyboardButton(ctx context.Context, params *SavePreparedKeyboardButtonParams) (*models.PreparedKeyboardButton, error)
- func (b *Bot) SendAnimation(ctx context.Context, params *SendAnimationParams) (*models.Message, error)
- func (b *Bot) SendAudio(ctx context.Context, params *SendAudioParams) (*models.Message, error)
- func (b *Bot) SendChatAction(ctx context.Context, params *SendChatActionParams) (bool, error)
- func (b *Bot) SendChecklist(ctx context.Context, params *SendChecklistParams) (*models.Message, error)
- func (b *Bot) SendContact(ctx context.Context, params *SendContactParams) (*models.Message, error)
- func (b *Bot) SendDice(ctx context.Context, params *SendDiceParams) (*models.Message, error)
- func (b *Bot) SendDocument(ctx context.Context, params *SendDocumentParams) (*models.Message, error)
- func (b *Bot) SendGame(ctx context.Context, params *SendGameParams) (*models.Message, error)
- func (b *Bot) SendGift(ctx context.Context, params *SendGiftParams) (bool, error)
- func (b *Bot) SendInvoice(ctx context.Context, params *SendInvoiceParams) (*models.Message, error)
- func (b *Bot) SendLivePhoto(ctx context.Context, params *SendLivePhotoParams) (*models.Message, error)
- func (b *Bot) SendLocation(ctx context.Context, params *SendLocationParams) (*models.Message, error)
- func (b *Bot) SendMediaGroup(ctx context.Context, params *SendMediaGroupParams) ([]*models.Message, error)
- func (b *Bot) SendMessage(ctx context.Context, params *SendMessageParams) (*models.Message, error)
- func (b *Bot) SendMessageDraft(ctx context.Context, params *SendMessageDraftParams) (bool, error)
- func (b *Bot) SendPaidMedia(ctx context.Context, params *SendPaidMediaParams) (*models.Message, error)
- func (b *Bot) SendPhoto(ctx context.Context, params *SendPhotoParams) (*models.Message, error)
- func (b *Bot) SendPoll(ctx context.Context, params *SendPollParams) (*models.Message, error)
- func (b *Bot) SendRichMessage(ctx context.Context, params *SendRichMessageParams) (*models.Message, error)
- func (b *Bot) SendRichMessageDraft(ctx context.Context, params *SendRichMessageDraftParams) (bool, error)
- func (b *Bot) SendSharedWidget(ctx context.Context, params *SendSharedWidgetParams) (*models.Message, error)
- func (b *Bot) SendSticker(ctx context.Context, params *SendStickerParams) (*models.Message, error)
- func (b *Bot) SendVenue(ctx context.Context, params *SendVenueParams) (*models.Message, error)
- func (b *Bot) SendVideo(ctx context.Context, params *SendVideoParams) (*models.Message, error)
- func (b *Bot) SendVideoNote(ctx context.Context, params *SendVideoNoteParams) (*models.Message, error)
- func (b *Bot) SendVoice(ctx context.Context, params *SendVoiceParams) (*models.Message, error)
- func (b *Bot) SendWidget(ctx context.Context, params *SendWidgetParams) (*models.Message, error)
- func (b *Bot) SetBusinessAccountBio(ctx context.Context, params *SetBusinessAccountBioParams) (bool, error)
- func (b *Bot) SetBusinessAccountGiftSettings(ctx context.Context, params *SetBusinessAccountGiftSettingsParams) (bool, error)
- func (b *Bot) SetBusinessAccountName(ctx context.Context, params *SetBusinessAccountNameParams) (bool, error)
- func (b *Bot) SetBusinessAccountProfilePhoto(ctx context.Context, params *SetBusinessAccountProfilePhotoParams) (bool, error)
- func (b *Bot) SetBusinessAccountUsername(ctx context.Context, params *SetBusinessAccountUsernameParams) (bool, error)
- func (b *Bot) SetChatAdministratorCustomTitle(ctx context.Context, params *SetChatAdministratorCustomTitleParams) (bool, error)
- func (b *Bot) SetChatDescription(ctx context.Context, params *SetChatDescriptionParams) (bool, error)
- func (b *Bot) SetChatMemberTag(ctx context.Context, params *SetChatMemberTagParams) (bool, error)
- func (b *Bot) SetChatMenuButton(ctx context.Context, params *SetChatMenuButtonParams) (bool, error)
- func (b *Bot) SetChatPermissions(ctx context.Context, params *SetChatPermissionsParams) (bool, error)
- func (b *Bot) SetChatPhoto(ctx context.Context, params *SetChatPhotoParams) (bool, error)
- func (b *Bot) SetChatStickerSet(ctx context.Context, params *SetChatStickerSetParams) (bool, error)
- func (b *Bot) SetChatTitle(ctx context.Context, params *SetChatTitleParams) (bool, error)
- func (b *Bot) SetCustomEmojiStickerSetThumbnail(ctx context.Context, params *SetCustomEmojiStickerSetThumbnailParams) (bool, error)
- func (b *Bot) SetGameScore(ctx context.Context, params *SetGameScoreParams) (*models.Message, error)
- func (b *Bot) SetManagedBotAccessSettings(ctx context.Context, params *SetManagedBotAccessSettingsParams) (bool, error)
- func (b *Bot) SetMessageReaction(ctx context.Context, params *SetMessageReactionParams) (bool, error)
- func (b *Bot) SetMyCommands(ctx context.Context, params *SetMyCommandsParams) (bool, error)
- func (b *Bot) SetMyDefaultAdministratorRights(ctx context.Context, params *SetMyDefaultAdministratorRightsParams) (bool, error)
- func (b *Bot) SetMyDescription(ctx context.Context, params *SetMyDescriptionParams) (bool, error)
- func (b *Bot) SetMyName(ctx context.Context, params *SetMyNameParams) (bool, error)
- func (b *Bot) SetMyProfilePhoto(ctx context.Context, params *SetMyProfilePhotoParams) (bool, error)
- func (b *Bot) SetMyShortDescription(ctx context.Context, params *SetMyShortDescriptionParams) (bool, error)
- func (b *Bot) SetPassportDataErrors(ctx context.Context, params *SetPassportDataErrorsParams) (bool, error)
- func (b *Bot) SetStickerEmojiList(ctx context.Context, params *SetStickerEmojiListParams) (bool, error)
- func (b *Bot) SetStickerKeywords(ctx context.Context, params *SetStickerKeywordsParams) (bool, error)
- func (b *Bot) SetStickerMaskPosition(ctx context.Context, params *SetStickerMaskPositionParams) (bool, error)
- func (b *Bot) SetStickerPositionInSet(ctx context.Context, params *SetStickerPositionInSetParams) (bool, error)
- func (b *Bot) SetStickerSetThumbnail(ctx context.Context, params *SetStickerSetThumbnailParams) (bool, error)
- func (b *Bot) SetStickerSetTitle(ctx context.Context, params *SetStickerSetTitleParams) (bool, error)
- func (b *Bot) SetToken(token string)
- func (b *Bot) SetUserEmojiStatus(ctx context.Context, params *SetUserEmojiStatusParams) (bool, error)
- func (b *Bot) SetWebhook(ctx context.Context, params *SetWebhookParams) (bool, error)
- func (b *Bot) Start(ctx context.Context)
- func (b *Bot) StartWebhook(ctx context.Context)
- func (b *Bot) StopMessageLiveLocation(ctx context.Context, params *StopMessageLiveLocationParams) (*models.Message, error)
- func (b *Bot) StopPoll(ctx context.Context, params *StopPollParams) (*models.Poll, error)
- func (b *Bot) Token() string
- func (b *Bot) TransferBusinessAccountStars(ctx context.Context, params *TransferBusinessAccountStarsParams) (bool, error)
- func (b *Bot) TransferGift(ctx context.Context, params *TransferGiftParams) (bool, error)
- func (b *Bot) UnbanChatMember(ctx context.Context, params *UnbanChatMemberParams) (bool, error)
- func (b *Bot) UnbanChatSenderChat(ctx context.Context, params *UnbanChatSenderChatParams) (bool, error)
- func (b *Bot) UnhideGeneralForumTopic(ctx context.Context, params *UnhideGeneralForumTopicParams) (bool, error)
- func (b *Bot) UnpinAllChatMessages(ctx context.Context, params *UnpinAllChatMessagesParams) (bool, error)
- func (b *Bot) UnpinAllForumTopicMessages(ctx context.Context, params *UnpinAllForumTopicMessagesParams) (bool, error)
- func (b *Bot) UnpinAllGeneralForumTopicMessages(ctx context.Context, params *UnpinAllGeneralForumTopicMessagesParams) (bool, error)
- func (b *Bot) UnpinChatMessage(ctx context.Context, params *UnpinChatMessageParams) (bool, error)
- func (b *Bot) UnregisterHandler(id string)
- func (b *Bot) UpgradeGift(ctx context.Context, params *UpgradeGiftParams) (bool, error)
- func (b *Bot) UploadStickerFile(ctx context.Context, params *UploadStickerFileParams) (*models.File, error)
- func (b *Bot) VerifyChat(ctx context.Context, params *VerifyChatParams) (bool, error)
- func (b *Bot) VerifyUser(ctx context.Context, params *VerifyUserParams) (bool, error)
- func (b *Bot) WebhookHandler() http.HandlerFunc
- func (b *Bot) WebhookReply(ctx context.Context, method string, params any) error
- func (b *Bot) WebhookReplyHandler() http.HandlerFunc
- type CloseForumTopicParams
- type CloseGeneralForumTopicParams
- type ConvertGiftToStarsParams
- type CopyMessageParams
- type CopyMessagesParams
- type CreateChatInviteLinkParams
- type CreateChatSubscriptionInviteLinkParams
- type CreateForumTopicParams
- type CreateInvoiceLinkParams
- type CreateNewStickerSetParams
- type DebugHandler
- type DeclineChatJoinRequestParams
- type DeclineSuggestedPostParams
- type DeleteAllMessageReactionsParams
- type DeleteBusinessAccountGiftParams
- type DeleteBusinessMessagesParams
- type DeleteChatPhotoParams
- type DeleteChatStickerSetParams
- type DeleteEphemeralMessageParams
- type DeleteForumTopicParams
- type DeleteMessageParams
- type DeleteMessageReactionParams
- type DeleteMessagesParams
- type DeleteMyCommandsParams
- type DeleteStickerFromSetParams
- type DeleteStickerSetParams
- type DeleteStoryParams
- type DeleteWebhookParams
- type EditChatInviteLinkParams
- type EditChatSubscriptionInviteLinkParams
- type EditEphemeralMessageCaptionParams
- type EditEphemeralMessageMediaParams
- type EditEphemeralMessageReplyMarkupParams
- type EditEphemeralMessageTextParams
- type EditForumTopicParams
- type EditGeneralForumTopicParams
- type EditMessageCaptionParams
- type EditMessageChecklistParams
- type EditMessageLiveLocationParams
- type EditMessageMediaParams
- type EditMessageReplyMarkupParams
- type EditMessageTextParams
- type EditMessageWidgetDataParams
- type EditSharedWidgetDataParams
- type EditStoryParams
- type EditUserStarSubscriptionParams
- type ErrorsHandler
- type ExportChatInviteLinkParams
- type ForwardMessageParams
- type ForwardMessagesParams
- type GetBusinessAccountGiftsParams
- type GetBusinessAccountStarBalanceParams
- type GetBusinessConnectionParams
- type GetChatAdministratorsParams
- type GetChatGiftsParams
- type GetChatMemberCountParams
- type GetChatMemberParams
- type GetChatMenuButtonParams
- type GetChatParams
- type GetCustomEmojiStickersParams
- type GetFileParams
- type GetGameHighScoresParams
- type GetManagedBotAccessSettingsParams
- type GetManagedBotTokenParams
- type GetMyCommandsParams
- type GetMyDefaultAdministratorRightsParams
- type GetMyDescriptionParams
- type GetMyNameParams
- type GetMyShortDescriptionParams
- type GetStarTransactionsParams
- type GetStickerSetParams
- type GetUniqueGiftParams
- type GetUserChatBoostsParams
- type GetUserGiftsParams
- type GetUserPersonalChatMessagesParams
- type GetUserProfileAudiosParams
- type GetUserProfilePhotosParams
- type GiftPremiumSubscriptionParams
- type HandlerFunc
- type HandlerType
- type HideGeneralForumTopicParams
- type HttpClient
- type LeaveChatParams
- type MatchFunc
- type MatchType
- type Middleware
- type MigrateError
- type Option
- func UseTestEnvironment() Option
- func WithAllowedUpdates(params AllowedUpdates) Option
- func WithCallbackQueryDataHandler(pattern string, matchType MatchType, handler HandlerFunc) Option
- func WithCheckInitTimeout(timeout time.Duration) Option
- func WithDebug() Option
- func WithDebugHandler(handler DebugHandler) Option
- func WithDefaultHandler(handler HandlerFunc) Option
- func WithErrorsHandler(handler ErrorsHandler) Option
- func WithHTTPClient(pollTimeout time.Duration, client HttpClient) Option
- func WithInitialOffset(offset int64) Option
- func WithMessageTextHandler(pattern string, matchType MatchType, handler HandlerFunc) Option
- func WithMiddlewares(middlewares ...Middleware) Option
- func WithNotAsyncHandlers() Option
- func WithPhotoCaptionHandler(pattern string, matchType MatchType, handler HandlerFunc) Option
- func WithServerURL(serverURL string) Option
- func WithSkipGetMe() Option
- func WithUpdatesChannelCap(cap int) Option
- func WithWebhookSecretToken(webhookSecretToken string) Option
- func WithWorkers(workers int) Option
- type PinChatMessageParams
- type PostStoryParams
- type PromoteChatMemberParams
- type ReadBusinessMessageParams
- type RefundStarPaymentParams
- type RemoveBusinessAccountProfilePhotoParams
- type RemoveChatVerificationParams
- type RemoveUserVerificationParams
- type ReopenForumTopicParams
- type ReopenGeneralForumTopicParams
- type ReplaceManagedBotTokenParams
- type ReplaceStickerInSetParams
- type RepostStoryParams
- type RestrictChatMemberParams
- type RevokeChatInviteLinkParams
- type SavePreparedInlineMessageParams
- type SavePreparedKeyboardButtonParams
- type SendAnimationParams
- type SendAudioParams
- type SendChatActionParams
- type SendChecklistParams
- type SendContactParams
- type SendDiceParams
- type SendDocumentParams
- type SendGameParams
- type SendGiftParams
- type SendInvoiceParams
- type SendLivePhotoParams
- type SendLocationParams
- type SendMediaGroupParams
- type SendMessageDraftParams
- type SendMessageParams
- type SendPaidMediaParams
- type SendPhotoParams
- type SendPollParams
- type SendRichMessageDraftParams
- type SendRichMessageParams
- type SendSharedWidgetParams
- type SendStickerParams
- type SendVenueParams
- type SendVideoNoteParams
- type SendVideoParams
- type SendVoiceParams
- type SendWidgetParams
- type SetBusinessAccountBioParams
- type SetBusinessAccountGiftSettingsParams
- type SetBusinessAccountNameParams
- type SetBusinessAccountProfilePhotoParams
- type SetBusinessAccountUsernameParams
- type SetChatAdministratorCustomTitleParams
- type SetChatDescriptionParams
- type SetChatMemberTagParams
- type SetChatMenuButtonParams
- type SetChatPermissionsParams
- type SetChatPhotoParams
- type SetChatStickerSetParams
- type SetChatTitleParams
- type SetCustomEmojiStickerSetThumbnailParams
- type SetGameScoreParams
- type SetManagedBotAccessSettingsParams
- type SetMessageReactionParams
- type SetMyCommandsParams
- type SetMyDefaultAdministratorRightsParams
- type SetMyDescriptionParams
- type SetMyNameParams
- type SetMyProfilePhotoParams
- type SetMyShortDescriptionParams
- type SetPassportDataErrorsParams
- type SetStickerEmojiListParams
- type SetStickerKeywordsParams
- type SetStickerMaskPositionParams
- type SetStickerPositionInSetParams
- type SetStickerSetThumbnailParams
- type SetStickerSetTitleParams
- type SetUserEmojiStatusParams
- type SetWebhookParams
- type StopMessageLiveLocationParams
- type StopPollParams
- type TooManyRequestsError
- type TransferBusinessAccountStarsParams
- type TransferGiftParams
- type UnbanChatMemberParams
- type UnbanChatSenderChatParams
- type UnhideGeneralForumTopicParams
- type UnpinAllChatMessagesParams
- type UnpinAllForumTopicMessagesParams
- type UnpinAllGeneralForumTopicMessagesParams
- type UnpinChatMessageParams
- type UpgradeGiftParams
- type UploadStickerFileParams
- type VerifyChatParams
- type VerifyUserParams
- type WebAppUser
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EscapeMarkdown ¶
EscapeMarkdown escapes special symbols for Telegram MarkdownV2 syntax
func EscapeMarkdownUnescaped ¶ added in v0.4.1
EscapeMarkdownUnescaped escapes unescaped special symbols for Telegram Markdown v2 syntax
func IsMigrateError ¶ added in v1.2.1
func IsTooManyRequestsError ¶ added in v1.2.1
func RandomString ¶
RandomString returns random a-zA-Z string with n length
Types ¶
type AddStickerToSetParams ¶
type AddStickerToSetParams struct {
UserID int64 `json:"user_id"`
Name string `json:"name"`
Sticker models.InputSticker `json:"sticker"`
}
type AllowedUpdates ¶ added in v1.1.5
type AllowedUpdates []string
type AnswerGuestQueryParams ¶ added in v1.21.0
type AnswerGuestQueryParams struct {
GuestQueryID string `json:"guest_query_id"`
Result models.InlineQueryResult `json:"result"`
}
type AnswerInlineQueryParams ¶
type AnswerInlineQueryParams struct {
InlineQueryID string `json:"inline_query_id"`
Results []models.InlineQueryResult `json:"results"`
CacheTime int `json:"cache_time,omitempty"`
IsPersonal bool `json:"is_personal,omitempty"`
NextOffset string `json:"next_offset,omitempty"`
Button *models.InlineQueryResultsButton `json:"button,omitempty"`
}
type AnswerShippingQueryParams ¶
type AnswerShippingQueryParams struct {
ShippingQueryID string `json:"shipping_query_id"`
OK bool `json:"ok"`
ShippingOptions []models.ShippingOption `json:"shipping_options,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
}
type AnswerWebAppQueryParams ¶
type AnswerWebAppQueryParams struct {
WebAppQueryID string `json:"web_app_query_id"`
Result models.InlineQueryResult `json:"result"`
}
type AnswerWidgetQueryParams ¶ added in v1.28.0
type AnswerWidgetQueryParams struct {
WidgetQueryID string `json:"widget_query_id"`
Data string `json:"data,omitempty"`
}
AnswerWidgetQueryParams https://core.telegram.org/bots/api#answerwidgetquery
type ApproveSuggestedPostParams ¶ added in v1.17.0
type ApproveSuggestedPostParams struct {
ChatID int64 `json:"chat_id"`
MessageID int `json:"message_id"`
SendDate int `json:"send_date,omitempty"`
}
ApproveSuggestedPostParams https://core.telegram.org/bots/api#approvesuggestedpost
type BanChatMemberParams ¶
type BanChatSenderChatParams ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot represents Telegram Bot main object
func (*Bot) AddStickerToSet ¶
AddStickerToSet https://core.telegram.org/bots/api#addstickertoset
func (*Bot) AnswerCallbackQuery ¶
func (b *Bot) AnswerCallbackQuery(ctx context.Context, params *AnswerCallbackQueryParams) (bool, error)
AnswerCallbackQuery https://core.telegram.org/bots/api#answercallbackquery
func (*Bot) AnswerGuestQuery ¶ added in v1.21.0
func (b *Bot) AnswerGuestQuery(ctx context.Context, params *AnswerGuestQueryParams) (*models.SentGuestMessage, error)
func (*Bot) AnswerInlineQuery ¶
AnswerInlineQuery https://core.telegram.org/bots/api#answerinlinequery
func (*Bot) AnswerPreCheckoutQuery ¶
func (b *Bot) AnswerPreCheckoutQuery(ctx context.Context, params *AnswerPreCheckoutQueryParams) (bool, error)
AnswerPreCheckoutQuery https://core.telegram.org/bots/api#answerprecheckoutquery
func (*Bot) AnswerShippingQuery ¶
func (b *Bot) AnswerShippingQuery(ctx context.Context, params *AnswerShippingQueryParams) (bool, error)
AnswerShippingQuery https://core.telegram.org/bots/api#answershippingquery
func (*Bot) AnswerWebAppQuery ¶
func (b *Bot) AnswerWebAppQuery(ctx context.Context, params *AnswerWebAppQueryParams) (*models.SentWebAppMessage, error)
AnswerWebAppQuery https://core.telegram.org/bots/api#answerwebappquery
func (*Bot) AnswerWidgetQuery ¶ added in v1.28.0
AnswerWidgetQuery https://core.telegram.org/bots/api#answerwidgetquery
func (*Bot) ApproveChatJoinRequest ¶
func (b *Bot) ApproveChatJoinRequest(ctx context.Context, params *ApproveChatJoinRequestParams) (bool, error)
ApproveChatJoinRequest https://core.telegram.org/bots/api#approvechatjoinrequest
func (*Bot) ApproveSuggestedPost ¶ added in v1.17.0
func (b *Bot) ApproveSuggestedPost(ctx context.Context, params *ApproveSuggestedPostParams) (bool, error)
ApproveSuggestedPost https://core.telegram.org/bots/api#approvesuggestedpost
func (*Bot) BanChatMember ¶
BanChatMember https://core.telegram.org/bots/api#banchatmember
func (*Bot) BanChatSenderChat ¶
BanChatSenderChat https://core.telegram.org/bots/api#banchatsenderchat
func (*Bot) CloseForumTopic ¶ added in v0.3.1
CloseForumTopic https://core.telegram.org/bots/api#closeforumtopic
func (*Bot) CloseGeneralForumTopic ¶ added in v0.3.4
func (b *Bot) CloseGeneralForumTopic(ctx context.Context, params *CloseGeneralForumTopicParams) (bool, error)
CloseGeneralForumTopic https://core.telegram.org/bots/api#closegeneralforumtopic
func (*Bot) ConvertGiftToStars ¶ added in v1.15.0
func (b *Bot) ConvertGiftToStars(ctx context.Context, params *ConvertGiftToStarsParams) (bool, error)
ConvertGiftToStars https://core.telegram.org/bots/api#convertgifttostars
func (*Bot) CopyMessage ¶
func (b *Bot) CopyMessage(ctx context.Context, params *CopyMessageParams) (*models.MessageID, error)
CopyMessage https://core.telegram.org/bots/api#copymessage
func (*Bot) CopyMessages ¶ added in v1.0.0
func (b *Bot) CopyMessages(ctx context.Context, params *CopyMessagesParams) ([]models.MessageID, error)
CopyMessages https://core.telegram.org/bots/api#copymessages
func (*Bot) CreateChatInviteLink ¶
func (b *Bot) CreateChatInviteLink(ctx context.Context, params *CreateChatInviteLinkParams) (*models.ChatInviteLink, error)
CreateChatInviteLink https://core.telegram.org/bots/api#createchatinvitelink
func (*Bot) CreateChatSubscriptionInviteLink ¶ added in v1.7.0
func (b *Bot) CreateChatSubscriptionInviteLink(ctx context.Context, params *CreateChatSubscriptionInviteLinkParams) (*models.ChatInviteLink, error)
CreateChatSubscriptionInviteLink https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
func (*Bot) CreateForumTopic ¶ added in v0.3.1
func (b *Bot) CreateForumTopic(ctx context.Context, params *CreateForumTopicParams) (*models.ForumTopic, error)
CreateForumTopic https://core.telegram.org/bots/api#createforumtopic
func (*Bot) CreateInvoiceLink ¶
func (b *Bot) CreateInvoiceLink(ctx context.Context, params *CreateInvoiceLinkParams) (string, error)
CreateInvoiceLink https://core.telegram.org/bots/api#createinvoicelink
func (*Bot) CreateNewStickerSet ¶
func (b *Bot) CreateNewStickerSet(ctx context.Context, params *CreateNewStickerSetParams) (bool, error)
CreateNewStickerSet https://core.telegram.org/bots/api#createnewstickerset
func (*Bot) DeclineChatJoinRequest ¶
func (b *Bot) DeclineChatJoinRequest(ctx context.Context, params *DeclineChatJoinRequestParams) (bool, error)
DeclineChatJoinRequest https://core.telegram.org/bots/api#declinechatjoinrequest
func (*Bot) DeclineSuggestedPost ¶ added in v1.17.0
func (b *Bot) DeclineSuggestedPost(ctx context.Context, params *DeclineSuggestedPostParams) (bool, error)
DeclineSuggestedPost https://core.telegram.org/bots/api#declinesuggestedpost
func (*Bot) DeleteAllMessageReactions ¶ added in v1.21.0
func (*Bot) DeleteBusinessAccountGift ¶ added in v1.28.0
func (b *Bot) DeleteBusinessAccountGift(ctx context.Context, params *DeleteBusinessAccountGiftParams) (bool, error)
DeleteBusinessAccountGift https://core.telegram.org/bots/api#deletebusinessaccountgift
func (*Bot) DeleteBusinessMessages ¶ added in v1.15.0
func (b *Bot) DeleteBusinessMessages(ctx context.Context, params *DeleteBusinessMessagesParams) (bool, error)
DeleteBusinessMessages https://core.telegram.org/bots/api#deletebusinessmessages
func (*Bot) DeleteChatPhoto ¶
DeleteChatPhoto https://core.telegram.org/bots/api#deletechatphoto
func (*Bot) DeleteChatStickerSet ¶
func (b *Bot) DeleteChatStickerSet(ctx context.Context, params *DeleteChatStickerSetParams) (bool, error)
DeleteChatStickerSet https://core.telegram.org/bots/api#deletechatstickerset
func (*Bot) DeleteEphemeralMessage ¶ added in v1.23.0
func (b *Bot) DeleteEphemeralMessage(ctx context.Context, params *DeleteEphemeralMessageParams) (bool, error)
DeleteEphemeralMessage https://core.telegram.org/bots/api#deleteephemeralmessage
func (*Bot) DeleteForumTopic ¶ added in v0.3.1
DeleteForumTopic https://core.telegram.org/bots/api#unpinallforumtopicmessages
func (*Bot) DeleteMessage ¶
DeleteMessage https://core.telegram.org/bots/api#deletemessage
func (*Bot) DeleteMessageReaction ¶ added in v1.21.0
func (*Bot) DeleteMessages ¶ added in v1.0.0
DeleteMessages https://core.telegram.org/bots/api#deletemessages
func (*Bot) DeleteMyCommands ¶
DeleteMyCommands https://core.telegram.org/bots/api#deletemycommands
func (*Bot) DeleteStickerFromSet ¶
func (b *Bot) DeleteStickerFromSet(ctx context.Context, params *DeleteStickerFromSetParams) (bool, error)
DeleteStickerFromSet https://core.telegram.org/bots/api#deletestickerfromset
func (*Bot) DeleteStickerSet ¶ added in v0.7.0
DeleteStickerSet https://core.telegram.org/bots/api#deletestickerset
func (*Bot) DeleteStory ¶ added in v1.15.0
DeleteStory https://core.telegram.org/bots/api#deletestory
func (*Bot) DeleteWebhook ¶
DeleteWebhook https://core.telegram.org/bots/api#deletewebhook
func (*Bot) EditChatInviteLink ¶
func (b *Bot) EditChatInviteLink(ctx context.Context, params *EditChatInviteLinkParams) (*models.ChatInviteLink, error)
EditChatInviteLink https://core.telegram.org/bots/api#editchatinvitelink
func (*Bot) EditChatSubscriptionInviteLink ¶ added in v1.7.0
func (b *Bot) EditChatSubscriptionInviteLink(ctx context.Context, params *EditChatSubscriptionInviteLinkParams) (*models.ChatInviteLink, error)
EditChatSubscriptionInviteLink https://core.telegram.org/bots/api#editchatsubscriptioninvitelink
func (*Bot) EditEphemeralMessageCaption ¶ added in v1.23.0
func (b *Bot) EditEphemeralMessageCaption(ctx context.Context, params *EditEphemeralMessageCaptionParams) (bool, error)
EditEphemeralMessageCaption https://core.telegram.org/bots/api#editephemeralmessagecaption
func (*Bot) EditEphemeralMessageMedia ¶ added in v1.23.0
func (b *Bot) EditEphemeralMessageMedia(ctx context.Context, params *EditEphemeralMessageMediaParams) (bool, error)
EditEphemeralMessageMedia https://core.telegram.org/bots/api#editephemeralmessagemedia
func (*Bot) EditEphemeralMessageReplyMarkup ¶ added in v1.23.0
func (b *Bot) EditEphemeralMessageReplyMarkup(ctx context.Context, params *EditEphemeralMessageReplyMarkupParams) (bool, error)
EditEphemeralMessageReplyMarkup https://core.telegram.org/bots/api#editephemeralmessagereplymarkup
func (*Bot) EditEphemeralMessageText ¶ added in v1.23.0
func (b *Bot) EditEphemeralMessageText(ctx context.Context, params *EditEphemeralMessageTextParams) (bool, error)
EditEphemeralMessageText https://core.telegram.org/bots/api#editephemeralmessagetext
func (*Bot) EditForumTopic ¶ added in v0.3.1
EditForumTopic https://core.telegram.org/bots/api#editforumtopic
func (*Bot) EditGeneralForumTopic ¶ added in v0.3.4
func (b *Bot) EditGeneralForumTopic(ctx context.Context, params *EditGeneralForumTopicParams) (bool, error)
EditGeneralForumTopic https://core.telegram.org/bots/api#editgeneralforumtopic
func (*Bot) EditMessageCaption ¶
func (b *Bot) EditMessageCaption(ctx context.Context, params *EditMessageCaptionParams) (*models.Message, error)
EditMessageCaption https://core.telegram.org/bots/api#editmessagecaption
func (*Bot) EditMessageChecklist ¶ added in v1.16.0
func (b *Bot) EditMessageChecklist(ctx context.Context, params *EditMessageChecklistParams) (*models.Message, error)
EditMessageChecklist https://core.telegram.org/bots/api#editmessagechecklist
func (*Bot) EditMessageLiveLocation ¶
func (b *Bot) EditMessageLiveLocation(ctx context.Context, params *EditMessageLiveLocationParams) (*models.Message, error)
EditMessageLiveLocation https://core.telegram.org/bots/api#editmessagelivelocation
func (*Bot) EditMessageMedia ¶
func (b *Bot) EditMessageMedia(ctx context.Context, params *EditMessageMediaParams) (*models.Message, error)
EditMessageMedia https://core.telegram.org/bots/api#editmessagemedia
func (*Bot) EditMessageReplyMarkup ¶
func (b *Bot) EditMessageReplyMarkup(ctx context.Context, params *EditMessageReplyMarkupParams) (*models.Message, error)
EditMessageReplyMarkup https://core.telegram.org/bots/api#editmessagereplymarkup
func (*Bot) EditMessageText ¶
func (b *Bot) EditMessageText(ctx context.Context, params *EditMessageTextParams) (*models.Message, error)
EditMessageText https://core.telegram.org/bots/api#editmessagetext
func (*Bot) EditMessageWidgetData ¶ added in v1.28.0
func (b *Bot) EditMessageWidgetData(ctx context.Context, params *EditMessageWidgetDataParams) (bool, error)
EditMessageWidgetData https://core.telegram.org/bots/api#editmessagewidgetdata
func (*Bot) EditSharedWidgetData ¶ added in v1.28.0
func (b *Bot) EditSharedWidgetData(ctx context.Context, params *EditSharedWidgetDataParams) (bool, error)
EditSharedWidgetData https://core.telegram.org/bots/api#editsharedwidgetdata
func (*Bot) EditUserStarSubscription ¶ added in v1.11.0
func (b *Bot) EditUserStarSubscription(ctx context.Context, params *EditUserStarSubscriptionParams) (bool, error)
EditUserStarSubscription https://core.telegram.org/bots/api#edituserstarsubscription
func (*Bot) ExportChatInviteLink ¶
func (b *Bot) ExportChatInviteLink(ctx context.Context, params *ExportChatInviteLinkParams) (string, error)
ExportChatInviteLink https://core.telegram.org/bots/api#exportchatinvitelink
func (*Bot) FileDownloadLink ¶ added in v0.8.3
FileDownloadLink returns the file download link
func (*Bot) ForwardMessage ¶
func (b *Bot) ForwardMessage(ctx context.Context, params *ForwardMessageParams) (*models.Message, error)
ForwardMessage https://core.telegram.org/bots/api#forwardmessage
func (*Bot) ForwardMessages ¶ added in v1.0.0
func (b *Bot) ForwardMessages(ctx context.Context, params *ForwardMessagesParams) ([]models.MessageID, error)
ForwardMessages https://core.telegram.org/bots/api#forwardmessages
func (*Bot) GetAvailableGifts ¶ added in v1.11.0
GetAvailableGifts https://core.telegram.org/bots/api#getavailablegifts
func (*Bot) GetBusinessAccountGifts ¶ added in v1.15.0
func (b *Bot) GetBusinessAccountGifts(ctx context.Context, params *GetBusinessAccountGiftsParams) (*models.OwnedGifts, error)
GetBusinessAccountGifts https://core.telegram.org/bots/api#getbusinessaccountgifts
func (*Bot) GetBusinessAccountStarBalance ¶ added in v1.15.0
func (b *Bot) GetBusinessAccountStarBalance(ctx context.Context, params *GetBusinessAccountStarBalanceParams) (*models.StarAmount, error)
GetBusinessAccountStarBalance https://core.telegram.org/bots/api#getbusinessaccountstarbalance
func (*Bot) GetBusinessConnection ¶ added in v1.8.4
func (b *Bot) GetBusinessConnection(ctx context.Context, params *GetBusinessConnectionParams) (*models.BusinessConnection, error)
GetBusinessConnection https://core.telegram.org/bots/api#getbusinessconnection
func (*Bot) GetChat ¶
func (b *Bot) GetChat(ctx context.Context, params *GetChatParams) (*models.ChatFullInfo, error)
func (*Bot) GetChatAdministrators ¶
func (b *Bot) GetChatAdministrators(ctx context.Context, params *GetChatAdministratorsParams) ([]models.ChatMember, error)
GetChatAdministrators https://core.telegram.org/bots/api#getchatadministrators
func (*Bot) GetChatGifts ¶ added in v1.18.0
func (b *Bot) GetChatGifts(ctx context.Context, params *GetChatGiftsParams) (*models.OwnedGifts, error)
GetChatGifts https://core.telegram.org/bots/api#getchatgifts
func (*Bot) GetChatMember ¶
func (b *Bot) GetChatMember(ctx context.Context, params *GetChatMemberParams) (*models.ChatMember, error)
GetChatMember https://core.telegram.org/bots/api#getchatmember
func (*Bot) GetChatMemberCount ¶
func (b *Bot) GetChatMemberCount(ctx context.Context, params *GetChatMemberCountParams) (int, error)
GetChatMemberCount https://core.telegram.org/bots/api#getchatmembercount
func (*Bot) GetChatMenuButton ¶
func (b *Bot) GetChatMenuButton(ctx context.Context, params *GetChatMenuButtonParams) (models.MenuButton, error)
GetChatMenuButton https://core.telegram.org/bots/api#getchatmenubutton
func (*Bot) GetChatShareThemeBackdrops ¶ added in v1.28.0
func (b *Bot) GetChatShareThemeBackdrops(ctx context.Context) (*models.ChatShareThemeBackdrops, error)
GetChatShareThemeBackdrops https://core.telegram.org/bots/api#getchatsharethemebackdrops
func (*Bot) GetCustomEmojiStickers ¶
func (b *Bot) GetCustomEmojiStickers(ctx context.Context, params *GetCustomEmojiStickersParams) ([]*models.Sticker, error)
GetCustomEmojiStickers https://core.telegram.org/bots/api#getcustomemojistickers
func (*Bot) GetForumTopicIconStickers ¶ added in v0.3.1
GetForumTopicIconStickers https://core.telegram.org/bots/api#getforumtopiciconstickers
func (*Bot) GetGameHighScores ¶
func (b *Bot) GetGameHighScores(ctx context.Context, params *GetGameHighScoresParams) ([]*models.GameHighScore, error)
GetGameHighScores https://core.telegram.org/bots/api#getgamehighscores
func (*Bot) GetManagedBotAccessSettings ¶ added in v1.21.0
func (b *Bot) GetManagedBotAccessSettings(ctx context.Context, params *GetManagedBotAccessSettingsParams) (*models.BotAccessSettings, error)
func (*Bot) GetManagedBotToken ¶ added in v1.21.0
func (*Bot) GetMyCommands ¶
func (b *Bot) GetMyCommands(ctx context.Context, params *GetMyCommandsParams) ([]models.BotCommand, error)
GetMyCommands https://core.telegram.org/bots/api#getmycommands
func (*Bot) GetMyDefaultAdministratorRights ¶
func (b *Bot) GetMyDefaultAdministratorRights(ctx context.Context, params *GetMyDefaultAdministratorRightsParams) (*models.ChatAdministratorRights, error)
GetMyDefaultAdministratorRights https://core.telegram.org/bots/api#getmydefaultadministratorrights
func (*Bot) GetMyDescription ¶ added in v0.7.0
func (b *Bot) GetMyDescription(ctx context.Context, params *GetMyDescriptionParams) (models.BotDescription, error)
GetMyDescription https://core.telegram.org/bots/api#getmydescription
func (*Bot) GetMyShortDescription ¶ added in v0.7.0
func (b *Bot) GetMyShortDescription(ctx context.Context, params *GetMyShortDescriptionParams) (models.BotShortDescription, error)
GetMyShortDescription https://core.telegram.org/bots/api#getmyshortdescription
func (*Bot) GetMyStarBalance ¶ added in v1.16.0
GetMyStarBalance https://core.telegram.org/bots/api#getmystarbalance
func (*Bot) GetStarTransactions ¶ added in v1.5.0
func (b *Bot) GetStarTransactions(ctx context.Context, params *GetStarTransactionsParams) (*models.StarTransactions, error)
GetStarTransactions https://core.telegram.org/bots/api#getstartransactions
func (*Bot) GetStickerSet ¶
func (b *Bot) GetStickerSet(ctx context.Context, params *GetStickerSetParams) (*models.StickerSet, error)
GetStickerSet https://core.telegram.org/bots/api#getstickerset
func (*Bot) GetUniqueGift ¶ added in v1.28.0
func (b *Bot) GetUniqueGift(ctx context.Context, params *GetUniqueGiftParams) (*models.UniqueGift, error)
GetUniqueGift https://core.telegram.org/bots/api#getuniquegift
func (*Bot) GetUserChatBoosts ¶ added in v1.0.0
func (b *Bot) GetUserChatBoosts(ctx context.Context, params *GetUserChatBoostsParams) (*models.UserChatBoosts, error)
GetUserChatBoosts https://core.telegram.org/bots/api#getuserchatboosts
func (*Bot) GetUserGifts ¶ added in v1.18.0
func (b *Bot) GetUserGifts(ctx context.Context, params *GetUserGiftsParams) (*models.OwnedGifts, error)
GetUserGifts https://core.telegram.org/bots/api#getusergifts
func (*Bot) GetUserPersonalChatMessages ¶ added in v1.21.0
func (*Bot) GetUserProfileAudios ¶ added in v1.19.0
func (b *Bot) GetUserProfileAudios(ctx context.Context, params *GetUserProfileAudiosParams) (*models.UserProfileAudios, error)
GetUserProfileAudios https://core.telegram.org/bots/api#getuserprofileaudios
func (*Bot) GetUserProfilePhotos ¶
func (b *Bot) GetUserProfilePhotos(ctx context.Context, params *GetUserProfilePhotosParams) (*models.UserProfilePhotos, error)
GetUserProfilePhotos https://core.telegram.org/bots/api#getuserprofilephotos
func (*Bot) GetWebhookInfo ¶
GetWebhookInfo https://core.telegram.org/bots/api#getwebhookinfo
func (*Bot) GiftPremiumSubscription ¶ added in v1.15.0
func (b *Bot) GiftPremiumSubscription(ctx context.Context, params *GiftPremiumSubscriptionParams) (bool, error)
GiftPremiumSubscription https://core.telegram.org/bots/api#giftpremiumsubscription
func (*Bot) HideGeneralForumTopic ¶ added in v0.3.4
func (b *Bot) HideGeneralForumTopic(ctx context.Context, params *HideGeneralForumTopicParams) (bool, error)
HideGeneralForumTopic https://core.telegram.org/bots/api#hidegeneralforumtopic
func (*Bot) ID ¶ added in v1.13.1
ID returns the bot user id from the token prefix ("<id>:<secret>"). It returns 0 if the prefix cannot be parsed as an int64. ID does not validate or authenticate the token.
func (*Bot) PinChatMessage ¶
PinChatMessage https://core.telegram.org/bots/api#pinchatmessage
func (*Bot) ProcessUpdate ¶ added in v0.7.3
ProcessUpdate allows you to process update
func (*Bot) PromoteChatMember ¶
PromoteChatMember https://core.telegram.org/bots/api#promotechatmember
func (*Bot) ReadBusinessMessage ¶ added in v1.15.0
func (b *Bot) ReadBusinessMessage(ctx context.Context, params *ReadBusinessMessageParams) (bool, error)
ReadBusinessMessage https://core.telegram.org/bots/api#readbusinessmessage
func (*Bot) RefundStarPayment ¶ added in v1.4.0
RefundStarPayment https://core.telegram.org/bots/api#refundstarpayment
func (*Bot) RegisterHandler ¶
func (b *Bot) RegisterHandler(handlerType HandlerType, pattern string, matchType MatchType, f HandlerFunc, m ...Middleware) string
func (*Bot) RegisterHandlerInlineQuery ¶ added in v1.28.0
func (b *Bot) RegisterHandlerInlineQuery(f HandlerFunc, m ...Middleware) string
RegisterHandlerInlineQuery registers a handler for all inline queries, including empty queries. For matching query text, use RegisterHandler or RegisterHandlerRegexp with HandlerTypeInlineQuery. Returns an ID that can be passed to UnregisterHandler.
func (*Bot) RegisterHandlerMatchFunc ¶ added in v0.3.3
func (b *Bot) RegisterHandlerMatchFunc(matchFunc MatchFunc, f HandlerFunc, m ...Middleware) string
func (*Bot) RegisterHandlerRegexp ¶
func (b *Bot) RegisterHandlerRegexp(handlerType HandlerType, re *regexp.Regexp, f HandlerFunc, m ...Middleware) string
func (*Bot) RemoveBusinessAccountProfilePhoto ¶ added in v1.15.0
func (b *Bot) RemoveBusinessAccountProfilePhoto(ctx context.Context, params *RemoveBusinessAccountProfilePhotoParams) (bool, error)
RemoveBusinessAccountProfilePhoto https://core.telegram.org/bots/api#removebusinessaccountprofilephoto
func (*Bot) RemoveChatVerification ¶ added in v1.13.0
func (b *Bot) RemoveChatVerification(ctx context.Context, params *RemoveChatVerificationParams) (bool, error)
RemoveChatVerification https://core.telegram.org/bots/api#removechatverification
func (*Bot) RemoveMyProfilePhoto ¶ added in v1.19.0
RemoveMyProfilePhoto https://core.telegram.org/bots/api#removemyprofilephoto
func (*Bot) RemoveUserVerification ¶ added in v1.13.0
func (b *Bot) RemoveUserVerification(ctx context.Context, params *RemoveUserVerificationParams) (bool, error)
RemoveUserVerification https://core.telegram.org/bots/api#removeuserverification
func (*Bot) ReopenForumTopic ¶ added in v0.3.1
ReopenForumTopic https://core.telegram.org/bots/api#reopenforumtopic
func (*Bot) ReopenGeneralForumTopic ¶ added in v0.3.4
func (b *Bot) ReopenGeneralForumTopic(ctx context.Context, params *ReopenGeneralForumTopicParams) (bool, error)
ReopenGeneralForumTopic https://core.telegram.org/bots/api#reopengeneralforumtopic
func (*Bot) ReplaceManagedBotToken ¶ added in v1.21.0
func (*Bot) ReplaceStickerInSet ¶ added in v1.2.0
func (b *Bot) ReplaceStickerInSet(ctx context.Context, params *ReplaceStickerInSetParams) (bool, error)
ReplaceStickerInSet https://core.telegram.org/bots/api#replacestickerinset
func (*Bot) RepostStory ¶ added in v1.19.0
RepostStory https://core.telegram.org/bots/api#repoststory
func (*Bot) RestrictChatMember ¶
func (b *Bot) RestrictChatMember(ctx context.Context, params *RestrictChatMemberParams) (bool, error)
RestrictChatMember https://core.telegram.org/bots/api#restrictchatmember
func (*Bot) RevokeChatInviteLink ¶
func (b *Bot) RevokeChatInviteLink(ctx context.Context, params *RevokeChatInviteLinkParams) (*models.ChatInviteLink, error)
RevokeChatInviteLink https://core.telegram.org/bots/api#revokechatinvitelink
func (*Bot) SavePreparedInlineMessage ¶ added in v1.11.0
func (b *Bot) SavePreparedInlineMessage(ctx context.Context, params *SavePreparedInlineMessageParams) (*models.PreparedInlineMessage, error)
SavePreparedInlineMessage https://core.telegram.org/bots/api#savepreparedinlinemessage
func (*Bot) SavePreparedKeyboardButton ¶ added in v1.21.0
func (b *Bot) SavePreparedKeyboardButton(ctx context.Context, params *SavePreparedKeyboardButtonParams) (*models.PreparedKeyboardButton, error)
func (*Bot) SendAnimation ¶
func (b *Bot) SendAnimation(ctx context.Context, params *SendAnimationParams) (*models.Message, error)
SendAnimation https://core.telegram.org/bots/api#sendanimation
func (*Bot) SendChatAction ¶
SendChatAction https://core.telegram.org/bots/api#sendchataction
func (*Bot) SendChecklist ¶ added in v1.16.0
func (b *Bot) SendChecklist(ctx context.Context, params *SendChecklistParams) (*models.Message, error)
SendChecklist https://core.telegram.org/bots/api#sendchecklist
func (*Bot) SendContact ¶
SendContact https://core.telegram.org/bots/api#sendcontact
func (*Bot) SendDocument ¶
func (b *Bot) SendDocument(ctx context.Context, params *SendDocumentParams) (*models.Message, error)
SendDocument https://core.telegram.org/bots/api#senddocument
func (*Bot) SendInvoice ¶
SendInvoice https://core.telegram.org/bots/api#sendinvoice
func (*Bot) SendLivePhoto ¶ added in v1.21.0
func (*Bot) SendLocation ¶
func (b *Bot) SendLocation(ctx context.Context, params *SendLocationParams) (*models.Message, error)
SendLocation https://core.telegram.org/bots/api#sendlocation
func (*Bot) SendMediaGroup ¶
func (b *Bot) SendMediaGroup(ctx context.Context, params *SendMediaGroupParams) ([]*models.Message, error)
SendMediaGroup https://core.telegram.org/bots/api#sendmediagroup
func (*Bot) SendMessage ¶
SendMessage https://core.telegram.org/bots/api#sendmessage
func (*Bot) SendMessageDraft ¶ added in v1.18.0
SendMessageDraft https://core.telegram.org/bots/api#sendmessagedraft
func (*Bot) SendPaidMedia ¶ added in v1.6.0
func (b *Bot) SendPaidMedia(ctx context.Context, params *SendPaidMediaParams) (*models.Message, error)
SendPaidMedia https://core.telegram.org/bots/api#sendpaidmedia
func (*Bot) SendRichMessage ¶ added in v1.22.0
func (b *Bot) SendRichMessage(ctx context.Context, params *SendRichMessageParams) (*models.Message, error)
SendRichMessage https://core.telegram.org/bots/api#sendrichmessage
func (*Bot) SendRichMessageDraft ¶ added in v1.22.0
func (b *Bot) SendRichMessageDraft(ctx context.Context, params *SendRichMessageDraftParams) (bool, error)
SendRichMessageDraft https://core.telegram.org/bots/api#sendrichmessagedraft
func (*Bot) SendSharedWidget ¶ added in v1.28.0
func (b *Bot) SendSharedWidget(ctx context.Context, params *SendSharedWidgetParams) (*models.Message, error)
SendSharedWidget https://core.telegram.org/bots/api#sendsharedwidget
func (*Bot) SendSticker ¶
SendSticker https://core.telegram.org/bots/api#sendsticker
func (*Bot) SendVideoNote ¶
func (b *Bot) SendVideoNote(ctx context.Context, params *SendVideoNoteParams) (*models.Message, error)
SendVideoNote https://core.telegram.org/bots/api#sendvideonote
func (*Bot) SendWidget ¶ added in v1.28.0
func (*Bot) SetBusinessAccountBio ¶ added in v1.15.0
func (b *Bot) SetBusinessAccountBio(ctx context.Context, params *SetBusinessAccountBioParams) (bool, error)
SetBusinessAccountBio https://core.telegram.org/bots/api#setbusinessaccountbio
func (*Bot) SetBusinessAccountGiftSettings ¶ added in v1.15.0
func (b *Bot) SetBusinessAccountGiftSettings(ctx context.Context, params *SetBusinessAccountGiftSettingsParams) (bool, error)
SetBusinessAccountGiftSettings https://core.telegram.org/bots/api#setbusinessaccountgiftsettings
func (*Bot) SetBusinessAccountName ¶ added in v1.15.0
func (b *Bot) SetBusinessAccountName(ctx context.Context, params *SetBusinessAccountNameParams) (bool, error)
SetBusinessAccountName https://core.telegram.org/bots/api#setbusinessaccountname
func (*Bot) SetBusinessAccountProfilePhoto ¶ added in v1.15.0
func (b *Bot) SetBusinessAccountProfilePhoto(ctx context.Context, params *SetBusinessAccountProfilePhotoParams) (bool, error)
SetBusinessAccountProfilePhoto https://core.telegram.org/bots/api#setbusinessaccountprofilephoto
func (*Bot) SetBusinessAccountUsername ¶ added in v1.15.0
func (b *Bot) SetBusinessAccountUsername(ctx context.Context, params *SetBusinessAccountUsernameParams) (bool, error)
SetBusinessAccountUsername https://core.telegram.org/bots/api#setbusinessaccountusername
func (*Bot) SetChatAdministratorCustomTitle ¶
func (b *Bot) SetChatAdministratorCustomTitle(ctx context.Context, params *SetChatAdministratorCustomTitleParams) (bool, error)
SetChatAdministratorCustomTitle https://core.telegram.org/bots/api#setchatadministratorcustomtitle
func (*Bot) SetChatDescription ¶
func (b *Bot) SetChatDescription(ctx context.Context, params *SetChatDescriptionParams) (bool, error)
SetChatDescription https://core.telegram.org/bots/api#setchatdescription
func (*Bot) SetChatMemberTag ¶ added in v1.20.0
SetChatMemberTag https://core.telegram.org/bots/api#setchatmembertag
func (*Bot) SetChatMenuButton ¶
SetChatMenuButton https://core.telegram.org/bots/api#setchatmenubutton
func (*Bot) SetChatPermissions ¶
func (b *Bot) SetChatPermissions(ctx context.Context, params *SetChatPermissionsParams) (bool, error)
SetChatPermissions https://core.telegram.org/bots/api#setchatpermissions
func (*Bot) SetChatPhoto ¶
SetChatPhoto https://core.telegram.org/bots/api#setchatphoto
func (*Bot) SetChatStickerSet ¶
SetChatStickerSet https://core.telegram.org/bots/api#setchatstickerset
func (*Bot) SetChatTitle ¶
SetChatTitle https://core.telegram.org/bots/api#setchattitle
func (*Bot) SetCustomEmojiStickerSetThumbnail ¶ added in v0.7.0
func (b *Bot) SetCustomEmojiStickerSetThumbnail(ctx context.Context, params *SetCustomEmojiStickerSetThumbnailParams) (bool, error)
SetCustomEmojiStickerSetThumbnail https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
func (*Bot) SetGameScore ¶
func (b *Bot) SetGameScore(ctx context.Context, params *SetGameScoreParams) (*models.Message, error)
SetGameScore https://core.telegram.org/bots/api#setgamescore
func (*Bot) SetManagedBotAccessSettings ¶ added in v1.21.0
func (*Bot) SetMessageReaction ¶ added in v1.0.0
func (b *Bot) SetMessageReaction(ctx context.Context, params *SetMessageReactionParams) (bool, error)
SetMessageReaction https://core.telegram.org/bots/api#setmessagereaction
func (*Bot) SetMyCommands ¶
SetMyCommands https://core.telegram.org/bots/api#setmycommands
func (*Bot) SetMyDefaultAdministratorRights ¶
func (b *Bot) SetMyDefaultAdministratorRights(ctx context.Context, params *SetMyDefaultAdministratorRightsParams) (bool, error)
SetMyDefaultAdministratorRights https://core.telegram.org/bots/api#setmydefaultadministratorrights
func (*Bot) SetMyDescription ¶ added in v0.7.0
SetMyDescription https://core.telegram.org/bots/api#setmydescription
func (*Bot) SetMyProfilePhoto ¶ added in v1.19.0
SetMyProfilePhoto https://core.telegram.org/bots/api#setmyprofilephoto
func (*Bot) SetMyShortDescription ¶ added in v0.7.0
func (b *Bot) SetMyShortDescription(ctx context.Context, params *SetMyShortDescriptionParams) (bool, error)
SetMyShortDescription https://core.telegram.org/bots/api#setmyshortdescription
func (*Bot) SetPassportDataErrors ¶
func (b *Bot) SetPassportDataErrors(ctx context.Context, params *SetPassportDataErrorsParams) (bool, error)
SetPassportDataErrors https://core.telegram.org/bots/api#setpassportdataerrors
func (*Bot) SetStickerEmojiList ¶ added in v0.7.0
func (b *Bot) SetStickerEmojiList(ctx context.Context, params *SetStickerEmojiListParams) (bool, error)
SetStickerEmojiList https://core.telegram.org/bots/api#setstickeremojilist
func (*Bot) SetStickerKeywords ¶ added in v0.7.0
func (b *Bot) SetStickerKeywords(ctx context.Context, params *SetStickerKeywordsParams) (bool, error)
SetStickerKeywords https://core.telegram.org/bots/api#setstickerkeywords
func (*Bot) SetStickerMaskPosition ¶ added in v0.7.0
func (b *Bot) SetStickerMaskPosition(ctx context.Context, params *SetStickerMaskPositionParams) (bool, error)
SetStickerMaskPosition https://core.telegram.org/bots/api#setstickermaskposition
func (*Bot) SetStickerPositionInSet ¶
func (b *Bot) SetStickerPositionInSet(ctx context.Context, params *SetStickerPositionInSetParams) (bool, error)
SetStickerPositionInSet https://core.telegram.org/bots/api#setstickerpositioninset
func (*Bot) SetStickerSetThumbnail ¶ added in v0.7.0
func (b *Bot) SetStickerSetThumbnail(ctx context.Context, params *SetStickerSetThumbnailParams) (bool, error)
SetStickerSetThumbnail https://core.telegram.org/bots/api#setstickersetthumbnail
func (*Bot) SetStickerSetTitle ¶ added in v0.7.0
func (b *Bot) SetStickerSetTitle(ctx context.Context, params *SetStickerSetTitleParams) (bool, error)
SetStickerSetTitle https://core.telegram.org/bots/api#setstickermaskposition
func (*Bot) SetUserEmojiStatus ¶ added in v1.11.0
func (b *Bot) SetUserEmojiStatus(ctx context.Context, params *SetUserEmojiStatusParams) (bool, error)
SetUserEmojiStatus https://core.telegram.org/bots/api#setuseremojistatus
func (*Bot) SetWebhook ¶
func (*Bot) StartWebhook ¶
StartWebhook starts the Bot with webhook mode
func (*Bot) StopMessageLiveLocation ¶
func (b *Bot) StopMessageLiveLocation(ctx context.Context, params *StopMessageLiveLocationParams) (*models.Message, error)
StopMessageLiveLocation https://core.telegram.org/bots/api#stopmessagelivelocation
func (*Bot) TransferBusinessAccountStars ¶ added in v1.15.0
func (b *Bot) TransferBusinessAccountStars(ctx context.Context, params *TransferBusinessAccountStarsParams) (bool, error)
TransferBusinessAccountStars https://core.telegram.org/bots/api#transferbusinessaccountstars
func (*Bot) TransferGift ¶ added in v1.15.0
TransferGift https://core.telegram.org/bots/api#transfergift
func (*Bot) UnbanChatMember ¶
UnbanChatMember https://core.telegram.org/bots/api#unbanchatmember
func (*Bot) UnbanChatSenderChat ¶
func (b *Bot) UnbanChatSenderChat(ctx context.Context, params *UnbanChatSenderChatParams) (bool, error)
UnbanChatSenderChat https://core.telegram.org/bots/api#unbanchatsenderchat
func (*Bot) UnhideGeneralForumTopic ¶ added in v0.3.4
func (b *Bot) UnhideGeneralForumTopic(ctx context.Context, params *UnhideGeneralForumTopicParams) (bool, error)
UnhideGeneralForumTopic https://core.telegram.org/bots/api#unhidegeneralforumtopic
func (*Bot) UnpinAllChatMessages ¶
func (b *Bot) UnpinAllChatMessages(ctx context.Context, params *UnpinAllChatMessagesParams) (bool, error)
UnpinAllChatMessages https://core.telegram.org/bots/api#unpinallchatmessages
func (*Bot) UnpinAllForumTopicMessages ¶ added in v0.3.1
func (b *Bot) UnpinAllForumTopicMessages(ctx context.Context, params *UnpinAllForumTopicMessagesParams) (bool, error)
UnpinAllForumTopicMessages https://core.telegram.org/bots/api#deleteforumtopic
func (*Bot) UnpinAllGeneralForumTopicMessages ¶ added in v0.7.15
func (b *Bot) UnpinAllGeneralForumTopicMessages(ctx context.Context, params *UnpinAllGeneralForumTopicMessagesParams) (bool, error)
UnpinAllGeneralForumTopicMessages https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
func (*Bot) UnpinChatMessage ¶
UnpinChatMessage https://core.telegram.org/bots/api#unpinchatmessage
func (*Bot) UnregisterHandler ¶
func (*Bot) UpgradeGift ¶ added in v1.15.0
UpgradeGift https://core.telegram.org/bots/api#upgradegift
func (*Bot) UploadStickerFile ¶
func (b *Bot) UploadStickerFile(ctx context.Context, params *UploadStickerFileParams) (*models.File, error)
UploadStickerFile https://core.telegram.org/bots/api#uploadstickerfile
func (*Bot) VerifyChat ¶ added in v1.13.0
func (*Bot) VerifyUser ¶ added in v1.13.0
func (*Bot) WebhookHandler ¶
func (b *Bot) WebhookHandler() http.HandlerFunc
func (*Bot) WebhookReply ¶ added in v1.29.0
WebhookReply answers the update being handled by sending a Bot API method call in the response to the webhook request, Telegram does not report whether the response succeeded.
The method is the Bot API method name, such as "answerInlineQuery", and the params are its parameters, such as *AnswerInlineQueryParams. Supported non-nil params must be pointers to structs, while nil and typed-nil pointers are skipped without emitting fields.
WebhookReply works only in a handler run by WebhookReplyHandler. It must be called before the handler returns. It can only be called once per update. Otherwise, WebhookReply returns an error wrapping ErrorWebhookReplyUnavailable.
See https://core.telegram.org/bots/api#making-requests-when-getting-updates
func (*Bot) WebhookReplyHandler ¶ added in v1.29.0
func (b *Bot) WebhookReplyHandler() http.HandlerFunc
WebhookReplyHandler returns an HTTP handler for webhook updates that lets handlers answer an update in the webhook response with WebhookReply.
WebhookReplyHandler runs the handler for each update synchronously, in the goroutine serving the request, and responds once the handler returns: with the reply if the handler made one, or with an empty 200 OK otherwise. A request that fails the webhook secret token check is answered with 401 Unauthorized, and one with an unreadable body with 400 Bad Request.
type CloseForumTopicParams ¶ added in v0.3.1
type CloseGeneralForumTopicParams ¶ added in v0.3.4
type CloseGeneralForumTopicParams struct {
ChatID any `json:"chat_id"`
}
type ConvertGiftToStarsParams ¶ added in v1.15.0
type ConvertGiftToStarsParams struct {
BusinessConnectionID string `json:"business_connection_id"`
OwnedGiftID string `json:"owned_gift_id"`
}
ConvertGiftToStarsParams https://core.telegram.org/bots/api#convertgifttostars
type CopyMessageParams ¶
type CopyMessageParams struct {
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
FromChatID any `json:"from_chat_id"`
MessageID int `json:"message_id"`
VideoStartTimestamp int `json:"video_start_timestamp,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
CopyMessageParams https://core.telegram.org/bots/api#copymessage
type CopyMessagesParams ¶ added in v1.0.0
type CopyMessagesParams struct {
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
FromChatID any `json:"from_chat_id"`
MessageIDs []int `json:"message_ids"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
RemoveCaption bool `json:"remove_caption,omitempty"`
}
CopyMessagesParams https://core.telegram.org/bots/api#copymessages
type CreateChatSubscriptionInviteLinkParams ¶ added in v1.7.0
type CreateForumTopicParams ¶ added in v0.3.1
type CreateInvoiceLinkParams ¶
type CreateInvoiceLinkParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
Title string `json:"title"`
Description string `json:"description"`
Payload string `json:"payload"`
ProviderToken string `json:"provider_token,omitempty"`
Currency string `json:"currency"`
Prices []models.LabeledPrice `json:"prices"`
SubscriptionPeriod int `json:"subscription_period,omitempty"`
MaxTipAmount int `json:"max_tip_amount,omitempty"`
SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"`
ProviderData string `json:"provider_data,omitempty"`
PhotoURL string `json:"photo_url,omitempty"`
PhotoSize int `json:"photo_size,omitempty"`
PhotoWidth int `json:"photo_width,omitempty"`
PhotoHeight int `json:"photo_height,omitempty"`
NeedName bool `json:"need_name,omitempty"`
NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
NeedEmail bool `json:"need_email,omitempty"`
NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"`
SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
IsFlexible bool `json:"is_flexible,omitempty"`
}
type DebugHandler ¶ added in v0.7.5
type DeclineSuggestedPostParams ¶ added in v1.17.0
type DeclineSuggestedPostParams struct {
ChatID int64 `json:"chat_id"`
MessageID int `json:"message_id"`
Comment string `json:"comment,omitempty"`
}
DeclineSuggestedPostParams https://core.telegram.org/bots/api#declinesuggestedpost
type DeleteAllMessageReactionsParams ¶ added in v1.21.0
type DeleteBusinessAccountGiftParams ¶ added in v1.28.0
type DeleteBusinessAccountGiftParams struct {
BusinessConnectionID string `json:"business_connection_id"`
OwnedGiftID string `json:"owned_gift_id"`
}
DeleteBusinessAccountGiftParams https://core.telegram.org/bots/api#deletebusinessaccountgift
type DeleteBusinessMessagesParams ¶ added in v1.15.0
type DeleteBusinessMessagesParams struct {
BusinessConnectionID string `json:"business_connection_id"`
MessageIDs []int `json:"message_ids"`
}
DeleteBusinessMessagesParams https://core.telegram.org/bots/api#deletebusinessmessages
type DeleteChatPhotoParams ¶
type DeleteChatPhotoParams struct {
ChatID any `json:"chat_id"`
}
type DeleteEphemeralMessageParams ¶ added in v1.23.0
type DeleteEphemeralMessageParams struct {
ChatID any `json:"chat_id"`
ReceiverUserID int64 `json:"receiver_user_id"`
EphemeralMessageID int `json:"ephemeral_message_id"`
}
DeleteEphemeralMessageParams https://core.telegram.org/bots/api#deleteephemeralmessage
type DeleteForumTopicParams ¶ added in v0.3.1
type DeleteMessageParams ¶
DeleteMessageParams https://core.telegram.org/bots/api#deletemessage
type DeleteMessageReactionParams ¶ added in v1.21.0
type DeleteMessagesParams ¶ added in v1.0.0
type DeleteMessagesParams struct {
ChatID any `json:"chat_id"`
MessageIDs []int `json:"message_ids"`
}
DeleteMessagesParams https://core.telegram.org/bots/api#deletemessages
type DeleteMyCommandsParams ¶
type DeleteMyCommandsParams struct {
Scope models.BotCommandScope `json:"scope,omitempty"`
LanguageCode string `json:"language_code,omitempty"`
}
type DeleteStickerFromSetParams ¶
type DeleteStickerFromSetParams struct {
Sticker string `json:"sticker"`
}
type DeleteStickerSetParams ¶ added in v0.7.0
type DeleteStickerSetParams struct {
Name string `json:"name"`
}
type DeleteStoryParams ¶ added in v1.15.0
type DeleteStoryParams struct {
BusinessConnectionID string `json:"business_connection_id"`
StoryID int `json:"story_id"`
}
DeleteStoryParams https://core.telegram.org/bots/api#deletestory
type DeleteWebhookParams ¶
type DeleteWebhookParams struct {
DropPendingUpdates bool `json:"drop_pending_updates,omitempty"`
}
type EditChatInviteLinkParams ¶
type EditChatInviteLinkParams struct {
ChatID any `json:"chat_id"`
InviteLink string `json:"invite_link"`
Name string `json:"name,omitempty"`
ExpireDate int `json:"expire_date,omitempty"`
MemberLimit int `json:"member_limit,omitempty"`
CreatesJoinRequest bool `json:"creates_join_request,omitempty"`
}
type EditChatSubscriptionInviteLinkParams ¶ added in v1.7.0
type EditEphemeralMessageCaptionParams ¶ added in v1.23.0
type EditEphemeralMessageCaptionParams struct {
ChatID any `json:"chat_id"`
ReceiverUserID int64 `json:"receiver_user_id"`
EphemeralMessageID int `json:"ephemeral_message_id"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup *models.InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditEphemeralMessageCaptionParams https://core.telegram.org/bots/api#editephemeralmessagecaption
type EditEphemeralMessageMediaParams ¶ added in v1.23.0
type EditEphemeralMessageMediaParams struct {
ChatID any `json:"chat_id"`
ReceiverUserID int64 `json:"receiver_user_id"`
EphemeralMessageID int `json:"ephemeral_message_id"`
Media models.InputMedia `json:"media"`
ReplyMarkup *models.InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditEphemeralMessageMediaParams https://core.telegram.org/bots/api#editephemeralmessagemedia
type EditEphemeralMessageReplyMarkupParams ¶ added in v1.23.0
type EditEphemeralMessageReplyMarkupParams struct {
ChatID any `json:"chat_id"`
ReceiverUserID int64 `json:"receiver_user_id"`
EphemeralMessageID int `json:"ephemeral_message_id"`
ReplyMarkup *models.InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditEphemeralMessageReplyMarkupParams https://core.telegram.org/bots/api#editephemeralmessagereplymarkup
type EditEphemeralMessageTextParams ¶ added in v1.23.0
type EditEphemeralMessageTextParams struct {
ChatID any `json:"chat_id"`
ReceiverUserID int64 `json:"receiver_user_id"`
EphemeralMessageID int `json:"ephemeral_message_id"`
Text string `json:"text,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
Entities []models.MessageEntity `json:"entities,omitempty"`
RichMessage *models.InputRichMessage `json:"rich_message,omitempty"`
LinkPreviewOptions *models.LinkPreviewOptions `json:"link_preview_options,omitempty"`
ReplyMarkup *models.InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditEphemeralMessageTextParams https://core.telegram.org/bots/api#editephemeralmessagetext
type EditForumTopicParams ¶ added in v0.3.1
type EditGeneralForumTopicParams ¶ added in v0.3.4
type EditMessageCaptionParams ¶
type EditMessageCaptionParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
type EditMessageChecklistParams ¶ added in v1.16.0
type EditMessageChecklistParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID int64 `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
Checklist models.InputChecklist `json:"checklist"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
EditMessageChecklistParams https://core.telegram.org/bots/api#editmessagechecklist
type EditMessageLiveLocationParams ¶
type EditMessageLiveLocationParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
LivePeriod int `json:"live_period,omitempty"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
Heading int `json:"heading,omitempty"`
ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
type EditMessageMediaParams ¶
type EditMessageMediaParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
Media models.InputMedia `json:"media"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
type EditMessageReplyMarkupParams ¶
type EditMessageReplyMarkupParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
type EditMessageTextParams ¶
type EditMessageTextParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
Text string `json:"text"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
Entities []models.MessageEntity `json:"entities,omitempty"`
LinkPreviewOptions *models.LinkPreviewOptions `json:"link_preview_options,omitempty"`
RichMessage *models.InputRichMessage `json:"rich_message,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
EditMessageTextParams https://core.telegram.org/bots/api#editmessagetext
type EditMessageWidgetDataParams ¶ added in v1.28.0
type EditMessageWidgetDataParams struct {
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
PublicData *string `json:"public_data,omitempty"`
ChatData *string `json:"chat_data,omitempty"`
}
EditMessageWidgetDataParams https://core.telegram.org/bots/api#editmessagewidgetdata
type EditSharedWidgetDataParams ¶ added in v1.28.0
type EditSharedWidgetDataParams struct {
}
EditSharedWidgetDataParams https://core.telegram.org/bots/api#editsharedwidgetdata
type EditStoryParams ¶ added in v1.15.0
type EditStoryParams struct {
BusinessConnectionID string `json:"business_connection_id"`
StoryID int `json:"story_id"`
Content models.InputStoryContent `json:"content"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
Areas []models.StoryArea `json:"areas,omitempty"`
}
EditStoryParams https://core.telegram.org/bots/api#editstory
type EditUserStarSubscriptionParams ¶ added in v1.11.0
type EditUserStarSubscriptionParams struct {
UserID int64 `json:"user_id"`
TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
IsCanceled bool `json:"is_canceled"`
}
EditUserStarSubscriptionParams https://core.telegram.org/bots/api#edituserstarsubscription
type ErrorsHandler ¶
type ErrorsHandler func(err error)
type ExportChatInviteLinkParams ¶
type ExportChatInviteLinkParams struct {
ChatID any `json:"chat_id"`
}
type ForwardMessageParams ¶
type ForwardMessageParams struct {
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
FromChatID any `json:"from_chat_id"`
VideoStartTimestamp int `json:"video_start_timestamp,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
MessageID int `json:"message_id"`
}
ForwardMessageParams https://core.telegram.org/bots/api#forwardmessage
type ForwardMessagesParams ¶ added in v1.0.0
type ForwardMessagesParams struct {
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
FromChatID any `json:"from_chat_id"`
MessageIDs []int `json:"message_ids"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
}
ForwardMessagesParams https://core.telegram.org/bots/api#forwardmessages
type GetBusinessAccountGiftsParams ¶ added in v1.15.0
type GetBusinessAccountGiftsParams struct {
BusinessConnectionID string `json:"business_connection_id"`
ExcludeUnsaved bool `json:"exclude_unsaved,omitempty"`
ExcludeSaved bool `json:"exclude_saved,omitempty"`
ExcludeUnlimited bool `json:"exclude_unlimited,omitempty"`
ExcludeLimitedUpgradable bool `json:"exclude_limited_upgradable,omitempty"`
ExcludeLimitedNonUpgradable bool `json:"exclude_limited_non_upgradable,omitempty"`
ExcludeUnique bool `json:"exclude_unique,omitempty"`
ExcludeFromBlockchain bool `json:"exclude_from_blockchain,omitempty"`
SortByPrice bool `json:"sort_by_price,omitempty"`
Offset string `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
}
GetBusinessAccountGiftsParams https://core.telegram.org/bots/api#getbusinessaccountgifts
type GetBusinessAccountStarBalanceParams ¶ added in v1.15.0
type GetBusinessAccountStarBalanceParams struct {
BusinessConnectionID string `json:"business_connection_id"`
}
GetBusinessAccountStarBalanceParams https://core.telegram.org/bots/api#getbusinessaccountstarbalance
type GetBusinessConnectionParams ¶ added in v1.8.4
type GetBusinessConnectionParams struct {
BusinessConnectionID any `json:"business_connection_id"`
}
GetBusinessConnectionParams https://core.telegram.org/bots/api#getbusinessconnection
type GetChatGiftsParams ¶ added in v1.18.0
type GetChatGiftsParams struct {
ChatID any `json:"chat_id"`
Offset string `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
}
GetChatGiftsParams https://core.telegram.org/bots/api#getchatgifts
type GetChatMemberCountParams ¶
type GetChatMemberCountParams struct {
ChatID any `json:"chat_id"`
}
type GetChatMemberParams ¶
type GetChatMenuButtonParams ¶
type GetChatMenuButtonParams struct {
ChatID any `json:"chat_id"`
}
type GetChatParams ¶
type GetChatParams struct {
ChatID any `json:"chat_id"`
}
type GetCustomEmojiStickersParams ¶
type GetCustomEmojiStickersParams struct {
CustomEmojiIDs []string `json:"custom_emoji_ids"`
}
type GetFileParams ¶
type GetFileParams struct {
FileID string `json:"file_id"`
}
type GetGameHighScoresParams ¶
type GetManagedBotAccessSettingsParams ¶ added in v1.21.0
type GetManagedBotAccessSettingsParams struct {
UserID int64 `json:"user_id"`
}
type GetManagedBotTokenParams ¶ added in v1.21.0
type GetManagedBotTokenParams struct {
UserID int64 `json:"user_id"`
}
type GetMyCommandsParams ¶
type GetMyCommandsParams struct {
Scope models.BotCommandScope `json:"scope,omitempty"`
LanguageCode string `json:"language_code,omitempty"`
}
type GetMyDefaultAdministratorRightsParams ¶
type GetMyDefaultAdministratorRightsParams struct {
ForChannels bool `json:"for_channels,omitempty"`
}
type GetMyDescriptionParams ¶ added in v0.7.0
type GetMyDescriptionParams struct {
LanguageCode string `json:"language_code,omitempty"`
}
type GetMyNameParams ¶ added in v0.7.6
type GetMyNameParams struct {
LanguageCode string `json:"language_code,omitempty"`
}
type GetMyShortDescriptionParams ¶ added in v0.7.0
type GetMyShortDescriptionParams struct {
LanguageCode string `json:"language_code,omitempty"`
}
type GetStarTransactionsParams ¶ added in v1.5.0
type GetStickerSetParams ¶
type GetStickerSetParams struct {
Name string `json:"name"`
}
type GetUniqueGiftParams ¶ added in v1.28.0
type GetUniqueGiftParams struct {
Name string `json:"name"`
}
GetUniqueGiftParams https://core.telegram.org/bots/api#getuniquegift
type GetUserChatBoostsParams ¶ added in v1.0.0
GetUserChatBoostsParams https://core.telegram.org/bots/api#getuserchatboosts
type GetUserGiftsParams ¶ added in v1.18.0
type GetUserGiftsParams struct {
UserID int64 `json:"user_id"`
Offset string `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
}
GetUserGiftsParams https://core.telegram.org/bots/api#getusergifts
type GetUserPersonalChatMessagesParams ¶ added in v1.21.0
type GetUserProfileAudiosParams ¶ added in v1.19.0
type GetUserProfileAudiosParams struct {
UserID int64 `json:"user_id"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
}
GetUserProfileAudiosParams https://core.telegram.org/bots/api#getuserprofileaudios
type GiftPremiumSubscriptionParams ¶ added in v1.15.0
type GiftPremiumSubscriptionParams struct {
UserID int64 `json:"user_id"`
MonthCount int `json:"month_count"`
StarCount int `json:"star_count"`
Text string `json:"text,omitempty"`
TextParseMode string `json:"text_parse_mode,omitempty"`
TextEntities []models.MessageEntity `json:"text_entities,omitempty"`
}
GiftPremiumSubscriptionParams https://core.telegram.org/bots/api#giftpremiumsubscription
type HandlerType ¶
type HandlerType int
const ( HandlerTypeMessageText HandlerType = iota HandlerTypeCallbackQueryData HandlerTypeCallbackQueryGameShortName HandlerTypePhotoCaption HandlerTypeInlineQuery HandlerTypeWidgetQueryData )
type HideGeneralForumTopicParams ¶ added in v0.3.4
type HideGeneralForumTopicParams struct {
ChatID any `json:"chat_id"`
}
type LeaveChatParams ¶
type LeaveChatParams struct {
ChatID any `json:"chat_id"`
}
type Middleware ¶
type Middleware func(next HandlerFunc) HandlerFunc
type MigrateError ¶ added in v1.2.1
func (*MigrateError) Error ¶ added in v1.2.1
func (e *MigrateError) Error() string
type Option ¶
type Option func(b *Bot)
Option is a function that configures a bot.
func UseTestEnvironment ¶ added in v1.7.1
func UseTestEnvironment() Option
UseTestEnvironment allows to use test environment
func WithAllowedUpdates ¶ added in v1.1.5
func WithAllowedUpdates(params AllowedUpdates) Option
WithAllowedUpdates allows to set custom params for getUpdates method
func WithCallbackQueryDataHandler ¶
func WithCallbackQueryDataHandler(pattern string, matchType MatchType, handler HandlerFunc) Option
WithCallbackQueryDataHandler allows to set handler for incoming callback query Also you can use *bot.RegisterHandler function after bot creation
func WithCheckInitTimeout ¶ added in v0.3.0
WithCheckInitTimeout allows to redefine CheckInitTimeout
func WithDebug ¶
func WithDebug() Option
WithDebug allows to enable debug mode. In debug mode, all requests and responses are logged by debug handler
func WithDebugHandler ¶ added in v0.7.5
func WithDebugHandler(handler DebugHandler) Option
WithDebugHandler allows to set handler for debug messages
func WithDefaultHandler ¶
func WithDefaultHandler(handler HandlerFunc) Option
WithDefaultHandler allows to set default handler for incoming updates
func WithErrorsHandler ¶
func WithErrorsHandler(handler ErrorsHandler) Option
WithErrorsHandler allows to set handler for errors
func WithHTTPClient ¶
func WithHTTPClient(pollTimeout time.Duration, client HttpClient) Option
WithHTTPClient allows to set custom http client
func WithInitialOffset ¶ added in v1.13.3
WithInitialOffset allows to set initial offset for getUpdates method
func WithMessageTextHandler ¶
func WithMessageTextHandler(pattern string, matchType MatchType, handler HandlerFunc) Option
WithMessageTextHandler allows to set handler for incoming text messages Also you can use *bot.RegisterHandler function after bot creation
func WithMiddlewares ¶
func WithMiddlewares(middlewares ...Middleware) Option
WithMiddlewares allows to set middlewares for each incoming request
func WithNotAsyncHandlers ¶ added in v1.9.0
func WithNotAsyncHandlers() Option
WithNotAsyncHandlers allows to run handlers in the main goroutine
func WithPhotoCaptionHandler ¶ added in v1.12.1
func WithPhotoCaptionHandler(pattern string, matchType MatchType, handler HandlerFunc) Option
WithPhotoCaptionHandler allows to set handler for incoming photos with caption Also you can use *bot.RegisterHandler function after bot creation
func WithServerURL ¶
WithServerURL allows to set custom server url
func WithSkipGetMe ¶ added in v0.7.9
func WithSkipGetMe() Option
WithSkipGetMe allows skip call GetMe on bot init
func WithUpdatesChannelCap ¶ added in v1.2.0
WithUpdatesChannelCap allows setting custom capacity for the Updates channel
func WithWebhookSecretToken ¶ added in v1.6.0
WithWebhookSecretToken allows setting X-Telegram-Bot-Api-Secret-Token sent from Telegram servers
func WithWorkers ¶ added in v1.8.1
WithWorkers allows setting the number of workers that are processing the Updates channel
type PinChatMessageParams ¶
type PostStoryParams ¶ added in v1.15.0
type PostStoryParams struct {
BusinessConnectionID string `json:"business_connection_id"`
Content models.InputStoryContent `json:"content"`
ActivePeriod int `json:"active_period"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
Areas []models.StoryArea `json:"areas,omitempty"`
PostToChatPage bool `json:"post_to_chat_page,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
}
PostStoryParams https://core.telegram.org/bots/api#poststory
type PromoteChatMemberParams ¶
type PromoteChatMemberParams struct {
ChatID any `json:"chat_id" rules:"required,chat_id"`
UserID int64 `json:"user_id" rules:"required"`
IsAnonymous bool `json:"is_anonymous,omitempty"`
CanManageChat bool `json:"can_manage_chat,omitempty"`
CanDeleteMessages bool `json:"can_delete_messages,omitempty"`
CanManageVideoChats bool `json:"can_manage_video_chats,omitempty"`
CanRestrictMembers bool `json:"can_restrict_members,omitempty"`
CanPromoteMembers bool `json:"can_promote_members,omitempty"`
CanChangeInfo bool `json:"can_change_info,omitempty"`
CanInviteUsers bool `json:"can_invite_users,omitempty"`
CanPostMessages bool `json:"can_post_messages,omitempty"`
CanEditMessages bool `json:"can_edit_messages,omitempty"`
CanPinMessages bool `json:"can_pin_messages,omitempty"`
CanPostStories bool `json:"can_post_stories,omitempty"`
CanEditStories bool `json:"can_edit_stories,omitempty"`
CanDeleteStories bool `json:"can_delete_stories,omitempty"`
CanManageTopics bool `json:"can_manage_topics,omitempty"`
CanManageDirectMessages bool `json:"can_manage_direct_messages,omitempty"`
CanManageTags bool `json:"can_manage_tags,omitempty"`
CanSendWelcomeMessages bool `json:"can_send_welcome_messages,omitempty"`
}
type ReadBusinessMessageParams ¶ added in v1.15.0
type ReadBusinessMessageParams struct {
BusinessConnectionID string `json:"business_connection_id"`
ChatID int64 `json:"chat_id"`
MessageID int `json:"message_id"`
}
ReadBusinessMessageParams https://core.telegram.org/bots/api#readbusinessmessage
type RefundStarPaymentParams ¶ added in v1.4.0
type RemoveBusinessAccountProfilePhotoParams ¶ added in v1.15.0
type RemoveBusinessAccountProfilePhotoParams struct {
BusinessConnectionID string `json:"business_connection_id"`
IsPublic bool `json:"is_public,omitempty"`
}
RemoveBusinessAccountProfilePhotoParams https://core.telegram.org/bots/api#removebusinessaccountprofilephoto
type RemoveChatVerificationParams ¶ added in v1.13.0
type RemoveChatVerificationParams struct {
ChatID any `json:"chat_id"`
}
RemoveChatVerificationParams https://core.telegram.org/bots/api#removechatverification
type RemoveUserVerificationParams ¶ added in v1.13.0
type RemoveUserVerificationParams struct {
UserID int64 `json:"user_id"`
}
RemoveUserVerificationParams https://core.telegram.org/bots/api#removeuserverification
type ReopenForumTopicParams ¶ added in v0.3.1
type ReopenGeneralForumTopicParams ¶ added in v0.3.4
type ReopenGeneralForumTopicParams struct {
ChatID any `json:"chat_id"`
}
type ReplaceManagedBotTokenParams ¶ added in v1.21.0
type ReplaceManagedBotTokenParams struct {
UserID int64 `json:"user_id"`
}
type ReplaceStickerInSetParams ¶ added in v1.2.0
type ReplaceStickerInSetParams struct {
UserID int64 `json:"user_id"`
Name string `json:"name"`
OldSticker string `json:"old_sticker"`
Sticker models.InputSticker `json:"sticker"`
}
type RepostStoryParams ¶ added in v1.19.0
type RepostStoryParams struct {
BusinessConnectionID string `json:"business_connection_id"`
FromChatID int64 `json:"from_chat_id"`
FromStoryID int `json:"from_story_id"`
ActivePeriod int `json:"active_period"`
PostToChatPage bool `json:"post_to_chat_page,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
}
RepostStoryParams https://core.telegram.org/bots/api#repoststory
type SavePreparedInlineMessageParams ¶ added in v1.11.0
type SavePreparedInlineMessageParams struct {
UserID int64 `json:"user_id"`
Result models.InlineQueryResult `json:"result"`
AllowUserChats bool `json:"allow_user_chats,omitempty"`
AllowBotChats bool `json:"allow_bot_chats,omitempty"`
AllowGroupChats bool `json:"allow_group_chats,omitempty"`
AllowChannelChats bool `json:"allow_channel_chats,omitempty"`
}
SavePreparedInlineMessageParams https://core.telegram.org/bots/api#savepreparedinlinemessage
type SavePreparedKeyboardButtonParams ¶ added in v1.21.0
type SavePreparedKeyboardButtonParams struct {
UserID int64 `json:"user_id"`
Button models.KeyboardButton `json:"button"`
}
type SendAnimationParams ¶
type SendAnimationParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Animation models.InputFile `json:"animation"`
Duration int `json:"duration,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Thumbnail models.InputFile `json:"thumbnail,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendAnimationParams https://core.telegram.org/bots/api#sendanimation
type SendAudioParams ¶
type SendAudioParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Audio models.InputFile `json:"audio"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
Duration int `json:"duration,omitempty"`
Performer string `json:"performer,omitempty"`
Title string `json:"title,omitempty"`
Thumbnail models.InputFile `json:"thumbnail,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendAudioParams https://core.telegram.org/bots/api#sendaudio
type SendChatActionParams ¶
type SendChatActionParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
Action models.ChatAction `json:"action"`
}
type SendChecklistParams ¶ added in v1.16.0
type SendChecklistParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
Checklist models.InputChecklist `json:"checklist"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendChecklistParams https://core.telegram.org/bots/api#sendchecklist
type SendContactParams ¶
type SendContactParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name,omitempty"`
VCard string `json:"vcard,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendContactParams https://core.telegram.org/bots/api#sendcontact
type SendDiceParams ¶
type SendDiceParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
Emoji string `json:"emoji,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendDiceParams https://core.telegram.org/bots/api#senddice
type SendDocumentParams ¶
type SendDocumentParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Document models.InputFile `json:"document"`
Thumbnail models.InputFile `json:"thumbnail,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendDocumentParams https://core.telegram.org/bots/api#senddocument
type SendGameParams ¶
type SendGameParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
GameShorName string `json:"game_short_name"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendGameParams https://core.telegram.org/bots/api#sendgame
type SendGiftParams ¶ added in v1.11.0
type SendGiftParams struct {
UserID int64 `json:"user_id"`
ChatID any `json:"chat_id,omitempty"`
GiftID string `json:"gift_id"`
PayForUpgrade bool `json:"pay_for_upgrade,omitempty"`
Text string `json:"text,omitempty"`
TextParseMode models.ParseMode `json:"text_parse_mode,omitempty"`
TextEntities []models.MessageEntity `json:"text_entities,omitempty"`
}
SendGiftParams https://core.telegram.org/bots/api#sendgift
type SendInvoiceParams ¶
type SendInvoiceParams struct {
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
Title string `json:"title"`
Description string `json:"description"`
Payload string `json:"payload"`
ProviderToken string `json:"provider_token,omitempty"`
Currency string `json:"currency"`
Prices []models.LabeledPrice `json:"prices"`
MaxTipAmount int `json:"max_tip_amount,omitempty"`
SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"`
StartParameter string `json:"start_parameter,omitempty"`
ProviderData string `json:"provider_data,omitempty"`
PhotoURL string `json:"photo_url,omitempty"`
PhotoSize int `json:"photo_size,omitempty"`
PhotoWidth int `json:"photo_width,omitempty"`
PhotoHeight int `json:"photo_height,omitempty"`
NeedName bool `json:"need_name,omitempty"`
NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
NeedEmail bool `json:"need_email,omitempty"`
NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"`
SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
IsFlexible bool `json:"is_flexible,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendInvoiceParams https://core.telegram.org/bots/api#sendinvoice
type SendLivePhotoParams ¶ added in v1.21.0
type SendLivePhotoParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
LivePhoto models.InputFile `json:"live_photo"`
Photo models.InputFile `json:"photo"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
type SendLocationParams ¶
type SendLocationParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
LivePeriod int `json:"live_period,omitempty"`
Heading int `json:"heading,omitempty"`
ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendLocationParams https://core.telegram.org/bots/api#sendlocation
type SendMediaGroupParams ¶
type SendMediaGroupParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
Media []models.InputMedia `json:"media"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
}
SendMediaGroupParams https://core.telegram.org/bots/api#sendmediagroup
type SendMessageDraftParams ¶ added in v1.18.0
type SendMessageDraftParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DraftID string `json:"draft_id"`
Text string `json:"text"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
Entities []models.MessageEntity `json:"entities,omitempty"`
CanStop bool `json:"can_stop,omitempty"`
KeepOnStop bool `json:"keep_on_stop,omitempty"`
}
SendMessageDraftParams https://core.telegram.org/bots/api#sendmessagedraft
type SendMessageParams ¶
type SendMessageParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Text string `json:"text"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
Entities []models.MessageEntity `json:"entities,omitempty"`
LinkPreviewOptions *models.LinkPreviewOptions `json:"link_preview_options,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendMessageParams https://core.telegram.org/bots/api#sendmessage
type SendPaidMediaParams ¶ added in v1.6.0
type SendPaidMediaParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
StarCount int `json:"star_count"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
Media []models.InputPaidMedia `json:"media"`
Payload string `json:"payload,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendPaidMediaParams https://core.telegram.org/bots/api#sendpaidmedia
type SendPhotoParams ¶
type SendPhotoParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Photo models.InputFile `json:"photo"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendPhotoParams https://core.telegram.org/bots/api#sendphoto
type SendPollParams ¶
type SendPollParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
Question string `json:"question"`
QuestionParseMode models.ParseMode `json:"question_parse_mode,omitempty"`
QuestionEntities []models.MessageEntity `json:"question_entities,omitempty"`
Options []models.InputPollOption `json:"options"`
IsAnonymous *bool `json:"is_anonymous,omitempty"`
Type string `json:"type,omitempty"`
AllowsMultipleAnswers bool `json:"allows_multiple_answers,omitempty"`
CorrectOptionIDs []int `json:"correct_option_ids,omitempty"`
Explanation string `json:"explanation,omitempty"`
ExplanationParseMode string `json:"explanation_parse_mode,omitempty"`
ExplanationEntities []models.MessageEntity `json:"explanation_entities,omitempty"`
Description string `json:"description,omitempty"`
DescriptionParseMode models.ParseMode `json:"description_parse_mode,omitempty"`
DescriptionEntities []models.MessageEntity `json:"description_entities,omitempty"`
Media models.InputMedia `json:"media,omitempty"`
ExplanationMedia models.InputMedia `json:"explanation_media,omitempty"`
MembersOnly bool `json:"members_only,omitempty"`
CountryCodes []string `json:"country_codes,omitempty"`
AllowsRevoting bool `json:"allows_revoting,omitempty"`
ShuffleOptions bool `json:"shuffle_options,omitempty"`
AllowAddingOptions bool `json:"allow_adding_options,omitempty"`
HideResultsUntilCloses bool `json:"hide_results_until_closes,omitempty"`
OpenPeriod int `json:"open_period,omitempty"`
CloseDate int `json:"close_date,omitempty"`
IsClosed bool `json:"is_closed,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendPollParams https://core.telegram.org/bots/api#sendpoll
type SendRichMessageDraftParams ¶ added in v1.22.0
type SendRichMessageDraftParams struct {
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DraftID int `json:"draft_id"`
RichMessage models.InputRichMessage `json:"rich_message"`
CanStop bool `json:"can_stop,omitempty"`
KeepOnStop bool `json:"keep_on_stop,omitempty"`
}
SendRichMessageDraftParams https://core.telegram.org/bots/api#sendrichmessagedraft
type SendRichMessageParams ¶ added in v1.22.0
type SendRichMessageParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
RichMessage models.InputRichMessage `json:"rich_message"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendRichMessageParams https://core.telegram.org/bots/api#sendrichmessage
type SendSharedWidgetParams ¶ added in v1.28.0
type SendSharedWidgetParams struct {
}
SendSharedWidgetParams https://core.telegram.org/bots/api#sendsharedwidget
type SendStickerParams ¶
type SendStickerParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Sticker models.InputFile `json:"sticker"`
Emoji string `json:"emoji,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendStickerParams https://core.telegram.org/bots/api#sendsticker
type SendVenueParams ¶
type SendVenueParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title"`
Address string `json:"address"`
FoursquareID string `json:"foursquare_id,omitempty"`
FoursquareType string `json:"foursquare_type,omitempty"`
GooglePlaceID string `json:"google_place_id,omitempty"`
GooglePlaceType string `json:"google_place_type,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendVenueParams https://core.telegram.org/bots/api#sendvenue
type SendVideoNoteParams ¶
type SendVideoNoteParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
VideoNote models.InputFile `json:"video_note"`
Duration int `json:"duration,omitempty"`
Length int `json:"length,omitempty"`
Thumbnail models.InputFile `json:"thumbnail,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendVideoNoteParams https://core.telegram.org/bots/api#sendvideonote
type SendVideoParams ¶
type SendVideoParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Video models.InputFile `json:"video"`
Duration int `json:"duration,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Thumbnail models.InputFile `json:"thumbnail,omitempty"`
Cover models.InputFile `json:"cover,omitempty"`
StartTimestamp int `json:"start_timestamp,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
SupportsStreaming bool `json:"supports_streaming,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendVideoParams https://core.telegram.org/bots/api#sendvideo
type SendVoiceParams ¶
type SendVoiceParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopicID int `json:"direct_messages_topic_id,omitempty"`
EphemeralMessageParameters *models.EphemeralMessageParameters `json:"ephemeral_message_parameters,omitempty"`
Voice models.InputFile `json:"voice"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
Duration int `json:"duration,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
SuggestedPostParameters *models.SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendVoiceParams https://core.telegram.org/bots/api#sendvoice
type SendWidgetParams ¶ added in v1.28.0
type SendWidgetParams struct {
ChatID any `json:"chat_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
HTML string `json:"html"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
PublicData string `json:"public_data,omitempty"`
ChatData string `json:"chat_data,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode models.ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []models.MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
AllowQueries bool `json:"allow_queries,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ProtectContent bool `json:"protect_content,omitempty"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast,omitempty"`
MessageEffectID string `json:"message_effect_id,omitempty"`
ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
SendWidgetParams https://core.telegram.org/bots/api#sendwidget
type SetBusinessAccountBioParams ¶ added in v1.15.0
type SetBusinessAccountBioParams struct {
BusinessConnectionID string `json:"business_connection_id"`
Bio string `json:"bio,omitempty"`
}
SetBusinessAccountBioParams https://core.telegram.org/bots/api#setbusinessaccountbio
type SetBusinessAccountGiftSettingsParams ¶ added in v1.15.0
type SetBusinessAccountGiftSettingsParams struct {
BusinessConnectionID string `json:"business_connection_id"`
ShowGiftButton bool `json:"show_gift_button"`
AcceptedGiftTypes models.AcceptedGiftTypes `json:"accepted_gift_types"`
}
SetBusinessAccountGiftSettingsParams https://core.telegram.org/bots/api#setbusinessaccountgiftsettings
type SetBusinessAccountNameParams ¶ added in v1.15.0
type SetBusinessAccountNameParams struct {
BusinessConnectionID string `json:"business_connection_id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name,omitempty"`
}
SetBusinessAccountNameParams https://core.telegram.org/bots/api#setbusinessaccountname
type SetBusinessAccountProfilePhotoParams ¶ added in v1.15.0
type SetBusinessAccountProfilePhotoParams struct {
BusinessConnectionID string `json:"business_connection_id"`
Photo models.InputProfilePhoto `json:"photo"`
IsPublic bool `json:"is_public,omitempty"`
}
SetBusinessAccountProfilePhotoParams https://core.telegram.org/bots/api#setbusinessaccountprofilephoto
type SetBusinessAccountUsernameParams ¶ added in v1.15.0
type SetBusinessAccountUsernameParams struct {
BusinessConnectionID string `json:"business_connection_id"`
Username string `json:"username,omitempty"`
}
SetBusinessAccountUsernameParams https://core.telegram.org/bots/api#setbusinessaccountusername
type SetChatMemberTagParams ¶ added in v1.20.0
type SetChatMemberTagParams struct {
ChatID any `json:"chat_id" rules:"required,chat_id"`
UserID int64 `json:"user_id" rules:"required"`
Tag string `json:"tag,omitempty"`
}
SetChatMemberTagParams https://core.telegram.org/bots/api#setchatmembertag
type SetChatMenuButtonParams ¶
type SetChatMenuButtonParams struct {
ChatID any `json:"chat_id,omitempty"`
MenuButton models.InputMenuButton `json:"menu_button"`
}
type SetChatPermissionsParams ¶
type SetChatPermissionsParams struct {
ChatID any `json:"chat_id"`
Permissions models.ChatPermissions `json:"permissions"`
UseIndependentChatPermissions bool `json:"use_independent_chat_permissions,omitempty"`
}
type SetChatPhotoParams ¶
type SetChatStickerSetParams ¶
type SetChatTitleParams ¶
type SetCustomEmojiStickerSetThumbnailParams ¶ added in v0.7.0
type SetGameScoreParams ¶
type SetGameScoreParams struct {
UserID int64 `json:"user_id"`
Score int `json:"score"`
Force bool `json:"force,omitempty"`
DisableEditMessage bool `json:"disable_edit_message,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID int `json:"inline_message_id,omitempty"`
}
type SetManagedBotAccessSettingsParams ¶ added in v1.21.0
type SetMessageReactionParams ¶ added in v1.0.0
type SetMessageReactionParams struct {
ChatID any `json:"chat_id"`
MessageID int `json:"message_id"`
Reaction []models.ReactionType `json:"reaction,omitempty"`
IsBig *bool `json:"is_big,omitempty"`
}
SetMessageReactionParams https://core.telegram.org/bots/api#setmessagereaction
type SetMyCommandsParams ¶
type SetMyCommandsParams struct {
Commands []models.BotCommand `json:"commands"`
Scope models.BotCommandScope `json:"scope,omitempty"`
LanguageCode string `json:"language_code,omitempty"`
}
type SetMyDefaultAdministratorRightsParams ¶
type SetMyDefaultAdministratorRightsParams struct {
Rights *models.ChatAdministratorRights `json:"rights,omitempty"`
ForChannels bool `json:"for_channels,omitempty"`
}
type SetMyDescriptionParams ¶ added in v0.7.0
type SetMyNameParams ¶ added in v0.7.6
type SetMyProfilePhotoParams ¶ added in v1.19.0
type SetMyProfilePhotoParams struct {
Photo models.InputProfilePhoto `json:"photo"`
}
SetMyProfilePhotoParams https://core.telegram.org/bots/api#setmyprofilephoto
type SetMyShortDescriptionParams ¶ added in v0.7.0
type SetPassportDataErrorsParams ¶
type SetPassportDataErrorsParams struct {
UserID int64 `json:"user_id"`
Errors []models.PassportElementError `json:"errors"`
}
type SetStickerEmojiListParams ¶ added in v0.7.0
type SetStickerKeywordsParams ¶ added in v0.7.0
type SetStickerMaskPositionParams ¶ added in v0.7.0
type SetStickerMaskPositionParams struct {
Sticker string `json:"sticker"`
MaskPosition models.MaskPosition `json:"mask_position"`
}
type SetStickerSetThumbnailParams ¶ added in v0.7.0
type SetStickerSetTitleParams ¶ added in v0.7.0
type SetUserEmojiStatusParams ¶ added in v1.11.0
type SetUserEmojiStatusParams struct {
UserID int64 `json:"user_id"`
EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"`
EmojiStatusExpirationDate int `json:"emoji_status_expiration_date,omitempty"`
}
SetUserEmojiStatusParams https://core.telegram.org/bots/api#setuseremojistatus
type SetWebhookParams ¶
type SetWebhookParams struct {
URL string `json:"url"`
Certificate models.InputFile `json:"certificate,omitempty"`
IPAddress string `json:"ip_address,omitempty"`
MaxConnections int `json:"max_connections,omitempty"`
AllowedUpdates []string `json:"allowed_updates,omitempty"`
DropPendingUpdates bool `json:"drop_pending_updates,omitempty"`
SecretToken string `json:"secret_token,omitempty"`
}
type StopMessageLiveLocationParams ¶
type StopMessageLiveLocationParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
type StopPollParams ¶
type StopPollParams struct {
BusinessConnectionID string `json:"business_connection_id,omitempty"`
ChatID any `json:"chat_id"`
MessageID int `json:"message_id"`
ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"`
}
type TooManyRequestsError ¶ added in v1.2.1
func (*TooManyRequestsError) Error ¶ added in v1.2.1
func (e *TooManyRequestsError) Error() string
type TransferBusinessAccountStarsParams ¶ added in v1.15.0
type TransferBusinessAccountStarsParams struct {
BusinessConnectionID string `json:"business_connection_id"`
StarCount int `json:"star_count"`
}
TransferBusinessAccountStarsParams https://core.telegram.org/bots/api#transferbusinessaccountstars
type TransferGiftParams ¶ added in v1.15.0
type TransferGiftParams struct {
BusinessConnectionID string `json:"business_connection_id"`
OwnedGiftID string `json:"owned_gift_id"`
NewOwnerChatID int64 `json:"new_owner_chat_id"`
StarCount int `json:"star_count"`
}
TransferGiftParams https://core.telegram.org/bots/api#transfergift
type UnbanChatMemberParams ¶
type UnhideGeneralForumTopicParams ¶ added in v0.3.4
type UnhideGeneralForumTopicParams struct {
ChatID any `json:"chat_id"`
}
type UnpinAllChatMessagesParams ¶
type UnpinAllChatMessagesParams struct {
ChatID any `json:"chat_id"`
}
type UnpinAllForumTopicMessagesParams ¶ added in v0.3.1
type UnpinAllGeneralForumTopicMessagesParams ¶ added in v0.7.15
type UnpinAllGeneralForumTopicMessagesParams struct {
ChatID any `json:"chat_id"`
}
type UnpinChatMessageParams ¶
type UpgradeGiftParams ¶ added in v1.15.0
type UpgradeGiftParams struct {
BusinessConnectionID string `json:"business_connection_id"`
OwnedGiftID string `json:"owned_gift_id"`
KeepOriginalDetails bool `json:"keep_original_details,omitempty"`
StarCount int `json:"star_count,omitempty"`
}
UpgradeGiftParams https://core.telegram.org/bots/api#upgradegift
type UploadStickerFileParams ¶
type VerifyChatParams ¶ added in v1.13.0
type VerifyChatParams struct {
ChatID any `json:"chat_id"`
CustomDescription string `json:"custom_description,omitempty"`
CustomDescriptionParseMode models.ParseMode `json:"custom_description_parse_mode,omitempty"`
CustomDescriptionEntities []models.MessageEntity `json:"custom_description_entities,omitempty"`
}
VerifyChatParams https://core.telegram.org/bots/api#verifychat
type VerifyUserParams ¶ added in v1.13.0
type VerifyUserParams struct {
UserID int64 `json:"user_id"`
CustomDescription string `json:"custom_description,omitempty"`
CustomDescriptionParseMode models.ParseMode `json:"custom_description_parse_mode,omitempty"`
CustomDescriptionEntities []models.MessageEntity `json:"custom_description_entities,omitempty"`
}
VerifyUserParams https://core.telegram.org/bots/api#verifyuser
type WebAppUser ¶ added in v1.13.0
type WebAppUser struct {
ID int64 `json:"id"`
IsBot bool `json:"is_bot"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
LanguageCode string `json:"language_code"`
IsPremium bool `json:"is_premium"`
AddedToAttachmentMenu bool `json:"added_to_attachment_menu"`
AllowsWriteToPM bool `json:"allows_write_to_pm"`
PhotoURL string `json:"photo_url"`
}
WebAppUser represents user model from webapp request
func ValidateWebappRequest ¶ added in v1.6.1
func ValidateWebappRequest(values url.Values, token string) (user *WebAppUser, ok bool)
ValidateWebappRequest validates Mini App init data. values must already be decoded, as returned by url.ParseQuery or http.Request.URL.Query. The function does not modify values.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
command_handler
command
|
|
|
commands
command
|
|
|
create_new_sticker_set
command
|
|
|
echo
command
|
|
|
echo_with_webhook
command
|
|
|
edit_message
command
|
|
|
getme
command
|
|
|
handler_match_func
command
|
|
|
inline_keyboard
command
|
|
|
inline_keyboard_multiselect
command
|
|
|
inline_mode
command
|
|
|
inline_mode_webhook_reply
command
|
|
|
middleware
command
|
|
|
payment
command
|
|
|
send_document
command
|
|
|
send_media_group
command
|
|
|
send_paid_media
command
|
|
|
send_photo
command
|
|
|
send_photo_upload
command
|
|
|
send_video
command
|
|
|
streaming_draft
command
|
|