telegram

package
v0.0.0-...-2ba8c17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

func NewBot

func NewBot(telegramToken string, logger *zap.Logger) (*Bot, error)

func (*Bot) Run

func (b *Bot) Run() error

type CommandHandler

type CommandHandler interface {
	Handle(message *tgbotapi.Message)
}

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

func NewSender

func NewSender(bot *tgbotapi.BotAPI, logger *zap.Logger) *Sender

func (*Sender) Send

func (s *Sender) Send(msg tgbotapi.MessageConfig)

func (*Sender) SendError

func (s *Sender) SendError(chatID int64, err error)

func (*Sender) SendMessage

func (s *Sender) SendMessage(chatID int64, text string)

Directories

Path Synopsis
command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL