func ExampleUsage() { bot, err := margelet.NewMargelet("<your awesome bot name>", "<redis addr>", "<redis password>", 0, "your bot token", false) if err != nil { panic(err) } bot.Run() }
func main() { token := kingpin.Flag("token", "Telegram Bot token").Required().Short('t').String() kingpin.Parse() margelet, err := margelet.NewMargelet("emergency_kittens", "127.0.0.1:6379", "", 3, *token, false) if err != nil { panic(err) } margelet.AddCommandHandler("/cat", CatHandler{}) margelet.AddSessionHandler("/start", ConfigSessionHandler{}) go randomCatSender(margelet) margelet.Run() }