mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05: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,15 +145,13 @@ func (it *CoreInteraction) Commands(i *interact.Interact) {
|
||||||
}
|
}
|
||||||
|
|
||||||
position := reader.CurrentPosition()
|
position := reader.CurrentPosition()
|
||||||
if position != nil {
|
if position == nil || position.Base.IsZero() {
|
||||||
reply.Send("Your current position:")
|
|
||||||
reply.Send(position.PlainText())
|
|
||||||
|
|
||||||
if position.Base.IsZero() {
|
|
||||||
reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature))
|
reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature))
|
||||||
return fmt.Errorf("strategy %T has no opened position", strategy)
|
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 {
|
if kc, ok := reply.(interact.KeyboardController); ok {
|
||||||
kc.RemoveKeyboard()
|
kc.RemoveKeyboard()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user