telegram

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIer

type APIer interface {
	SendTextMessage(*api.TextMessage) error
	SendPhotoMessage(*api.PhotoMessage) error
}

APIer is an interface for Telegram API

type Telegram

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

Telegram represent the channel of the type Telegram

func New

func New(cfg telegram.Telegram, logger *zap.Logger) (*Telegram, error)

New creates new Telegram channel

func (*Telegram) Ignore added in v0.8.2

func (tg *Telegram) Ignore() bool

func (*Telegram) Name

func (tg *Telegram) Name() string

Name returns the channel name

func (*Telegram) Send

func (tg *Telegram) Send(mes *message.Message) error

Send the message to the channel

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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