Documentation
¶
Overview ¶
Package telegram provides a lightning.Plugin implementation for Telegram. It additionally provides a file proxy to proxy Telegram attachments to other platforms, as Telegram files require a token to fetch, and that shouldn't be exposed to other platforms.
To use Telegram support with lightning, see New
bot := lightning.NewBot(lightning.BotOptions{
// ...
}
bot.AddPluginType("telegram", telegram.New)
bot.UsePluginType("telegram", "", map[string]string{
// ...
})
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new lightning.Plugin that provides Telegram support for Lightning
It only takes in a map with the following structure:
map[string]string{
"token": "", // a string with your Telegram bot token. You can get this from BotFather
"proxy_port": "0", // the port to use for the built-in Telegram file proxy
"proxy_url": "", // the publicly accessible url of the Telegram file proxy
}
Note that you must have a working file proxy at `proxy_url`, otherwise files will not work with other plugins.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.