package handler import ( tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api" log "gogs.veloe.link/toomanysugar/GoEthemineTelegramBot/internal/logger" ) func (ah ActionHandler) StartHandler(chatId int64, params []string) []tgbotapi.MessageConfig { if len(params) != 0 { return []tgbotapi.MessageConfig{tgbotapi.NewMessage(chatId, "usage: /start")} } text, err := ah.dbconn.AddUser(chatId) if err != nil { log.LogError.Println(err) text = "Internal error, please contact bot developer" } return []tgbotapi.MessageConfig{ tgbotapi.NewMessage(chatId, text)} }