diff --git a/internal/bot/handlers.go b/internal/bot/handlers.go index 0203b6f..942c8c3 100644 --- a/internal/bot/handlers.go +++ b/internal/bot/handlers.go @@ -85,6 +85,8 @@ func (h *Handler) HandleMessage(update tgbotapi.Update) { switch msg.Text { case "/start": h.handleStart(msg) + case "/help": + h.handleHelp(msg) case "/clockin": h.handleActionMsg(msg, h.clockIn) case "/clockout": @@ -355,6 +357,25 @@ func (h *Handler) handleStart(msg *tgbotapi.Message) { h.Bot.Send(menu) } +func (h *Handler) handleHelp(msg *tgbotapi.Message) { + text := `Commands: +/start - Show main menu +/clockin - Clock in +/clockout - Clock out +/worktype - Select work type +/dayoff - Toggle day off +/report - Show today report +/export - Export monthly report (Excel) +/history - View calendar history +/edit YYYY-MM-DD - Edit a specific day +/reporttoggle - Enable/disable auto report +/setreporttime HH:MM - Set daily report time +/setaccent - Select accent color + +Buttons on the main menu also work.` + h.sendText(msg.Chat.ID, text) +} + func (h *Handler) handleWorkTypeMsg(msg *tgbotapi.Message) { user, day, err := h.getUserToday(msg.Chat.ID) if err != nil {