Spectralis devlog #4
—Hello again proggers—
Uh. So. It’s been 11 hours. We sat down, opened the bot code, and just… didn’t stop. No devlog got posted because posting a devlog requires noticing that time is a thing that’s passing, and that stopped happening somewhere around hour 3.
this is fine, this has always been fine
Cat or dog? channelLock.ts
print(f”I try to make stu{2f} which {actually_locked} {11hrs_later}”)
Okay let’s get into it, before I forget more of it~
—Yap—
No app changes this round. Zero. Not one line touched in Spectralis.App or Spectralis.Core. This whole stretch was 100% the Discord bot, going from “stubbed slash commands” to “bot that actually watches chat and does something about it.”
—The Great Suffering—
1 — Railway Kept Rebuilding Rust For No Reason
v5.3.2. Railway was rebuilding the entire backend on every single deploy regardless of whether the Rust actually changed. Pinned the build so it stops doing that. Small fix, saved a genuinely upsetting amount of deploy time.
2 — The Bot Learned to Watch Chat
v5.3.3, and the actual reason for the 11 hours. The bot now watches the queue channel and reacts to song submissions as they come in, instead of just sitting there answering slash commands and pretending it doesn’t see anything else happening.
3 — New Files, New Problems
messageSubmission.ts showed up to handle reacting to and tracking submitted songs in chat. channelLock.ts showed up next to it to handle locking logic for the watched channel, because a bot watching chat unsupervised is a bot that needs boundaries.
4 — Bot Token Can Now Actually See Things
Bumped the bot token’s permissions so it can see and read submissions in the first place, which, in hindsight, was load-bearing for “watches chat and reacts to submissions.” Can’t react to what you can’t read.
5 — New Slash Commands, Existing Ones Got Bigger
set-closed-message and set-open-message let streamers customize what shows up when the queue opens or closes instead of eating a hardcoded string. open-queue/close-queue got extended to actually talk to the new messaging and channel-lock logic instead of just flipping a flag and hoping.
6 — Everything Downstream Had to Catch Up
db.ts, sqApi.ts, nowPlayingPoller.ts, types.ts, and index.ts all expanded to support the submission-tracking flow end to end. Backend picked up a small related change too, +11/-2 in main.rs, mostly plumbing to support what the bot needed on the other end.
—FAQ (no one asked these but they are here)—
Q: What is a “progger”?
A: A human programmer. You. The one who let this go 11 hours without a devlog.
Q: How did 11 hours happen?
A: One slash command needed one more file, which needed one more type, which needed the bot to actually be able to read messages, and then the sun came up.
Q: Is the C# app okay?
A: Untouched and fine. It got the week off.
Q: Why does the bot need to watch chat instead of just answering commands?
A: Song submissions happen by posting in the channel, not by running a command every time. The bot needed to actually see that to react to and track them.
Q: What’s channelLock.ts for?
A: Making sure the watched channel behaves predictably while the bot is actively tracking submissions in it, instead of reacting to chaos.
Q: Are we caught up on devlogs now?
A: This is #4. We are exactly as caught up as we’re going to get.
—This is the end*—
*end for now, sleep permitting
PANCAKES!!!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.