Skip to content

v1.1.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 04 Sep 01:30
· 6 commits to main since this release

Two new features. Neither needs configuration — no new environment variables, and both cogs load on any existing deployment. Pull the image and restart; the new tables are created on start with no migration step.

Trivia

/trivia [category] [difficulty] posts a multiple-choice question from Open Trivia DB, which requires no API key or account. Twelve categories, four difficulties, and the question card shows both.

  • First correct answer wins. One guess per person, so nobody can brute-force all four buttons.
  • 25-second timer; if it expires the answer is revealed.
  • One question in flight per channel, so /trivia can't be used to wallpaper a room.
  • /trivia_leaderboard renders correct answers as an avatar bar chart, showing each player's hit rate alongside their score.

Answers arrive HTML-escaped from the API and are unescaped before display, so Far Cry 5's reads correctly. Winner selection sits behind a lock — two people clicking the right answer in the same tick can't both be declared the winner.

Reminders

/remindme <duration> <text>, plus /reminders to list yours and /forget_reminder <id> to cancel one.

Durations are additive and forgiving about spacing and case: 45s, 10m, 1h30m, 1d 2h, 1w. 1h30m is ninety minutes, not thirty.

Reminders live in the database rather than in memory, so:

  • A restart loses nothing and re-arms nothing — a single 30-second sweep asks the database what is due.
  • Anything that came due while the bot was offline fires when it returns, labelled with how late it is.
  • Delivery deletes the row first, so a reminder that can't be sent doesn't retry every 30 seconds forever. If the original channel is gone, it falls back to a DM.

Cancelling matches on user_id in the WHERE clause, so ids can't be guessed to cancel someone else's reminder. Limits: 25 pending per person per server, 365 days out.

Also

The one-workout-per-day limit is gone from the workout tracker. Every confirmed image logs.

Tests

48, up from 34. New coverage for trivia scoring and answer handling, reminder duration parsing, and the two new tables arriving on an already-migrated database.

ghcr.io/thenotoriousjeremy/danbot:1.1.0