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
- func ValidateWebappRequest(values url.Values, token string) (user *models.User, ok bool)
- type AddStickerToSetParams
- type AllowedUpdates
- type AnswerCallbackQueryParams
- type AnswerInlineQueryParams
- type AnswerPreCheckoutQueryParams
- type AnswerShippingQueryParams
- type AnswerWebAppQueryParams
- type ApproveChatJoinRequestParams
- 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) 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) ApproveChatJoinRequest(ctx context.Context, params *ApproveChatJoinRequestParams) (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) 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) DeleteChatPhoto(ctx context.Context, params *DeleteChatPhotoParams) (bool, error)
- func (b *Bot) DeleteChatStickerSet(ctx context.Context, params *DeleteChatStickerSetParams) (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) 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) 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) 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) 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) 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) 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) 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) 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) 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) GetStarTransactions(ctx context.Context, params *GetStarTransactionsParams) (*models.StarTransactions, error)
- func (b *Bot) GetStickerSet(ctx context.Context, params *GetStickerSetParams) (*models.StickerSet, error)
- func (b *Bot) GetUserChatBoosts(ctx context.Context, params *GetUserChatBoostsParams) (*models.UserChatBoosts, 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) HideGeneralForumTopic(ctx context.Context, params *HideGeneralForumTopicParams) (bool, error)
- 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) ProcessUpdate(ctx context.Context, upd *models.Update)
- func (b *Bot) PromoteChatMember(ctx context.Context, params *PromoteChatMemberParams) (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) 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) ReopenForumTopic(ctx context.Context, params *ReopenForumTopicParams) (bool, error)
- func (b *Bot) ReopenGeneralForumTopic(ctx context.Context, params *ReopenGeneralForumTopicParams) (bool, error)
- func (b *Bot) ReplaceStickerInSet(ctx context.Context, params *ReplaceStickerInSetParams) (bool, 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) 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) 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) 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) 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) 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) SetChatAdministratorCustomTitle(ctx context.Context, params *SetChatAdministratorCustomTitleParams) (bool, error)
- func (b *Bot) SetChatDescription(ctx context.Context, params *SetChatDescriptionParams) (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) 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) 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) 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) UploadStickerFile(ctx context.Context, params *UploadStickerFileParams) (*models.File, error)
- func (b *Bot) WebhookHandler() http.HandlerFunc
- type CloseForumTopicParams
- type CloseGeneralForumTopicParams
- type CopyMessageParams
- type CopyMessagesParams
- type CreateChatInviteLinkParams
- type CreateChatSubscriptionInviteLinkParams
- type CreateForumTopicParams
- type CreateInvoiceLinkParams
- type CreateNewStickerSetParams
- type DebugHandler
- type DeclineChatJoinRequestParams
- type DeleteChatPhotoParams
- type DeleteChatStickerSetParams
- type DeleteForumTopicParams
- type DeleteMessageParams
- type DeleteMessagesParams
- type DeleteMyCommandsParams
- type DeleteStickerFromSetParams
- type DeleteStickerSetParams
- type DeleteWebhookParams
- type EditChatInviteLinkParams
- type EditChatSubscriptionInviteLinkParams
- type EditForumTopicParams
- type EditGeneralForumTopicParams
- type EditMessageCaptionParams
- type EditMessageLiveLocationParams
- type EditMessageMediaParams
- type EditMessageReplyMarkupParams
- type EditMessageTextParams
- type EditUserStarSubscriptionParams
- type ErrorsHandler
- type ExportChatInviteLinkParams
- type ForwardMessageParams
- type ForwardMessagesParams
- type GetBusinessConnectionParams
- type GetChatAdministratorsParams
- type GetChatMemberCountParams
- type GetChatMemberParams
- type GetChatMenuButtonParams
- type GetChatParams
- type GetCustomEmojiStickersParams
- type GetFileParams
- type GetGameHighScoresParams
- type GetMyCommandsParams
- type GetMyDefaultAdministratorRightsParams
- type GetMyDescriptionParams
- type GetMyNameParams
- type GetMyShortDescriptionParams
- type GetStarTransactionsParams
- type GetStickerSetParams
- type GetUserChatBoostsParams
- type GetUserProfilePhotosParams
- 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 WithMessageTextHandler(pattern string, matchType MatchType, handler HandlerFunc) Option
- func WithMiddlewares(middlewares ...Middleware) Option
- func WithNotAsyncHandlers() 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 PromoteChatMemberParams
- type RefundStarPaymentParams
- type ReopenForumTopicParams
- type ReopenGeneralForumTopicParams
- type ReplaceStickerInSetParams
- type RestrictChatMemberParams
- type RevokeChatInviteLinkParams
- type SavePreparedInlineMessageParams
- type SendAnimationParams
- type SendAudioParams
- type SendChatActionParams
- type SendContactParams
- type SendDiceParams
- type SendDocumentParams
- type SendGameParams
- type SendGiftParams
- type SendInvoiceParams
- type SendLocationParams
- type SendMediaGroupParams
- type SendMessageParams
- type SendPaidMediaParams
- type SendPhotoParams
- type SendPollParams
- type SendStickerParams
- type SendVenueParams
- type SendVideoNoteParams
- type SendVideoParams
- type SendVoiceParams
- type SetChatAdministratorCustomTitleParams
- type SetChatDescriptionParams
- type SetChatMenuButtonParams
- type SetChatPermissionsParams
- type SetChatPhotoParams
- type SetChatStickerSetParams
- type SetChatTitleParams
- type SetCustomEmojiStickerSetThumbnailParams
- type SetGameScoreParams
- type SetMessageReactionParams
- type SetMyCommandsParams
- type SetMyDefaultAdministratorRightsParams
- type SetMyDescriptionParams
- type SetMyNameParams
- 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 UnbanChatMemberParams
- type UnbanChatSenderChatParams
- type UnhideGeneralForumTopicParams
- type UnpinAllChatMessagesParams
- type UnpinAllForumTopicMessagesParams
- type UnpinAllGeneralForumTopicMessagesParams
- type UnpinChatMessageParams
- type UploadStickerFileParams
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 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 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) 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) ApproveChatJoinRequest ¶
func (b *Bot) ApproveChatJoinRequest(ctx context.Context, params *ApproveChatJoinRequestParams) (bool, error)
ApproveChatJoinRequest https://core.telegram.org/bots/api#approvechatjoinrequest
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) UploadStickerFile ¶
func (b *Bot) UploadStickerFile(ctx context.Context, params *UploadStickerFileParams) (*models.File, error)
UploadStickerFile https://core.telegram.org/bots/api#uploadstickerfile
func (*Bot) WebhookHandler ¶
func (b *Bot) WebhookHandler() http.HandlerFunc
type CloseForumTopicParams ¶ added in v0.3.1
type CloseGeneralForumTopicParams ¶ added in v0.3.4
type CloseGeneralForumTopicParams struct {
ChatID any `json:"chat_id"`
}
type CopyMessageParams ¶
type CopyMessageParams struct { ChatID any `json:"chat_id"` MessageThreadID int `json:"message_thread_id,omitempty"` FromChatID any `json:"from_chat_id"` MessageID int `json:"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"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,omitempty"` AllowPaidBroadcast bool `json:"allow_paid_broadcast,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"` 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 DeleteChatPhotoParams ¶
type DeleteChatPhotoParams struct {
ChatID any `json:"chat_id"`
}
type DeleteForumTopicParams ¶ added in v0.3.1
type DeleteMessageParams ¶
DeleteMessageParams https://core.telegram.org/bots/api#deletemessage
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 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 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:"k,omitempty"` DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
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"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
EditMessageTextParams https://core.telegram.org/bots/api#editmessagetext
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"` FromChatID any `json:"from_chat_id"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,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"` 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 GetBusinessConnectionParams ¶ added in v1.8.4
type GetBusinessConnectionParams struct {
BusinessConnectionID any `json:"business_connection_id"`
}
GetBusinessConnectionParams https://core.telegram.org/bots/api#getbusinessconnection
type GetChatAdministratorsParams ¶
type GetChatAdministratorsParams struct {
ChatID any `json:"chat_id"`
}
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 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 GetUserChatBoostsParams ¶ added in v1.0.0
GetUserChatBoostsParams https://core.telegram.org/bots/api#getuserchatboosts
type HandlerType ¶
type HandlerType int
const ( HandlerTypeMessageText HandlerType = iota HandlerTypeCallbackQueryData HandlerTypeCallbackQueryGameShortName )
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 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 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 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"` }
type RefundStarPaymentParams ¶ added in v1.4.0
type ReopenForumTopicParams ¶ added in v0.3.1
type ReopenGeneralForumTopicParams ¶ added in v0.3.4
type ReopenGeneralForumTopicParams struct {
ChatID any `json:"chat_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 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 SendAnimationParams ¶
type SendAnimationParams struct { BusinessConnectionID string `json:"business_connection_id,omitempty"` ChatID any `json:"chat_id"` MessageThreadID int `json:"message_thread_id,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"` 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"` MessageThreadID int `json:"message_thread_id,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"` 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 SendContactParams ¶
type SendContactParams struct { BusinessConnectionID string `json:"business_connection_id,omitempty"` ChatID any `json:"chat_id"` MessageThreadID int `json:"message_thread_id,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"` 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"` 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"` 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"` MessageThreadID int `json:"message_thread_id,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"` 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"` GiftID string `json:"gift_id"` 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"` 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"` ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
SendInvoiceParams https://core.telegram.org/bots/api#sendinvoice
type SendLocationParams ¶
type SendLocationParams struct { BusinessConnectionID string `json:"business_connection_id,omitempty"` ChatID any `json:"chat_id"` MessageThreadID int `json:"message_thread_id,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"` 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"` 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 SendMessageParams ¶
type SendMessageParams struct { BusinessConnectionID string `json:"business_connection_id,omitempty"` ChatID any `json:"chat_id"` MessageThreadID int `json:"message_thread_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"` 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"` }
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"` 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"` 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"` MessageThreadID int `json:"message_thread_id,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"` 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"` CorrectOptionID int `json:"correct_option_id"` Explanation string `json:"explanation,omitempty"` ExplanationParseMode string `json:"explanation_parse_mode,omitempty"` ExplanationEntities []models.MessageEntity `json:"explanation_entities,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 SendStickerParams ¶
type SendStickerParams struct { BusinessConnectionID string `json:"business_connection_id,omitempty"` ChatID any `json:"chat_id"` MessageThreadID int `json:"message_thread_id,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"` 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"` MessageThreadID int `json:"message_thread_id,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"` 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"` MessageThreadID int `json:"message_thread_id,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"` 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"` MessageThreadID int `json:"message_thread_id,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"` 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"` 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"` MessageThreadID int `json:"message_thread_id,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"` ReplyParameters *models.ReplyParameters `json:"reply_parameters,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
SendVoiceParams https://core.telegram.org/bots/api#sendvoice
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 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 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 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"`
}