antenna

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Antenna

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

Antenna is a telegram bot implemented in Golang, broadcasting message to subscribers.

func New

func New(bot *tgbotapi.BotAPI, store storage.Store, log *zap.SugaredLogger) *Antenna

New creates a new Antenna instance.

func (*Antenna) AddAdmin

func (a *Antenna) AddAdmin(usernames ...string)

AddAdmin enables admin feature and adds add admins.

func (*Antenna) Broadcast

func (a *Antenna) Broadcast(appID, text, parseMode string) error

Broadcast sends text to all subscribers

func (*Antenna) Listen

func (a *Antenna) Listen() error

Listen listens telegram

Jump to

Keyboard shortcuts

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