Changelog - Version 5.7.11 (2026-05-25)
Version Information
- Updated version from 5.7.10 to 5.7.11
- Fix for the Stable bot: the
!unlurkcommand now reliably clears the viewer’s lurk row, so the next!lurkno longer carries over a stale timer
Bug Fixes
- Fixed
!unlurkleaving the viewer’s lurk row in the databaseunlurk_commandranawait send_chat_message(...)andadd_usage(...)before theDELETE FROM lurk_timesstatement. If either of those raised — a Twitch chat hiccup, a websocket drop, anything that bubbled up to the outertry/except Exception— the bot replied “Oops, something went wrong with the unlurk command” and the DELETE never executed.- The viewer’s stale
start_timethen survived to the next session. Running!lurkagain would surface that old timestamp and produce misleading messages like “you’ve been lurking for 20 hours, 21 minutes — I’ve reset your lurk time” even though the viewer had been gone for the entire offline gap. - The handler now computes the lurk duration first, then runs the DELETE + commit immediately, then sends the chat reply and records usage. The DELETE is now the first I/O after the SELECT — nothing that can fail sits between them.
- Fixed
user_idtype inconsistency between!lurkand!unlurk/!lurkinglurk_commandstored rows withuser_id = str(ctx.author.id)(string).unlurk_commandandlurking_commandqueried with rawctx.author.id(int) and relied on MySQL’s implicitVARCHAR ↔ intcoercion to find the row.- Coercion usually works for numeric Twitch IDs but it’s a fragile contract that’s better not relied on. Both handlers now coerce to
str(ctx.author.id)before binding, matching how!lurkwrites the row.
Technical Details
unlurk_command: reordered the result-handling block. Thestart_timeparsing andformat_lurk_time(...)call run first to capture the duration into a localtime_string(wrapped in its own try/except so a single malformed row doesn’t poison the DELETE). TheDELETE FROM lurk_times WHERE user_id = %s+await connection.commit()then runs immediately. The chat reply andadd_usagecall follow after the DB write is committed.lurking_command(line ~4698) andunlurk_command(line ~4812):user_id = ctx.author.id→user_id = str(ctx.author.id). Code comment added explaining the parity withlurk_command.- No schema change —
lurk_times.user_idwas alreadyVARCHAR(255).
Thank you for your feedback and support!
As always, your feedback is appreciated. Please report any issues, bugs, or suggestions in the #ticket-info channel on our Discord server. You can also submit feedback and bug reports directly on our support website: https://support.botofthespecter.com/