mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix telegram arguments index update
This commit is contained in:
parent
abd6f4c7ef
commit
e3cb2ad86c
|
@ -12,7 +12,6 @@ type Notifier struct {
|
|||
|
||||
type NotifyOption func(notifier *Notifier)
|
||||
|
||||
|
||||
// New
|
||||
// TODO: register interaction with channel, so that we can route message to the specific telegram bot
|
||||
func New(interaction *Interaction, options ...NotifyOption) *Notifier {
|
||||
|
@ -38,12 +37,15 @@ func filterPlaintextMessages(args []interface{}) (texts []string, pureArgs []int
|
|||
|
||||
case types.PlainText:
|
||||
texts = append(texts, a.PlainText())
|
||||
textArgsOffset = idx
|
||||
if textArgsOffset == -1 {
|
||||
textArgsOffset = idx
|
||||
}
|
||||
|
||||
case types.Stringer:
|
||||
texts = append(texts, a.String())
|
||||
textArgsOffset = idx
|
||||
|
||||
if textArgsOffset == -1 {
|
||||
textArgsOffset = idx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user