9d845c8899
- backend moved to backend directory - added and initialized frontend with vue - moved infrastructure files to infra directory
22 lines
416 B
Go
22 lines
416 B
Go
package handlers
|
|
|
|
import (
|
|
"log"
|
|
|
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
|
)
|
|
|
|
func (h *Handler) reply(chat int64, text string) {
|
|
m := tgbotapi.NewMessage(chat, text)
|
|
_, err := h.api.Send(m)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func (h *Handler) replyMarkdown(chatID int64, text string) {
|
|
msg := tgbotapi.NewMessage(chatID, text)
|
|
msg.ParseMode = tgbotapi.ModeMarkdown
|
|
h.api.Send(msg)
|
|
}
|