mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
bbgo: fix telegram message error, there must be one message to send
This commit is contained in:
parent
53059824a6
commit
1d1ec12417
|
@ -145,16 +145,14 @@ func (it *CoreInteraction) Commands(i *interact.Interact) {
|
|||
}
|
||||
|
||||
position := reader.CurrentPosition()
|
||||
if position != nil {
|
||||
reply.Send("Your current position:")
|
||||
reply.Send(position.PlainText())
|
||||
|
||||
if position.Base.IsZero() {
|
||||
reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature))
|
||||
return fmt.Errorf("strategy %T has no opened position", strategy)
|
||||
}
|
||||
if position == nil || position.Base.IsZero() {
|
||||
reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature))
|
||||
return fmt.Errorf("strategy %T has no opened position", strategy)
|
||||
}
|
||||
|
||||
reply.Send("Your current position:")
|
||||
reply.Message(position.PlainText())
|
||||
|
||||
if kc, ok := reply.(interact.KeyboardController); ok {
|
||||
kc.RemoveKeyboard()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user