Reset user state on /start commandr local commits)
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
UserA 2024-08-13 06:21:45 +03:00
parent 15a87b282c
commit 8a469a09b8

View File

@ -122,6 +122,7 @@ func ProcessUpdate(bc BotController, update tgbotapi.Update) {
log.Printf("Args: %s", args) log.Printf("Args: %s", args)
if possibleCommand == "/start" { if possibleCommand == "/start" {
bc.db.Model(&user).Update("state", "start")
kbd := tgbotapi.NewInlineKeyboardMarkup( kbd := tgbotapi.NewInlineKeyboardMarkup(
tgbotapi.NewInlineKeyboardRow( tgbotapi.NewInlineKeyboardRow(
tgbotapi.NewInlineKeyboardButtonData(bc.GetBotContent("leave_ticket_button"), "leave_ticket_button"), tgbotapi.NewInlineKeyboardButtonData(bc.GetBotContent("leave_ticket_button"), "leave_ticket_button"),