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