publisher

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TelegramPublisher

type TelegramPublisher struct {
	ChannelID     string // Telegram channel id (e.g. @my_channel)
	BotAPI        *tgbotapi.BotAPI
	ShouldPublish bool // If false, will print the message to the console (for development)
}

func NewTelegramPublisher

func NewTelegramPublisher(channelID string, token string, shouldPublish bool) (*TelegramPublisher, error)

func (*TelegramPublisher) Publish

func (t *TelegramPublisher) Publish(msg string) (pubID string, err error)

Jump to

Keyboard shortcuts

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