Documentation ¶
Overview ¶
Package telegram handles all Telegram-side logic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFullUserZwsp ¶
GetFullUserZwsp returns both the Telegram user's first name and username, if available. Adds ZWSP to username to prevent username pinging across platform.
func GetFullUsername ¶
GetFullUsername takes showZWSP condition and user then returns full username with or without .
func GetUsername ¶
GetUsername takes showZWSP condition and user then returns username with or without .
func ZwspUsername ¶
ZwspUsername adds a zero-width space after the first character of a Telegram user's username.
Types ¶
type Client ¶
type Client struct { Settings *internal.TelegramSettings IRCSettings *internal.IRCSettings ImgurSettings *internal.ImgurSettings // contains filtered or unexported fields }
Client contains information for the Telegram bridge, including the TelegramSettings needed to run the bot
func NewClient ¶
func NewClient(settings *internal.TelegramSettings, ircsettings *internal.IRCSettings, imgur *internal.ImgurSettings, tgapi *tgbotapi.BotAPI, logger internal.DebugLogger) *Client
NewClient creates a new Telegram bot client
func (*Client) SendMessage ¶
SendMessage sends a message to the Telegram channel specified in the settings