Added telegram version
This commit is contained in:
parent
cc2058090c
commit
e69884ce52
9 changed files with 111 additions and 24 deletions
16
internal/telegram/sender.go
Normal file
16
internal/telegram/sender.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package telegram
|
||||
|
||||
import (
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
)
|
||||
|
||||
type Sender struct {
|
||||
API *tgbotapi.BotAPI
|
||||
}
|
||||
|
||||
func (h *Sender) Send(userId int64, message string) {
|
||||
msg := tgbotapi.NewMessage(userId, message)
|
||||
msg.DisableWebPagePreview = true
|
||||
h.API.Send(msg)
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue