show bbgo version name

This commit is contained in:
c9s 2021-06-06 02:06:25 +08:00
parent b60fd9e356
commit e8205556ff

View File

@ -3,6 +3,7 @@ package telegramnotifier
import ( import (
"fmt" "fmt"
"github.com/c9s/bbgo/pkg/version"
"github.com/pquerna/otp" "github.com/pquerna/otp"
"github.com/pquerna/otp/totp" "github.com/pquerna/otp/totp"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
@ -148,7 +149,10 @@ func (it *Interaction) Start(session Session) {
it.session = &session it.session = &session
if it.session.Owner != nil && it.session.Chat != nil { if it.session.Owner != nil && it.session.Chat != nil {
if _, err := it.bot.Send(it.session.Chat, fmt.Sprintf("Hi %s, I'm back", it.session.Owner.Username)); err != nil { if _, err := it.bot.Send(it.session.Chat, fmt.Sprintf("Hi %s, I'm back, this is version %s",
it.session.Owner.Username,
version.Version,
)); err != nil {
log.WithError(err).Error("failed to send telegram message") log.WithError(err).Error("failed to send telegram message")
} }
} }