Skip to content

Commit

Permalink
Don't error if no messages from this day in history
Browse files Browse the repository at this point in the history
  • Loading branch information
rcy committed Dec 28, 2024
1 parent ec25292 commit 06a3e62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ func addHandlers(b *bot.Bot) {
err = c.AddFunc("16 14 15 * * 1,2,3,4,5,6", func() {
note, err := q.RandomHistoricalTodayNote(context.TODO())
if err != nil {
// TODO test no rows
if errors.Is(err, sql.ErrNoRows) {
return
}
b.Conn.Privmsg(b.Channel, err.Error())
return
}
Expand Down

0 comments on commit 06a3e62

Please sign in to comment.