Skip to content

Commit

Permalink
removed debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelemusiani committed Dec 5, 2023
1 parent 26cc702 commit fd469a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ func run(bot *tgbotapi.BotAPI) {

callbackText := update.CallbackQuery.Data

log.Println("callback: " + callbackText)

callback := tgbotapi.NewCallback(update.CallbackQuery.ID, callbackText)
if _, err := bot.Request(callback); err != nil {
log.Printf("Error [bot.Request() for the callback]: %s\n", err)
Expand Down Expand Up @@ -269,9 +267,6 @@ func handleCallback(bot *tgbotapi.BotAPI, update *tgbotapi.Update, commandName s
return action.Name == commandName
})

log.Println("index: ", idx)
log.Println("Action: ", model.Actions[idx])

if idx != -1 {
model.Actions[idx].Data.HandleBotCallback(bot, update, callback_text)

Expand Down
5 changes: 0 additions & 5 deletions model/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,13 @@ func (data NotLookingForData) HandleBotCommand(_ *tgbotapi.BotAPI, message *tgbo
}

func (data Lectures) HandleBotCommand(_ *tgbotapi.BotAPI, message *tgbotapi.Message) CommandResponse {
log.Println("HandleBotCommand: data Lectures")
rows := GetTimetableCoursesRows(&Timetables)
keyboard := tgbotapi.NewInlineKeyboardMarkup(rows...)
log.Println(rows)
log.Println(keyboard)
return makeResponseWithInlineKeyboard(keyboard)
}

func (data RepresentativesData) HandleBotCommand(_ *tgbotapi.BotAPI,
message *tgbotapi.Message) CommandResponse {
log.Println("HandleBotCommand: data Representatives")

rows := make([][]tgbotapi.InlineKeyboardButton, len(Representatives))

// get all keys in orderd to iterate on them sorted
Expand Down

0 comments on commit fd469a5

Please sign in to comment.