@@ -38,7 +38,7 @@ func NewGoBotState(bot *tgbot.BotAPI, dataBase *db.DB) states.BotState {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *goBotState) Do(text string, chatInfo *db.ChatInfo, username string) error {
|
||||
func (s *goBotState) Do(text string, chatInfo *db.ChatInfo) error {
|
||||
if chatInfo.Status == string(db.UserStateGo) {
|
||||
if err := s.dataBase.SetStatusToChat(chatInfo.ChatID, db.UserState(text)); err != nil {
|
||||
log.Println(err)
|
||||
@@ -57,7 +57,7 @@ func (s *goBotState) Do(text string, chatInfo *db.ChatInfo, username string) err
|
||||
log.Println(err)
|
||||
continue
|
||||
}
|
||||
if err := s.dataBase.AddWorkout(chatInfo.ChatID, db.NewWorkout(workoutType, count, username)); err != nil {
|
||||
if err := s.dataBase.AddWorkout(chatInfo.ChatID, db.NewWorkout(workoutType, count, chatInfo.Username)); err != nil {
|
||||
log.Println(err)
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user