vegapokerbot/internal/handler/util/common_messages.go

24 lines
654 B
Go
Raw Normal View History

2024-05-09 23:26:21 +03:00
package util
import (
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/locale"
"github.com/mymmrac/telego"
tu "github.com/mymmrac/telego/telegoutil"
)
2024-05-10 12:10:25 +03:00
func SendSetupDone(tg *telego.Bot, username string, chatID int64, loc locale.Localizer) error {
2024-05-09 23:26:21 +03:00
_, err := tg.SendMessage(&telego.SendMessageParams{
ChatID: tu.ID(chatID),
2024-05-10 12:10:25 +03:00
Text: loc.Template("setup_done", map[string]interface{}{"Name": username}),
2024-05-09 23:26:21 +03:00
})
return err
}
func SendInternalError(tg *telego.Bot, chatID int64, loc locale.Localizer) error {
_, err := tg.SendMessage(&telego.SendMessageParams{
ChatID: tu.ID(chatID),
Text: loc.Message("internal_error"),
})
return err
}