Exemple #1
0
func SayHandler(message tbot.Message) {
	// Message contain it's varialbes from curly brackets
	message.Reply(message.Vars["text"])
}
Exemple #2
0
func EchoHandler(message tbot.Message) {
	message.Reply(message.Text)
}
Exemple #3
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?")
}