Exemple #1
0
func PhotoHandler(message tbot.Message) {
	message.ReplyPhoto("photo.jpg", "it's me")
}
Exemple #2
0
func StickerHandler(message tbot.Message) {
	message.ReplySticker("sticker.png")
}
Exemple #3
0
func SayHandler(message tbot.Message) {
	// Message contain it's varialbes from curly brackets
	message.Reply(message.Vars["text"])
}
Exemple #4
0
func EchoHandler(message tbot.Message) {
	message.Reply(message.Text)
}
Exemple #5
0
func HiHandler(message tbot.Message) {
	// Handler can reply with several messages
	message.Replyf("Hello, %s!", message.From.FirstName)
	time.Sleep(1 * time.Second)
	message.Reply("What's up?")
}