Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultPrefix = []rune{'!', '/'}
DefaultPrefix is the global variable consisting all the prefixes which will trigger the command.
Functions ¶
This section is empty.
Types ¶
type AnyUpdate ¶
type AnyUpdate struct {
Callback CallbackResponse
}
AnyUpdate handler is executed on all type of incoming updates.
func NewAnyUpdate ¶
func NewAnyUpdate(response CallbackResponse) AnyUpdate
NewAnyUpdate creates a new AnyUpdate handler bound to call its response.
type CallbackQuery ¶
type CallbackQuery struct { Filters filters.CallbackQueryFilter Callback CallbackResponse UpdateFilters filters.UpdateFilter }
CallbackQuery handler is executed when the update consists of tg.UpdateBotCallbackQuery.
func NewCallbackQuery ¶
func NewCallbackQuery(filters filters.CallbackQueryFilter, response CallbackResponse) CallbackQuery
NewCallbackQuery creates a new CallbackQuery handler bound to call its response.
func (CallbackQuery) CheckUpdate ¶
type CallbackResponse ¶
CallbackResponse is the function which will be called on a handler's execution.
type ChatMemberUpdated ¶
type ChatMemberUpdated struct { Callback CallbackResponse Filters filters.ChatMemberUpdatedFilter }
ChatMemberUpdated handler is executed on all type of incoming updates.
func NewChatMemberUpdated ¶
func NewChatMemberUpdated(filters filters.ChatMemberUpdatedFilter, response CallbackResponse) ChatMemberUpdated
NewChatMemberUpdated creates a new ChatMemberUpdated handler bound to call its response.
func (ChatMemberUpdated) CheckUpdate ¶
type Command ¶
type Command struct { Prefix []rune Name string Callback CallbackResponse Outgoing bool UpdateFilters filters.UpdateFilter }
Command handler is executed when the update consists of tg.Message provided it is a command and satisfies all the conditions.
func NewCommand ¶
func NewCommand(name string, response CallbackResponse) Command
NewCommand creates a new Command handler with default fields, bound to call its response
type InlineQuery ¶
type InlineQuery struct { Callback CallbackResponse Filters filters.InlineQueryFilter UpdateFilters filters.UpdateFilter }
InlineQuery handler is executed when the update consists of tg.UpdateInlineBotCallbackQuery.
func NewInlineQuery ¶
func NewInlineQuery(filters filters.InlineQueryFilter, response CallbackResponse) InlineQuery
NewInlineQuery creates a new InlineQuery handler bound to call its response.
func (InlineQuery) CheckUpdate ¶
type Message ¶
type Message struct { Callback CallbackResponse Filters filters.MessageFilter UpdateFilters filters.UpdateFilter Outgoing bool }
Message handler is executed when the update consists of tg.Message with provided conditions.
func NewMessage ¶
func NewMessage(filters filters.MessageFilter, response CallbackResponse) Message
NewMessage creates a new Message handler bound to call its response.
type PendingJoinRequests ¶
type PendingJoinRequests struct { Callback CallbackResponse Filters filters.PendingJoinRequestsFilter }
PendingJoinRequests handler is executed on all type of incoming updates.
func NewChatJoinRequest ¶
func NewChatJoinRequest(filters filters.PendingJoinRequestsFilter, response CallbackResponse) PendingJoinRequests
NewChatJoinRequest creates a new AnyUpdate handler bound to call its response.