Documentation ¶
Index ¶
- func EscapeMarkdown(s string) string
- func EscapeMarkdownUnescaped(s string) string
- func False() *bool
- func RandomString(n int) string
- func True() *bool
- type AddStickerToSetParams
- 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) CreateChatInviteLink(ctx context.Context, params *CreateChatInviteLinkParams) (*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) 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) 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) ExportChatInviteLink(ctx context.Context, params *ExportChatInviteLinkParams) (string, error)
- func (b *Bot) ForwardMessage(ctx context.Context, params *ForwardMessageParams) (*models.Message, error)
- func (b *Bot) GetChat(ctx context.Context, params *GetChatParams) (*models.Chat, 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) GetStickerSet(ctx context.Context, params *GetStickerSetParams) (*models.StickerSet, 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) RegisterHandler(handlerType HandlerType, pattern string, matchType MatchType, f HandlerFunc) string
- func (b *Bot) RegisterHandlerMatchFunc(matchFunc MatchFunc, f HandlerFunc) string
- func (b *Bot) RegisterHandlerRegexp(handlerType HandlerType, re *regexp.Regexp, f HandlerFunc) 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) RestrictChatMember(ctx context.Context, params *RestrictChatMemberParams) (bool, error)
- func (b *Bot) RevokeChatInviteLink(ctx context.Context, params *RevokeChatInviteLinkParams) (*models.ChatInviteLink, 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) 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) 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) 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) 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) 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 CreateChatInviteLinkParams
- type CreateForumTopicParams
- type CreateInvoiceLinkParams
- type CreateNewStickerSetParams
- type DebugHandler
- type DeclineChatJoinRequestParams
- type DeleteChatPhotoParams
- type DeleteChatStickerSetParams
- type DeleteForumTopicParams
- type DeleteMessageParams
- type DeleteMyCommandsParams
- type DeleteStickerFromSetParams
- type DeleteStickerSetParams
- type DeleteWebhookParams
- type EditChatInviteLinkParams
- type EditForumTopicParams
- type EditGeneralForumTopicParams
- type EditMessageCaptionParams
- type EditMessageLiveLocationParams
- type EditMessageMediaParams
- type EditMessageReplyMarkupParams
- type EditMessageTextParams
- type ErrorsHandler
- type ExportChatInviteLinkParams
- type ForwardMessageParams
- 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 GetStickerSetParams
- type GetUserProfilePhotosParams
- type HandlerFunc
- type HandlerType
- type HideGeneralForumTopicParams
- type HttpClient
- type LeaveChatParams
- type MatchFunc
- type MatchType
- type Middleware
- type 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 WithServerURL(serverURL string) Option
- func WithSkipGetMe() Option
- type PinChatMessageParams
- type PromoteChatMemberParams
- type ReopenForumTopicParams
- type ReopenGeneralForumTopicParams
- type RestrictChatMemberParams
- type RevokeChatInviteLinkParams
- type SendAnimationParams
- type SendAudioParams
- type SendChatActionParams
- type SendContactParams
- type SendDiceParams
- type SendDocumentParams
- type SendGameParams
- type SendInvoiceParams
- type SendLocationParams
- type SendMediaGroupParams
- type SendMessageParams
- 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 SetMyCommandsParams
- type SetMyDefaultAdministratorRightsParams
- type SetMyDescriptionParams
- type SetMyNameParams
- type SetMyShortDescriptionParams
- type SetPassportDataErrorsParams
- type SetStickerEmojiListParams
- type SetStickerKeywordsParams
- type SetStickerMaskPositionParams
- type SetStickerPositionInSetParams
- type SetStickerSetThumbnailParams
- type SetStickerSetTitleParams
- type SetWebhookParams
- type StopMessageLiveLocationParams
- type StopPollParams
- type UnbanChatMemberParams
- type UnbanChatSenderChatParams
- type UnhideGeneralForumTopicParams
- type UnpinAllChatMessagesParams
- type UnpinAllForumTopicMessagesParams
- type UnpinChatMessageParams
- type UploadStickerFileParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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 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) CreateChatInviteLink ¶
func (b *Bot) CreateChatInviteLink(ctx context.Context, params *CreateChatInviteLinkParams) (*models.ChatInviteLink, error)
CreateChatInviteLink https://core.telegram.org/bots/api#createchatinvitelink
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) 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) 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) ExportChatInviteLink ¶
func (b *Bot) ExportChatInviteLink(ctx context.Context, params *ExportChatInviteLinkParams) (string, error)
ExportChatInviteLink https://core.telegram.org/bots/api#exportchatinvitelink
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) 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) GetStickerSet ¶
func (b *Bot) GetStickerSet(ctx context.Context, params *GetStickerSetParams) (*models.StickerSet, error)
GetStickerSet https://core.telegram.org/bots/api#getstickerset
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) RegisterHandler ¶
func (b *Bot) RegisterHandler(handlerType HandlerType, pattern string, matchType MatchType, f HandlerFunc) string
func (*Bot) RegisterHandlerMatchFunc ¶ added in v0.3.3
func (b *Bot) RegisterHandlerMatchFunc(matchFunc MatchFunc, f HandlerFunc) string
func (*Bot) RegisterHandlerRegexp ¶
func (b *Bot) RegisterHandlerRegexp(handlerType HandlerType, re *regexp.Regexp, f HandlerFunc) 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) 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) 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) 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) 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) 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) 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 string `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"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,omitempty"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type CreateForumTopicParams ¶ added in v0.3.1
type CreateInvoiceLinkParams ¶
type CreateInvoiceLinkParams struct { Title string `json:"title"` Description string `json:"description"` Payload string `json:"payload"` ProviderToken string `json:"provider_token"` Currency string `json:"currency"` Prices []models.LabeledPrice `json:"prices"` MaxTipAmount int `json:"max_tip_amount,omitempty"` SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"` ProviderData string `json:"provider_data,omitempty"` PhotoURL string `json:"photo_url,omitempty"` PhotoSize int `json:"photo_size,omitempty"` PhotoWidth int `json:"photo_width,omitempty"` PhotoHeight int `json:"photo_height,omitempty"` NeedName bool `json:"need_name,omitempty"` NeedPhoneNumber bool `json:"need_phone_number,omitempty"` NeedEmail bool `json:"need_email,omitempty"` NeedShippingAddress bool `json:"need_shipping_address,omitempty"` SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"` SendEmailToProvider bool `json:"send_email_to_provider,omitempty"` IsFlexible bool `json:"is_flexible,omitempty"` }
type CreateNewStickerSetParams ¶
type CreateNewStickerSetParams struct { UserID int64 `json:"user_id"` Name string `json:"name"` Title string `json:"title"` Sticker models.InputFile `json:"sticker"` StickerFormat string `json:"sticker_format"` StickerType string `json:"sticker_type,omitempty"` NeedsRepainting bool `json:"needs_repainting,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 ¶
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 EditForumTopicParams ¶ added in v0.3.1
type EditGeneralForumTopicParams ¶ added in v0.3.4
type EditMessageCaptionParams ¶
type EditMessageCaptionParams struct { ChatID any `json:"chat_id"` 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"` DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type EditMessageLiveLocationParams ¶
type EditMessageLiveLocationParams struct { ChatID any `json:"chat_id"` MessageID int `json:"message_id,omitempty"` InlineMessageID string `json:"inline_message_id,omitempty"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` 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 { ChatID any `json:"chat_id"` 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 { ChatID any `json:"chat_id"` 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 { ChatID any `json:"chat_id"` 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:"caption_entities,omitempty"` DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
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 string `json:"from_chat_id"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,omitempty"` MessageID int `json:"message_id"` }
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 GetStickerSetParams ¶
type GetStickerSetParams struct {
Name string `json:"name"`
}
type HandlerType ¶
type HandlerType int
const ( HandlerTypeMessageText HandlerType = iota HandlerTypeCallbackQueryData )
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 Option ¶
type Option func(b *Bot)
Option is a function that configures a bot.
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 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
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"` CanPostMessages bool `json:"can_post_messages,omitempty"` CanEditMessages bool `json:"can_edit_messages,omitempty"` CanDeleteMessages bool `json:"can_delete_messages,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"` CanPinMessages bool `json:"can_pin_messages,omitempty"` CanManageTopics bool `json:"can_manage_topics,omitempty"` }
type ReopenForumTopicParams ¶ added in v0.3.1
type ReopenGeneralForumTopicParams ¶ added in v0.3.4
type ReopenGeneralForumTopicParams struct {
ChatID any `json:"chat_id"`
}
type SendAnimationParams ¶
type SendAnimationParams struct { 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"` HasSpoiler bool `json:"has_spoiler,omitempty"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,omitempty"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendAudioParams ¶
type SendAudioParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendChatActionParams ¶
type SendContactParams ¶
type SendContactParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendDiceParams ¶
type SendDiceParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendDocumentParams ¶
type SendDocumentParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendGameParams ¶
type SendGameParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
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"` 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendLocationParams ¶
type SendLocationParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendMediaGroupParams ¶
type SendMediaGroupParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` }
type SendMessageParams ¶
type SendMessageParams struct { 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"` DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,omitempty"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendPhotoParams ¶
type SendPhotoParams struct { 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"` HasSpoiler bool `json:"has_spoiler,omitempty"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,omitempty"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendPollParams ¶
type SendPollParams struct { ChatID any `json:"chat_id"` MessageThreadID int `json:"message_thread_id,omitempty"` Question string `json:"question"` Options []string `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"` ReplyToMessageID int `json:"reply_to_message_id"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendStickerParams ¶
type SendStickerParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendVenueParams ¶
type SendVenueParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendVideoNoteParams ¶
type SendVideoNoteParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendVideoParams ¶
type SendVideoParams struct { 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"` HasSpoiler bool `json:"has_spoiler,omitempty"` SupportsStreaming bool `json:"supports_streaming,omitempty"` DisableNotification bool `json:"disable_notification,omitempty"` ProtectContent bool `json:"protect_content,omitempty"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SendVoiceParams ¶
type SendVoiceParams struct { 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"` ReplyToMessageID int `json:"reply_to_message_id,omitempty"` AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
type SetChatMenuButtonParams ¶
type SetChatMenuButtonParams struct { ChatID any `json:"chat_id"` 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 int `json:"chat_id,omitempty"` MessageID int `json:"message_id,omitempty"` InlineMessageID int `json:"inline_message_id,omitempty"` }
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 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 { 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 { ChatID any `json:"chat_id"` MessageID int `json:"message_id"` ReplyMarkup models.ReplyMarkup `json:"reply_markup,omitempty"` }
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"`
}