Skip to content

Releases

v1.5.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 30 Sep 01:47

Reminders

/remindme can count a duration from a date other than today.

  • 18 years from 8/18/2026 is due on 8/18/2044.
  • 2 days after october 3rd is due on 10/5; 3 weeks before dec 25 is due on 12/4.
  • 18 years from now is the same as 18 years.

Before this release, the date after from was ignored and the duration was counted from today.

A result in the past, or a date the bot can't read, is rejected with a hint. A date without a time means midnight. Slash dates are read month first (US style).

v1.4.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 30 Sep 01:44

Reminders

/remindme now accepts dates and times as well as durations.

  • tomorrow at 5pm, friday 9am, next friday, october 3rd at 2:30pm, dec 25, 5pm (which means tomorrow if 5pm has already passed today).
  • Times are read in the bot's local time, set by TZ (see .env.example).
  • Durations work as in v1.3.0: 18 years, 2 days 3h, an hour, up to 100 years.
  • Past times and bare numbers are rejected with a hint.
  • Fixes 9am being read as "a minute".

Upgrading

Adds dateparser to requirements.txt. The Docker image installs it automatically.

v1.3.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 30 Sep 01:38

Reminders

/remindme now takes durations the way people type them.

  • Years and months: /remindme 18 years, 3 months, 1y 6mo. Calendar-aware, so 18 years lands on the same date and time 18 years out, leap days included.
  • Units spelled out or abbreviated: 10 minutes, 2 hours 15 mins, an hour, in a week, 1.5h.
  • The cap goes from 365 days to 100 years.
  • The message is optional.
  • Fixes 2 months being read as 2 minutes.
  • The confirmation shows the full date and time as well as the relative time.

Trivia

Trivia is now one daily question instead of a 25-second race. Everyone gets the same single chance each day, so the leaderboard is a fair count of correct answers.

  • The question posts once a day to TRIVIA_CHANNEL_ID. The answer and results are revealed with the next day's post.
  • Harder questions are worth more points (1/2/3). Streaks skip days when no question was posted, so an outage does not break a streak.
  • Practice questions are kept off the leaderboard.

Upgrading

Set TRIVIA_CHANNEL_ID to enable the daily question. python-dateutil is now listed in requirements.txt; it was already installed as a matplotlib dependency.

v1.2.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 04 Sep 14:54

Adds /help, which the bot was being asked for but did not have.

Running /help previously produced CommandNotFound: Application command 'help' not found in the log and nothing in the channel. No /help has ever existed in this repository, and every version of bot.py has only performed a plain global tree.sync() — so that registration came from outside the codebase. Implementing the command is the more useful of the two fixes.

How it works

The listing is generated by walking the live command tree when the command runs, grouped by cog. Nothing is hardcoded, so:

  • A new cog's commands appear without any edit to help.py.
  • A cog skipped at startup for missing configuration contributes no commands and simply does not appear. /help therefore doubles as an honest per-server statement of what is actually set up, rather than a wish list.

SECTIONS maps cog class names to readable headings. Anything unmapped falls back to the class name, so a future cog shows up badly labelled rather than invisible.

Output is ephemeral, so it does not clutter the channel.

Tests

51, up from 48. The new ones assert that every command in the tree reaches a section, that no heading leaks a raw class name, and that the embed stays inside Discord's per-field and total size limits.

ghcr.io/thenotoriousjeremy/danbot:1.2.0

v1.1.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 04 Sep 01:30

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

v1.0.2

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 03 Sep 23:57

Fixes a crash that took the whole bot down a few seconds after any music playback started.

MusicPlayerView._refresh reused the name of discord.ui.View._refresh(components), which discord.py calls from parse_message_update for every tracked view. The player card is edited every eight seconds by the progress loop, so the first edit raised

TypeError: MusicPlayerView._refresh() missing 1 required positional argument: 'message'

inside the gateway poll task and killed the process.

That also explains the voice symptom it looked like: Voice connection complete followed six seconds later by the handshake terminating and ffmpeg being killed with -9. Voice was fine — the bot died mid-track and the connection went down with it.

The helper is now _ack_and_refresh, and the Stop button callback is stop_playback for the same reason — View.stop() is real API. Clicks route on custom_id, which did not change, so player cards posted before this release still work.

