Skip to content

v1.0.0

Choose a tag to compare

@thenotoriousJeremy thenotoriousJeremy released this 03 Sep 23:29
· 9 commits to main since this release

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.