Documentation
¶
Overview ¶
Package telegram is the telegram notification package.
Index ¶
Constants ¶
View Source
const (
// MaxMessageLength is the max message length of a Telegram bot
MaxMessageLength = 4096
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotifyConfig ¶
type NotifyConfig struct { base.DefaultNotify `yaml:",inline"` Token string `yaml:"token" json:"token" jsonschema:"required,title=Telegram Bot Token,description=Telegram Bot Token"` ChatID string `yaml:"chat_id" json:"chat_id" jsonschema:"required,title=Telegram Chat ID,description=Telegram Group ID or Channel ID"` }
NotifyConfig is the telegram notification configuration
func (*NotifyConfig) Config ¶
func (c *NotifyConfig) Config(gConf global.NotifySettings) error
Config configures the telegram configuration
func (*NotifyConfig) SendTelegram ¶
func (c *NotifyConfig) SendTelegram(title, text string) error
SendTelegram is the wrapper for SendTelegramNotification
func (*NotifyConfig) SendTelegramNotification ¶
func (c *NotifyConfig) SendTelegramNotification(text string) error
SendTelegramNotification will send the notification to telegram.
Click to show internal directories.
Click to hide internal directories.