func main() { pb := pushbullet.New("<TOKEN>") devs, err := pb.Devices() if err != nil { panic(err) } for n := range devs { if devs[n].Nickname != "" { err = pb.PushNote(devs[n].Iden, "PacktFreeBook", packfreebook.PackFreeBook()) if err != nil { panic(err) } } } }
func getPacktFreeBook(bot tgbot.TgBot, msg tgbot.Message, text string) *string { r := fmt.Sprintf("Today book: %s", packfreebook.PackFreeBook()) showMenu(bot, msg, r) return nil }