Repository navigation
v0.0.0
·
48 commits
to main
since this release
v0.0.0 (2026-10-28)
The first release under the Lys name: a rework of BotSuite.
Added
- Every deploy first runs gofmt, go vet and the tests with the race detector; a failure stops the deploy.
- Database migrations: Lys applies them on startup with the migrator role (
LYS_DATABASE_MIGRATOR_URLin Cove), and refuses to start if its database is older than it needs. The first migration records the existing schema and changes nothing in it. lys migrate statuslists the migrations and when each was applied;lys migrate upapplies any that are pending.!helplists the commands, and!help <command>describes one./healthreports whether Twitch is connected, and answers 503 while it isn't, so Docker shows Lys as unhealthy. It also reports the version running (the release or commit Lighthouse deployed), which Lys logs at startup too.- Channels, the people who use commands, and the bot account are stored platform-neutrally (communities, connections, platform users, bot accounts), ready for more platforms and for linking accounts on the website. Existing channels, prefixes and users are copied in; the old tables are kept and still written.
lys channel list,lys channel add,lys channel blockandlys channel unblockmanage channels from the command line. A name that several channels share is refused (use the ID), andchannel listtells a revoked channel from one that was never authorized.lys bot authorizesigns Lys in as its Twitch bot account and stores the tokens in Cove, replacing the manual token exchange.lys helplists every command and guide;lys help <command>shows its usage, flags and examples.!remind <10m|1h30m|2d> <message>posts a reminder in the same channel later (1 minute to 30 days, up to 10 waiting per person), with!remind listand!remind cancel <id>.!autopost add <how often> <message>(e.g.!autopost add 30m Follow!) posts a message on repeat (every 5 minutes to 24 hours, up to 10 per channel), for the channel's owner and moderators. It only posts while chat is active, with at least 5 messages since its last post, so quiet and offline channels get nothing.!autopost listshows each autopost's number, message and next post;!autopost remove <number>stops one.- Reminders and autoposts survive restarts; a failed one is retried with backoff, and two Lys instances never run the same one.
- Lys announces new Letterboxd diary entries itself, replacing LetterboxdWatcher, with the same wording; the "see other entries" link now opens the member's activity page.
- Sleeper trades and waiver claims are announced in the league's channel, once each; a league's first check only records what already happened.
!ff alertsshows which are announced, and!ff alerts <trades|waivers> <on|off>changes it. - Adding, blocking or unblocking a channel (with
lys channel …too) takes effect within seconds, without a restart. - When Twitch says the bot was banned in a channel, or the channel's account is gone, Lys leaves it and
lys channel listshows it as revoked;lys channel addbrings it back. - When Twitch revokes the bot account's own authorization,
/healthturns unhealthy and the log says to runlys bot authorize. - An enrollment API for the website:
POST /channelswith a platform and channel ID adds the channel (the bot joins within seconds), taking its name from Twitch and refusing IDs Twitch doesn't know;DELETE /channels/{platform}/{id}turns Lys off in it, keeping its settings. It needs the shared tokenSHARED_LYS_ENROLLMENT_TOKENand is only reachable on the server's internal network.
Changed
- Renamed from BotSuite to Lys: the database, schema, roles, Cove keys and container are all
lysnow. - The bot account's Twitch tokens are kept in Cove (
LYS_TWITCH_ACCESS_TOKEN,LYS_TWITCH_REFRESH_TOKEN) instead of the database, refreshed at startup and written back after every refresh. - The Twitch app token is fetched at startup and kept in memory only.
- Lys refuses to start if its Twitch tokens belong to an account other than the bot.
- Built with Go 1.27.3 on Alpine 3.24.
- Commands run side by side (up to 8 at once), each with its own time limit, so a slow command no longer holds up the others.
- Replies are paced per channel, one every 1.5 seconds, instead of one per second across every channel.
- The notification inlet only accepts requests with the shared token (
SHARED_LYS_NOTIFICATION_TOKEN), and its port is no longer published on the server: only services on thesparknetwork reach it. - The bot ignores its own chat messages.
- Owner-only commands also accept the channel's broadcaster role, not only a matching Twitch ID.
LYS_TWITCH_BOT_IDis only needed until Lys has recorded its bot account.- Games, feature requests, Sleeper leagues and Letterboxd subscriptions are linked to channels and people by Lys's own IDs instead of Twitch IDs and names; existing rows are linked automatically at startup.
!oneup stats <name>finds people by their current name, and their stats follow them through a rename; fastest and slowest show current names.!request getand!request setare limited to the bot's owner by Twitch ID instead of by display name.- A Sleeper member who changes their Twitch name keeps their link, and is found by their new name.
Fixed
- A command that crashes now replies with an error instead of taking the bot down.
- A chat message rejected with a 401 is retried once with a new app token instead of forever, which froze the bot for every channel.
!ff tradeswithout a name no longer crashes the bot.!gptno longer crashes the bot when OpenAI is slow, unreachable or returns an error.!sleeper link userno longer crashes when the Sleeper API fails, and says when no one by that name has a team.!sleeper link leagueworks again; it always failed before.!oneup stats <puzzle>for a puzzle with no recorded games says so instead of replying with an error, and!oneup stats <x> <puzzle>shows the game count instead of a memory address.!oneup leadersand unknown!oneup statsforms reply instead of saying the command doesn't exist.- Shutting down no longer panics.
- When Twitch asks the bot to move to a new connection and that fails, the bot opens a fresh connection instead of crashing.
- A failed connection to Twitch at startup reports the error instead of crashing.
- A channel without a settings row no longer stops the bot from starting; it uses the
!prefix. - Two Lys instances starting at once no longer fail while preparing migrations.
- A Twitch connection that goes silent is noticed within its keepalive timeout and reopened, instead of leaving the bot deaf.
- A channel that refuses the bot's messages (banned, timed out, or missing its permission) is paused for 10 minutes instead of failing on every reply; a rate-limited message waits for Twitch's reset and is sent once more.