27 lines
532 B
Go
27 lines
532 B
Go
package telegram
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"git.3crabs.ru/VLADIMIR/butler/internal/modules/messenger"
|
|
)
|
|
|
|
type messengerTelegram struct{}
|
|
|
|
func NewMessengerTelegram() messenger.IMessenger {
|
|
return &messengerTelegram{}
|
|
}
|
|
|
|
func (m *messengerTelegram) GetMessage(ctx context.Context) (*messenger.Message, error) {
|
|
return &messenger.Message{
|
|
ChatID: "123",
|
|
Text: "hello",
|
|
}, nil
|
|
}
|
|
|
|
func (m *messengerTelegram) SendMessage(ctx context.Context, msg *messenger.Message) error {
|
|
fmt.Println(msg.ChatID, msg.Text)
|
|
return nil
|
|
}
|