Documentation ¶
Overview ¶
Package handler contains an HTTP Cloud Function to handle update from Telegram whenever a users interacts with the bot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleTelegramWebHook ¶
func HandleTelegramWebHook(w http.ResponseWriter, r *http.Request)
HandleTelegramWebHook sends a message back to the chat with a punchline starting by the message provided by the user.
Types ¶
type Chat ¶
type Chat struct {
Id int `json:"id"`
}
A Chat indicates the conversation to which the Message belongs.
type Lyric ¶
type Lyric struct {
Punch string `json:"output"`
}
A Lyric is generated by the RapLyrics service.
type Message ¶
type Message struct { Text string `json:"text"` Chat Chat `json:"chat"` Audio Audio `json:"audio"` Voice Voice `json:"voice"` Document Document `json:"document"` }
Message is a Telegram object that can be found in an update. Note that not all Update contains a Message. Update for an Inline Query doesn't.
Click to show internal directories.
Click to hide internal directories.