telegram

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Admin int64
	Token string
	Proxy string
}

func (Config) Validate

func (c Config) Validate() valid.Problems

type Telegram

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

func New

func New(
	cfg *Config,
	log *slog.Logger,
	tel telemetry.Telemetry,
	svc service.ServerService,
	domain string,
) (*Telegram, error)

func (*Telegram) Name

func (tg *Telegram) Name() string

func (*Telegram) Notify

func (tg *Telegram) Notify(ctx context.Context, n *modules.Notification) error

func (*Telegram) NotifyBatch added in v1.26.0

func (tg *Telegram) NotifyBatch(ctx context.Context, ns []*modules.Notification) error

func (*Telegram) RateLimit added in v1.26.0

func (tg *Telegram) RateLimit() (rate.Limit, int)

RateLimit follows https://core.telegram.org/bots/faq: about 30 messages per second across all chats.

func (*Telegram) Start

func (tg *Telegram) Start() error

Jump to

Keyboard shortcuts

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