Documentation ¶
Index ¶
- func HandleErr(t *testing.T, err error)
- type MockBot
- func (b *MockBot) Handle(endpoint interface{}, handler tb.HandlerFunc, mw ...tb.MiddlewareFunc)
- func (b *MockBot) Me() *tb.User
- func (b *MockBot) Reset()
- func (b *MockBot) Respond(c *tb.Callback, resp ...*tb.CallbackResponse) error
- func (b *MockBot) Send(to tb.Recipient, what interface{}, options ...interface{}) (*tb.Message, error)
- func (b *MockBot) SendSilent(...) (*tb.Message, error)
- func (b *MockBot) Start()
- type MockContext
- func (c *MockContext) Accept(errorMessage ...string) error
- func (c *MockContext) Answer(resp *tb.QueryResponse) error
- func (c *MockContext) Args() []string
- func (c *MockContext) Boost() *tb.BoostUpdated
- func (c *MockContext) BoostRemoved() *tb.BoostRemoved
- func (c *MockContext) Bot() *tb.Bot
- func (c *MockContext) Callback() *tb.Callback
- func (c *MockContext) Chat() *tb.Chat
- func (c *MockContext) ChatJoinRequest() *tb.ChatJoinRequest
- func (c *MockContext) ChatMember() *tb.ChatMemberUpdate
- func (c *MockContext) Data() string
- func (c *MockContext) Delete() error
- func (c *MockContext) DeleteAfter(d time.Duration) *time.Timer
- func (c *MockContext) Edit(what interface{}, opts ...interface{}) error
- func (c *MockContext) EditCaption(caption string, opts ...interface{}) error
- func (c *MockContext) EditOrReply(what interface{}, opts ...interface{}) error
- func (c *MockContext) EditOrSend(what interface{}, opts ...interface{}) error
- func (c *MockContext) Entities() tb.Entities
- func (c *MockContext) Forward(msg tb.Editable, opts ...interface{}) error
- func (c *MockContext) ForwardTo(to tb.Recipient, opts ...interface{}) error
- func (c *MockContext) Get(key string) interface{}
- func (c *MockContext) InlineResult() *tb.InlineResult
- func (c *MockContext) Message() *tb.Message
- func (c *MockContext) Migration() (int64, int64)
- func (c *MockContext) Notify(action tb.ChatAction) error
- func (c *MockContext) Poll() *tb.Poll
- func (c *MockContext) PollAnswer() *tb.PollAnswer
- func (c *MockContext) PreCheckoutQuery() *tb.PreCheckoutQuery
- func (c *MockContext) Query() *tb.Query
- func (c *MockContext) Recipient() tb.Recipient
- func (c *MockContext) Reply(what interface{}, opts ...interface{}) error
- func (c *MockContext) Respond(resp ...*tb.CallbackResponse) error
- func (c *MockContext) RespondAlert(text string) error
- func (c *MockContext) RespondText(text string) error
- func (c *MockContext) Send(what interface{}, opts ...interface{}) error
- func (c *MockContext) SendAlbum(a tb.Album, opts ...interface{}) error
- func (c *MockContext) Sender() *tb.User
- func (c *MockContext) Set(key string, val interface{})
- func (c *MockContext) Ship(what ...interface{}) error
- func (c *MockContext) ShippingQuery() *tb.ShippingQuery
- func (c *MockContext) Text() string
- func (c *MockContext) Topic() *tb.Topic
- func (c *MockContext) Update() tb.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockBot ¶
type MockBot struct { LastSentWhat interface{} AllLastSentWhat []interface{} }
func (*MockBot) Handle ¶
func (b *MockBot) Handle(endpoint interface{}, handler tb.HandlerFunc, mw ...tb.MiddlewareFunc)
func (*MockBot) SendSilent ¶
type MockContext ¶
func (*MockContext) Accept ¶
func (c *MockContext) Accept(errorMessage ...string) error
func (*MockContext) Answer ¶
func (c *MockContext) Answer(resp *tb.QueryResponse) error
func (*MockContext) Args ¶
func (c *MockContext) Args() []string
func (*MockContext) Boost ¶ added in v2.3.1
func (c *MockContext) Boost() *tb.BoostUpdated
func (*MockContext) BoostRemoved ¶ added in v2.3.1
func (c *MockContext) BoostRemoved() *tb.BoostRemoved
func (*MockContext) Bot ¶
func (c *MockContext) Bot() *tb.Bot
func (*MockContext) Callback ¶
func (c *MockContext) Callback() *tb.Callback
func (*MockContext) Chat ¶
func (c *MockContext) Chat() *tb.Chat
func (*MockContext) ChatJoinRequest ¶
func (c *MockContext) ChatJoinRequest() *tb.ChatJoinRequest
func (*MockContext) ChatMember ¶
func (c *MockContext) ChatMember() *tb.ChatMemberUpdate
func (*MockContext) Data ¶
func (c *MockContext) Data() string
func (*MockContext) Delete ¶
func (c *MockContext) Delete() error
func (*MockContext) DeleteAfter ¶
func (c *MockContext) DeleteAfter(d time.Duration) *time.Timer
func (*MockContext) Edit ¶
func (c *MockContext) Edit(what interface{}, opts ...interface{}) error
func (*MockContext) EditCaption ¶
func (c *MockContext) EditCaption(caption string, opts ...interface{}) error
func (*MockContext) EditOrReply ¶
func (c *MockContext) EditOrReply(what interface{}, opts ...interface{}) error
func (*MockContext) EditOrSend ¶
func (c *MockContext) EditOrSend(what interface{}, opts ...interface{}) error
func (*MockContext) Entities ¶
func (c *MockContext) Entities() tb.Entities
func (*MockContext) Forward ¶
func (c *MockContext) Forward(msg tb.Editable, opts ...interface{}) error
func (*MockContext) ForwardTo ¶
func (c *MockContext) ForwardTo(to tb.Recipient, opts ...interface{}) error
func (*MockContext) Get ¶
func (c *MockContext) Get(key string) interface{}
func (*MockContext) InlineResult ¶
func (c *MockContext) InlineResult() *tb.InlineResult
func (*MockContext) Message ¶
func (c *MockContext) Message() *tb.Message
func (*MockContext) Migration ¶
func (c *MockContext) Migration() (int64, int64)
func (*MockContext) Notify ¶
func (c *MockContext) Notify(action tb.ChatAction) error
func (*MockContext) Poll ¶
func (c *MockContext) Poll() *tb.Poll
func (*MockContext) PollAnswer ¶
func (c *MockContext) PollAnswer() *tb.PollAnswer
func (*MockContext) PreCheckoutQuery ¶
func (c *MockContext) PreCheckoutQuery() *tb.PreCheckoutQuery
func (*MockContext) Query ¶
func (c *MockContext) Query() *tb.Query
func (*MockContext) Recipient ¶
func (c *MockContext) Recipient() tb.Recipient
func (*MockContext) Reply ¶
func (c *MockContext) Reply(what interface{}, opts ...interface{}) error
func (*MockContext) Respond ¶
func (c *MockContext) Respond(resp ...*tb.CallbackResponse) error
func (*MockContext) RespondAlert ¶ added in v2.3.1
func (c *MockContext) RespondAlert(text string) error
func (*MockContext) RespondText ¶ added in v2.3.1
func (c *MockContext) RespondText(text string) error
func (*MockContext) Send ¶
func (c *MockContext) Send(what interface{}, opts ...interface{}) error
func (*MockContext) SendAlbum ¶
func (c *MockContext) SendAlbum(a tb.Album, opts ...interface{}) error
func (*MockContext) Sender ¶
func (c *MockContext) Sender() *tb.User
func (*MockContext) Set ¶
func (c *MockContext) Set(key string, val interface{})
func (*MockContext) Ship ¶
func (c *MockContext) Ship(what ...interface{}) error
func (*MockContext) ShippingQuery ¶
func (c *MockContext) ShippingQuery() *tb.ShippingQuery
func (*MockContext) Text ¶
func (c *MockContext) Text() string
func (*MockContext) Topic ¶ added in v2.3.0
func (c *MockContext) Topic() *tb.Topic
func (*MockContext) Update ¶
func (c *MockContext) Update() tb.Update
Click to show internal directories.
Click to hide internal directories.