mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
22 lines
387 B
Go
22 lines
387 B
Go
|
package interact
|
||
|
|
||
|
import "context"
|
||
|
|
||
|
var defaultInteraction = New()
|
||
|
|
||
|
func Default() *Interact {
|
||
|
return defaultInteraction
|
||
|
}
|
||
|
|
||
|
func SetMessenger(messenger Messenger) {
|
||
|
defaultInteraction.SetMessenger(messenger)
|
||
|
}
|
||
|
|
||
|
func AddCustomInteraction(custom CustomInteraction) {
|
||
|
custom.Commands(defaultInteraction)
|
||
|
}
|
||
|
|
||
|
func Start(ctx context.Context) error {
|
||
|
return defaultInteraction.Start(ctx)
|
||
|
}
|