Documentation ¶
Index ¶
- type Interaction
- func (it *Interaction) Broadcast(message string)
- func (it *Interaction) Command(command string, h func(m *telebot.Message))
- func (it *Interaction) EmitAuth(user *telebot.User)
- func (it *Interaction) HandleAuth(m *telebot.Message)
- func (it *Interaction) HandleHelp(m *telebot.Message)
- func (it *Interaction) HandleInfo(m *telebot.Message)
- func (it *Interaction) HandleStart(m *telebot.Message)
- func (it *Interaction) HandleSubscribe(m *telebot.Message)
- func (it *Interaction) OnAuth(cb func(user *telebot.User))
- func (it *Interaction) SendToOwner(message string)
- func (it *Interaction) Session() *Session
- func (it *Interaction) SetAuthToken(token string)
- func (it *Interaction) Start(session Session)
- type Notifier
- type Option
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interaction ¶ added in v1.4.0
type Interaction struct { AuthToken string StartCallbacks []func() AuthCallbacks []func(user *telebot.User) // contains filtered or unexported fields }
func NewInteraction ¶ added in v1.4.0
func NewInteraction(bot *telebot.Bot, store service.Store) *Interaction
func (*Interaction) Broadcast ¶ added in v1.18.0
func (it *Interaction) Broadcast(message string)
func (*Interaction) Command ¶ added in v1.18.1
func (it *Interaction) Command(command string, h func(m *telebot.Message))
TODO: wrapper the handler function parameter to a global struct
func (*Interaction) EmitAuth ¶ added in v1.4.0
func (it *Interaction) EmitAuth(user *telebot.User)
func (*Interaction) HandleAuth ¶ added in v1.4.0
func (it *Interaction) HandleAuth(m *telebot.Message)
func (*Interaction) HandleHelp ¶ added in v1.4.0
func (it *Interaction) HandleHelp(m *telebot.Message)
func (*Interaction) HandleInfo ¶ added in v1.4.0
func (it *Interaction) HandleInfo(m *telebot.Message)
func (*Interaction) HandleStart ¶ added in v1.18.1
func (it *Interaction) HandleStart(m *telebot.Message)
func (*Interaction) HandleSubscribe ¶ added in v1.18.0
func (it *Interaction) HandleSubscribe(m *telebot.Message)
func (*Interaction) OnAuth ¶ added in v1.4.0
func (it *Interaction) OnAuth(cb func(user *telebot.User))
func (*Interaction) SendToOwner ¶ added in v1.4.0
func (it *Interaction) SendToOwner(message string)
func (*Interaction) Session ¶ added in v1.4.0
func (it *Interaction) Session() *Session
func (*Interaction) SetAuthToken ¶ added in v1.4.0
func (it *Interaction) SetAuthToken(token string)
func (*Interaction) Start ¶ added in v1.4.0
func (it *Interaction) Start(session Session)
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func New ¶
func New(interaction *Interaction, options ...Option) *Notifier
New TODO: register interaction with channel, so that we can route message to the specific telegram bot
Click to show internal directories.
Click to hide internal directories.