A test now asserts the view redefines no inherited name other than interaction_check.

ghcr.io/thenotoriousjeremy/danbot:1.0.2

v1.0.1

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 03 Sep 23:51

Fixes voice connections, which failed on v1.0.0 with Could not link to voice channel: davey library needed in order to use voice.

discord.py 2.7 raises that from the VoiceClient constructor whenever the davey package is missing — Discord's DAVE voice protocol library. The check runs before any connection is attempted, so /join and /play could never reach a voice channel.

davey only arrives through discord.py's voice extra, which requirements.txt was not using; the bare PyNaCl pin covered the older voice requirement and no longer covers this one. The extra pulls a correctly bounded PyNaCl as well, so the separate pin is gone.

No configuration change is needed — pull the new image and restart:

ghcr.io/thenotoriousjeremy/danbot:1.0.1

v1.0.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 03 Sep 23:29

First tagged release. DanBot now runs on a single migrated database, shares one
implementation of its chart and configuration code across every cog, and ships a
versioned container image.

Upgrading is in place: pull the new image and restart. The database migrates
itself on start and no manual steps are needed.

Storage and startup

  • One danbot.db replaces the per-feature databases, with forward-only
    migrations, WAL journaling, and indexes on every hot lookup. An existing
    birthdays.db is renamed automatically on first start.
  • Every table is guild-scoped. Rows written before scoping existed are adopted
    into the real guild on the first ready, when the bot is in exactly one server.
  • Channel ids are read from the environment and have no defaults. A cog whose
    channel is unset is skipped with the reason printed, so one missing id no
    longer stops the whole bot from starting.
  • The checked-in ffmpeg.exe and arial.ttf are gone. ffmpeg is resolved from
    FFMPEG_PATH, then PATH, then the imageio-ffmpeg wheel, so the same
    install works on Linux and Windows.

New

  • /play accepts playlist links and queues every track, up to 100. A shared
    video link that carries a list= parameter counts as a playlist.
  • /remove <position> drops a single queued track, numbered as /queue shows
    them.
  • /nowplaying shows the current track privately, without disturbing the live
    player card.
  • /remove_birthday [user] deletes a saved birthday. It defaulted to being
    impossible before.
  • The music player leaves voice on its own after five minutes idle or alone in
    the channel, and cleans up players whose voice client was disconnected out
    from under them.

Fixed

  • Server Wrapped read the current year once at startup, so a bot left running
    across New Year reported the wrong year indefinitely.
  • Two concurrent /server_wrapped runs each started a full scrape and then
    collided on the metrics primary key. Scrapes now take a per-guild lock and
    write idempotently.
  • Building the "most reacted" and "longest messages" lists fetched every
    candidate message over the API — up to a hundred round trips per report, and a
    frequent rate-limit trip. Everything those lines need was already stored.
  • Stopping the player while a skip was in flight left the skip flag set, so the
    next genuinely dropped stream failed to resume where it left off.
  • yt-dlp extraction shared a single YoutubeDL instance across executor
    threads, so two servers resolving a track at the same time could interfere.
  • Wordle statistics were aggregated by display name, merging two members who
    happened to share one. They are keyed by user id now.
  • /list_birthdays printed the name saved at /set_birthday time rather than
    the member's current one.
  • The weekly workout reset task was only weakly referenced by the event loop and
    could be collected mid-flight, stopping the reset with no error anywhere.
  • The connection commands were missing guild_only, and the graph layout ran on
    the event loop instead of in the worker thread with the drawing.
  • Avatar downloads passed a bare number as an aiohttp timeout, which is on its
    way out of the library.

Packaging

  • pytest moved to requirements-dev.txt and is no longer installed into the
    runtime image.

  • The container refreshes only yt-dlp on start. Everything else, discord.py
    included, stays at the version pinned at build time, so the image is
    reproducible.

  • Tagged pushes now publish 1.0.0 and 1.0 image tags alongside latest:

    ghcr.io/thenotoriousjeremy/danbot:1.0.0
    

Tests

python -m pytest covers the chart renderer, the music player's
stream-recovery and playlist decisions, the workout week math, Wordle parsing
and player identity, and the database migration. 32 tests.