Beispiel #1
0
func PhotoHandler(message tbot.Message) {
	message.ReplyPhoto("photo.jpg", "it's me")
}
Beispiel #2
0
func StickerHandler(message tbot.Message) {
	message.ReplySticker("sticker.png")
}
Beispiel #3
0
func SayHandler(message tbot.Message) {
	// Message contain it's varialbes from curly brackets
	message.Reply(message.Vars["text"])
}
Beispiel #4
0
func EchoHandler(message tbot.Message) {
	message.Reply(message.Text)
}
Beispiel #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?")
}