telegramnotifier

package
v1.26.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier struct {

	// Subscribers stores the Chat objects for broadcasting public notification
	Subscribers map[int64]time.Time `json:"subscribers"`

	// Chats are the private chats that we will send private notification
	Chats map[int64]*telebot.Chat `json:"chats"`
	// contains filtered or unexported fields
}

func New

func New(bot *telebot.Bot, options ...Option) *Notifier

New

func (*Notifier) AddChat added in v1.26.1

func (n *Notifier) AddChat(c *telebot.Chat)

func (*Notifier) AddSubscriber added in v1.26.0

func (n *Notifier) AddSubscriber(m *telebot.Message)

func (*Notifier) Broadcast added in v1.26.0

func (n *Notifier) Broadcast(message string)

func (*Notifier) Notify

func (n *Notifier) Notify(obj interface{}, args ...interface{})

func (*Notifier) NotifyTo

func (n *Notifier) NotifyTo(channel string, obj interface{}, args ...interface{})

type Option added in v1.18.0

type Option func(notifier *Notifier)

func UseBroadcast added in v1.18.0

func UseBroadcast() Option

Jump to

Keyboard shortcuts

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