The unmerged euphie branch (last commit 553e3af, "add partial sotd features") contains three features that never shipped. Port them to Python cogs and finish them.
1. Song of the day — !sotd <spotify-link> (partial; relates to #23)
What exists: parses the link with spotify-uri, accepts only tracks, appends date url memberId to songs.txt, and rejects submitters who are among recent submitters ("You've already got a song lined up within the next week.").
Why it doesn't work / what's missing:
submitterIsValid(last7Submitters, member.id) references an undefined member (should be msg.member.id) — every submission throws and replies "Error queueing song"
getSotdSubmissions() returns before lineReader.eachLine's async callbacks run, so the submission list is always empty
last7Submitters collects the first 7 lines of songs.txt, not the last 7
- no success reply to the submitter
- the entire daily-posting half is missing — nothing ever reads
songs.txt and posts a song
In the Python rewrite this becomes a /sotd slash command; a proper store (sqlite/json) beats songs.txt.
2. After-dark role automation (in main.js and duplicated in secretFeature.js)
Hourly job: any member with both the lvl-10 role and the 18+ "aged" role who lacks the after-dark role gets it added. Straightforward port to a discord.ext.tasks hourly loop (or better, an on_member_update listener so it's instant). Role IDs → config.toml.
3. Butterfly sanctuary report (secretFeature.js)
Monday 10 PM job: posts to the admin channel a list of level-15 members who have neither the social-caterpillar nor social-butterfly role. Port as a weekly tasks loop. One bug to avoid carrying over: the report message accumulates via a module-level global mutated by async callbacks, so the message could post before/while names are still being appended.
Note: #2 and #3 lived in secretFeature.js (kept out of main on purpose in the old deploy setup). The Python bot has no secret-concat mechanism — decide whether these are fine as normal committed cogs or need to stay private.
The unmerged
euphiebranch (last commit 553e3af, "add partial sotd features") contains three features that never shipped. Port them to Python cogs and finish them.1. Song of the day —
!sotd <spotify-link>(partial; relates to #23)What exists: parses the link with
spotify-uri, accepts only tracks, appendsdate url memberIdtosongs.txt, and rejects submitters who are among recent submitters ("You've already got a song lined up within the next week.").Why it doesn't work / what's missing:
submitterIsValid(last7Submitters, member.id)references an undefinedmember(should bemsg.member.id) — every submission throws and replies "Error queueing song"getSotdSubmissions()returns beforelineReader.eachLine's async callbacks run, so the submission list is always emptylast7Submitterscollects the first 7 lines ofsongs.txt, not the last 7songs.txtand posts a songIn the Python rewrite this becomes a
/sotdslash command; a proper store (sqlite/json) beatssongs.txt.2. After-dark role automation (in
main.jsand duplicated insecretFeature.js)Hourly job: any member with both the lvl-10 role and the 18+ "aged" role who lacks the after-dark role gets it added. Straightforward port to a
discord.ext.taskshourly loop (or better, anon_member_updatelistener so it's instant). Role IDs →config.toml.3. Butterfly sanctuary report (
secretFeature.js)Monday 10 PM job: posts to the admin channel a list of level-15 members who have neither the social-caterpillar nor social-butterfly role. Port as a weekly
tasksloop. One bug to avoid carrying over: the report message accumulates via a module-level global mutated by async callbacks, so the message could post before/while names are still being appended.Note: #2 and #3 lived in
secretFeature.js(kept out of main on purpose in the old deploy setup). The Python bot has no secret-concat mechanism — decide whether these are fine as normal committed cogs or need to stay private.