mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 01:01:56 +00:00
add Command function
This commit is contained in:
parent
6326d52c1b
commit
fc81f7b6cb
|
@ -61,6 +61,11 @@ func NewInteraction(bot *telebot.Bot, store service.Store) *Interaction {
|
|||
return interaction
|
||||
}
|
||||
|
||||
// TODO: wrapper the handler function parameter to a global struct
|
||||
func (it *Interaction) Command(command string, h func(m *telebot.Message)) {
|
||||
it.bot.Handle(command, h)
|
||||
}
|
||||
|
||||
func (it *Interaction) SetAuthToken(token string) {
|
||||
it.AuthToken = token
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user