Versions in this module Expand all Collapse all v1 v1.9.18 Jun 18, 2024 v1.9.15 Jun 17, 2024 Changes in this version + const ExpectContinueTimeoutDefault + const ExpectContinueTimeoutFieldName + const IdleConnTimeoutDefault + const IdleConnTimeoutFieldName + const KeepAliveDefault + const KeepAliveFieldName + const MaxIdleConnsDefault + const MaxIdleConnsFieldName + const PasswordFieldName + const ProxyHostFieldName + const TLSHandshakeTimeoutDefault + const TLSHandshakeTimeoutFieldName + const TimeoutDefault + const TimeoutFieldName + const TokenFieldName + const UserFieldName + var Component = &app.Component + func New(config *Config, logger logger.Logger) (*telebot.Bot, error) + func NewWithConfigurator(config *Config, configurator configurator.Configurator, logger logger.Logger) (*telebot.Bot, error) + type Builder interface + ReBuild func(client *telebot.Bot) + type Config struct + ExpectContinueTimeout time.Duration + IdleConnTimeout time.Duration + KeepAlive time.Duration + MaxIdleConns uint16 + Password string + ProxyHost string + TLSHandshakeTimeout time.Duration + Timeout time.Duration + Token string + User string + func Configuration(config *Config, configurator configurator.Configurator) *Config + func NewConfig() *Config + type Group interface + Handle func(endpoint interface{}, handlerFunc telebot.HandlerFunc, ...) + Use func(middlewares ...telebot.MiddlewareFunc) + type Process struct + func NewProcess(telegram Telegram, informer logger.Informer) *Process + func (process *Process) Name() string + func (process *Process) Process(ctx context.Context) error + type ReConfiguration struct + func NewReConfiguration(client *telebot.Bot, logger logger.Logger, config *Config) *ReConfiguration + func NewReConfigurationWithConfigurator(config *Config, configurator configurator.Configurator, logger logger.Logger) (*ReConfiguration, error) + func (reConfiguration *ReConfiguration) Accept(query *telebot.PreCheckoutQuery, errorMessage ...string) error + func (reConfiguration *ReConfiguration) AddSticker(to telebot.Recipient, s telebot.StickerSet) error + func (reConfiguration *ReConfiguration) AdminsOf(chat *telebot.Chat) ([]telebot.ChatMember, error) + func (reConfiguration *ReConfiguration) Answer(query *telebot.Query, resp *telebot.QueryResponse) error + func (reConfiguration *ReConfiguration) AnswerWebApp(query *telebot.Query, r telebot.Result) (*telebot.WebAppMessage, error) + func (reConfiguration *ReConfiguration) ApproveJoinRequest(chat telebot.Recipient, user *telebot.User) error + func (reConfiguration *ReConfiguration) Ban(chat *telebot.Chat, member *telebot.ChatMember, revokeMessages ...bool) error + func (reConfiguration *ReConfiguration) BanSenderChat(chat *telebot.Chat, sender telebot.Recipient) error + func (reConfiguration *ReConfiguration) ChatByID(id int64) (*telebot.Chat, error) + func (reConfiguration *ReConfiguration) ChatByUsername(name string) (*telebot.Chat, error) + func (reConfiguration *ReConfiguration) ChatMemberOf(chat, user telebot.Recipient) (*telebot.ChatMember, error) + func (reConfiguration *ReConfiguration) Client() *telebot.Bot + func (reConfiguration *ReConfiguration) Close() (bool, error) + func (reConfiguration *ReConfiguration) Commands(opts ...interface{}) ([]telebot.Command, error) + func (reConfiguration *ReConfiguration) Copy(to telebot.Recipient, msg telebot.Editable, options ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) CreateInviteLink(chat telebot.Recipient, link *telebot.ChatInviteLink) (*telebot.ChatInviteLink, error) + func (reConfiguration *ReConfiguration) CreateInvoiceLink(i telebot.Invoice) (string, error) + func (reConfiguration *ReConfiguration) CreateStickerSet(to telebot.Recipient, s telebot.StickerSet) error + func (reConfiguration *ReConfiguration) CustomEmojiStickers(ids []string) ([]telebot.Sticker, error) + func (reConfiguration *ReConfiguration) DeclineJoinRequest(chat telebot.Recipient, user *telebot.User) error + func (reConfiguration *ReConfiguration) DefaultRights(forChannels bool) (*telebot.Rights, error) + func (reConfiguration *ReConfiguration) Delete(msg telebot.Editable) error + func (reConfiguration *ReConfiguration) DeleteCommands(opts ...interface{}) error + func (reConfiguration *ReConfiguration) DeleteGroupPhoto(chat *telebot.Chat) error + func (reConfiguration *ReConfiguration) DeleteGroupStickerSet(chat *telebot.Chat) error + func (reConfiguration *ReConfiguration) DeleteSticker(sticker string) error + func (reConfiguration *ReConfiguration) Download(file *telebot.File, localFilename string) error + func (reConfiguration *ReConfiguration) Edit(msg telebot.Editable, what interface{}, opts ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) EditCaption(msg telebot.Editable, caption string, opts ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) EditInviteLink(chat telebot.Recipient, link *telebot.ChatInviteLink) (*telebot.ChatInviteLink, error) + func (reConfiguration *ReConfiguration) EditMedia(msg telebot.Editable, media telebot.Inputtable, opts ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) EditReplyMarkup(msg telebot.Editable, markup *telebot.ReplyMarkup) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) File(file *telebot.File) (io.ReadCloser, error) + func (reConfiguration *ReConfiguration) FileByID(fileID string) (telebot.File, error) + func (reConfiguration *ReConfiguration) Forward(to telebot.Recipient, msg telebot.Editable, opts ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) GameScores(user telebot.Recipient, msg telebot.Editable) ([]telebot.GameHighScore, error) + func (reConfiguration *ReConfiguration) Group(name string) Group + func (reConfiguration *ReConfiguration) Handle(endpoint interface{}, h telebot.HandlerFunc, m ...telebot.MiddlewareFunc) + func (reConfiguration *ReConfiguration) InviteLink(chat *telebot.Chat) (string, error) + func (reConfiguration *ReConfiguration) Leave(chat *telebot.Chat) error + func (reConfiguration *ReConfiguration) Len(chat *telebot.Chat) (int, error) + func (reConfiguration *ReConfiguration) Logout() (bool, error) + func (reConfiguration *ReConfiguration) Me() *telebot.User + func (reConfiguration *ReConfiguration) MenuButton(chat *telebot.User) (*telebot.MenuButton, error) + func (reConfiguration *ReConfiguration) NewContext(u telebot.Update) telebot.Context + func (reConfiguration *ReConfiguration) NewMarkup() *telebot.ReplyMarkup + func (reConfiguration *ReConfiguration) Notify(to telebot.Recipient, action telebot.ChatAction) error + func (reConfiguration *ReConfiguration) OnError(err error, c telebot.Context) + func (reConfiguration *ReConfiguration) Pin(msg telebot.Editable, opts ...interface{}) error + func (reConfiguration *ReConfiguration) ProcessUpdate(u telebot.Update) + func (reConfiguration *ReConfiguration) ProfilePhotosOf(user *telebot.User) ([]telebot.Photo, error) + func (reConfiguration *ReConfiguration) Promote(chat *telebot.Chat, member *telebot.ChatMember) error + func (reConfiguration *ReConfiguration) Raw(method string, payload interface{}) ([]byte, error) + func (reConfiguration *ReConfiguration) ReConfiguration(configurator configurator.Configurator) error + func (reConfiguration *ReConfiguration) RemoveWebhook(dropPending ...bool) error + func (reConfiguration *ReConfiguration) Reply(to *telebot.Message, what interface{}, opts ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) Respond(c *telebot.Callback, resp ...*telebot.CallbackResponse) error + func (reConfiguration *ReConfiguration) Restrict(chat *telebot.Chat, member *telebot.ChatMember) error + func (reConfiguration *ReConfiguration) RevokeInviteLink(chat telebot.Recipient, link string) (*telebot.ChatInviteLink, error) + func (reConfiguration *ReConfiguration) Send(to telebot.Recipient, what interface{}, opts ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) SendAlbum(to telebot.Recipient, a telebot.Album, opts ...interface{}) ([]telebot.Message, error) + func (reConfiguration *ReConfiguration) SetAdminTitle(chat *telebot.Chat, user *telebot.User, title string) error + func (reConfiguration *ReConfiguration) SetCommands(opts ...interface{}) error + func (reConfiguration *ReConfiguration) SetDefaultRights(rights telebot.Rights, forChannels bool) error + func (reConfiguration *ReConfiguration) SetGameScore(user telebot.Recipient, msg telebot.Editable, score telebot.GameHighScore) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) SetGroupDescription(chat *telebot.Chat, description string) error + func (reConfiguration *ReConfiguration) SetGroupPermissions(chat *telebot.Chat, perms telebot.Rights) error + func (reConfiguration *ReConfiguration) SetGroupPhoto(chat *telebot.Chat, p *telebot.Photo) error + func (reConfiguration *ReConfiguration) SetGroupStickerSet(chat *telebot.Chat, setName string) error + func (reConfiguration *ReConfiguration) SetGroupTitle(chat *telebot.Chat, title string) error + func (reConfiguration *ReConfiguration) SetMenuButton(chat *telebot.User, mb interface{}) error + func (reConfiguration *ReConfiguration) SetStickerPosition(sticker string, position int) error + func (reConfiguration *ReConfiguration) SetStickerSetThumb(to telebot.Recipient, s telebot.StickerSet) error + func (reConfiguration *ReConfiguration) SetWebhook(w *telebot.Webhook) error + func (reConfiguration *ReConfiguration) Ship(query *telebot.ShippingQuery, what ...interface{}) error + func (reConfiguration *ReConfiguration) Start() + func (reConfiguration *ReConfiguration) StickerSet(name string) (*telebot.StickerSet, error) + func (reConfiguration *ReConfiguration) Stop() + func (reConfiguration *ReConfiguration) StopLiveLocation(msg telebot.Editable, opts ...interface{}) (*telebot.Message, error) + func (reConfiguration *ReConfiguration) StopPoll(msg telebot.Editable, opts ...interface{}) (*telebot.Poll, error) + func (reConfiguration *ReConfiguration) Unban(chat *telebot.Chat, user *telebot.User, forBanned ...bool) error + func (reConfiguration *ReConfiguration) UnbanSenderChat(chat *telebot.Chat, sender telebot.Recipient) error + func (reConfiguration *ReConfiguration) Unpin(chat *telebot.Chat, messageID ...int) error + func (reConfiguration *ReConfiguration) UnpinAll(chat *telebot.Chat) error + func (reConfiguration *ReConfiguration) UploadSticker(to telebot.Recipient, png *telebot.File) (*telebot.File, error) + func (reConfiguration *ReConfiguration) Use(middlewares ...telebot.MiddlewareFunc) + func (reConfiguration *ReConfiguration) Webhook() (*telebot.Webhook, error) + type Telegram interface + Accept func(query *telebot.PreCheckoutQuery, errorMessage ...string) error + AddSticker func(to telebot.Recipient, s telebot.StickerSet) error + AdminsOf func(chat *telebot.Chat) ([]telebot.ChatMember, error) + Answer func(query *telebot.Query, resp *telebot.QueryResponse) error + AnswerWebApp func(query *telebot.Query, r telebot.Result) (*telebot.WebAppMessage, error) + ApproveJoinRequest func(chat telebot.Recipient, user *telebot.User) error + Ban func(chat *telebot.Chat, member *telebot.ChatMember, revokeMessages ...bool) error + BanSenderChat func(chat *telebot.Chat, sender telebot.Recipient) error + ChatByID func(id int64) (*telebot.Chat, error) + ChatByUsername func(name string) (*telebot.Chat, error) + ChatMemberOf func(chat, user telebot.Recipient) (*telebot.ChatMember, error) + Close func() (bool, error) + Commands func(opts ...interface{}) ([]telebot.Command, error) + Copy func(to telebot.Recipient, msg telebot.Editable, options ...interface{}) (*telebot.Message, error) + CreateInviteLink func(chat telebot.Recipient, link *telebot.ChatInviteLink) (*telebot.ChatInviteLink, error) + CreateInvoiceLink func(i telebot.Invoice) (string, error) + CreateStickerSet func(to telebot.Recipient, s telebot.StickerSet) error + CustomEmojiStickers func(ids []string) ([]telebot.Sticker, error) + DeclineJoinRequest func(chat telebot.Recipient, user *telebot.User) error + DefaultRights func(forChannels bool) (*telebot.Rights, error) + Delete func(msg telebot.Editable) error + DeleteCommands func(opts ...interface{}) error + DeleteGroupPhoto func(chat *telebot.Chat) error + DeleteGroupStickerSet func(chat *telebot.Chat) error + DeleteSticker func(sticker string) error + Download func(file *telebot.File, localFilename string) error + Edit func(msg telebot.Editable, what interface{}, opts ...interface{}) (*telebot.Message, error) + EditCaption func(msg telebot.Editable, caption string, opts ...interface{}) (*telebot.Message, error) + EditInviteLink func(chat telebot.Recipient, link *telebot.ChatInviteLink) (*telebot.ChatInviteLink, error) + EditMedia func(msg telebot.Editable, media telebot.Inputtable, opts ...interface{}) (*telebot.Message, error) + EditReplyMarkup func(msg telebot.Editable, markup *telebot.ReplyMarkup) (*telebot.Message, error) + File func(file *telebot.File) (io.ReadCloser, error) + FileByID func(fileID string) (telebot.File, error) + Forward func(to telebot.Recipient, msg telebot.Editable, opts ...interface{}) (*telebot.Message, error) + GameScores func(user telebot.Recipient, msg telebot.Editable) ([]telebot.GameHighScore, error) + Group func(name string) Group + Handle func(endpoint interface{}, h telebot.HandlerFunc, m ...telebot.MiddlewareFunc) + InviteLink func(chat *telebot.Chat) (string, error) + Leave func(chat *telebot.Chat) error + Len func(chat *telebot.Chat) (int, error) + Logout func() (bool, error) + Me func() *telebot.User + MenuButton func(chat *telebot.User) (*telebot.MenuButton, error) + NewContext func(u telebot.Update) telebot.Context + NewMarkup func() *telebot.ReplyMarkup + Notify func(to telebot.Recipient, action telebot.ChatAction) error + OnError func(err error, c telebot.Context) + Pin func(msg telebot.Editable, opts ...interface{}) error + ProcessUpdate func(u telebot.Update) + ProfilePhotosOf func(user *telebot.User) ([]telebot.Photo, error) + Promote func(chat *telebot.Chat, member *telebot.ChatMember) error + Raw func(method string, payload interface{}) ([]byte, error) + RemoveWebhook func(dropPending ...bool) error + Reply func(to *telebot.Message, what interface{}, opts ...interface{}) (*telebot.Message, error) + Respond func(c *telebot.Callback, resp ...*telebot.CallbackResponse) error + Restrict func(chat *telebot.Chat, member *telebot.ChatMember) error + RevokeInviteLink func(chat telebot.Recipient, link string) (*telebot.ChatInviteLink, error) + Send func(to telebot.Recipient, what interface{}, opts ...interface{}) (*telebot.Message, error) + SendAlbum func(to telebot.Recipient, a telebot.Album, opts ...interface{}) ([]telebot.Message, error) + SetAdminTitle func(chat *telebot.Chat, user *telebot.User, title string) error + SetCommands func(opts ...interface{}) error + SetDefaultRights func(rights telebot.Rights, forChannels bool) error + SetGameScore func(user telebot.Recipient, msg telebot.Editable, score telebot.GameHighScore) (*telebot.Message, error) + SetGroupDescription func(chat *telebot.Chat, description string) error + SetGroupPermissions func(chat *telebot.Chat, perms telebot.Rights) error + SetGroupPhoto func(chat *telebot.Chat, p *telebot.Photo) error + SetGroupStickerSet func(chat *telebot.Chat, setName string) error + SetGroupTitle func(chat *telebot.Chat, title string) error + SetMenuButton func(chat *telebot.User, mb interface{}) error + SetStickerPosition func(sticker string, position int) error + SetStickerSetThumb func(to telebot.Recipient, s telebot.StickerSet) error + SetWebhook func(w *telebot.Webhook) error + Ship func(query *telebot.ShippingQuery, what ...interface{}) error + Start func() + StickerSet func(name string) (*telebot.StickerSet, error) + Stop func() + StopLiveLocation func(msg telebot.Editable, opts ...interface{}) (*telebot.Message, error) + StopPoll func(msg telebot.Editable, opts ...interface{}) (*telebot.Poll, error) + Unban func(chat *telebot.Chat, user *telebot.User, forBanned ...bool) error + UnbanSenderChat func(chat *telebot.Chat, sender telebot.Recipient) error + Unpin func(chat *telebot.Chat, messageID ...int) error + UnpinAll func(chat *telebot.Chat) error + UploadSticker func(to telebot.Recipient, png *telebot.File) (*telebot.File, error) + Use func(middleware ...telebot.MiddlewareFunc) + Webhook func() (*telebot.Webhook, error)