Documentation ¶
Overview ¶
Send basic messages over Telegram
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Telegram ¶
type Telegram struct { Token string `env:"TELEGRAM_TOKEN"` // Telegram bot token ChatID int64 `env:"TELEGRAM_CHAT_ID"` // Default telegram chat ID (https://t.me/getidsbot) }
Telegram endpoint
func Default ¶
func Default() *Telegram
Default telegram configuration from env variables
TELEGRAM_TOKEN - mandatory, bot token (from @BotFather), panic if not set
func (Telegram) SendTextContext ¶
Send basic text message to default chat ID (see SendTextToContext)
func (Telegram) SendTextTo ¶
Send basic text message to custom chat ID (see SendTextToContext)
func (Telegram) SendTextToContext ¶
Send basic text message to custom chat ID. Bot should have access to the chat, otherwise Bad Request will be raised
Click to show internal directories.
Click to hide internal directories.