telegram

package
v2.0.57 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "Telegram"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorConf

type ErrorConf GroupConf

type GroupConf

type GroupConf struct {
	ChatId int64 `yaml:"chatId" json:"chatId"`
}

type InfoConf

type InfoConf GroupConf

type SendConf

type SendConf struct {
	Group string    `yaml:"group" json:"group"`
	Info  InfoConf  `yaml:"info" json:"info"`
	Warn  WarnConf  `yaml:"warn" json:"warn"`
	Error ErrorConf `yaml:"error" json:"error"`
}

type Telegram

type Telegram struct {
	Cfg    *SendConf    `json:"cfg"`
	Client *telebot.Bot `json:"client"`
}

func NewTelegram

func NewTelegram(cfg *SendConf, client *telebot.Bot) *Telegram

func (*Telegram) Error

func (t *Telegram) Error(ctx context.Context, msg send.ISendMsg) error

func (*Telegram) Info

func (t *Telegram) Info(ctx context.Context, msg send.ISendMsg) error

func (*Telegram) String

func (t *Telegram) String() string

func (*Telegram) Warn

func (t *Telegram) Warn(ctx context.Context, msg send.ISendMsg) error

type WarnConf

type WarnConf GroupConf

Jump to

Keyboard shortcuts

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