BigBrother Bot
- 4 Devlogs
- 10 Total hours
He is always watching!
He is always watching!
Imagine you are the head of Propaganda of an authoritarian state and you need to automate propaganda releases. Well, this is how I felt today after trying to automate this exact process. In the book 1984 propaganda is everywhere, so I replicated that. The hardest part for me was the writing of the propaganda. This is because I, as unexpected as it sounds, am not the head of Propaganda in an authoritarian state, so after around 10 minutes I asked my good friend Claude if he could write me some propaganda. Claude generated 50 different messages.
If anybody has some propaganda messages I could use just DM me on Slack or write it in the comments!
The next step for me is to become the head of police and automate the flagging of negative sentiments.
Slash commands in Slack don’t convert @mentions to user IDs and I learned that the hard way. My /bigbrother-loyalty command was getting @jachym.fukal as plain text instead of <@U09L3LVPJ82>, so the regex I wrote was completely useless. The workspace also has 30k+ users so just fetching the whole user list isn’t an option either. For now the command just takes a raw user ID, which isn’t pretty but works. Next step is figuring out a cleaner way to handle this.
Sieving through all channels would have taken hours. Now I am only using 10, which are the most used ones on the Hackclub workspace.
So I wrote a code that scans these 10 channels for messages of a specific user, which I want to use for a loyalty score in the future. But the problem isn’t completely solved, because the script needs around 50 seconds to look through these 10 channels.
So now I am in a bit of a pickle.
I am thinking about saving the data from the last scan and then only retrieving new data from the channels.
Added the first version of the bot’s surveillance system. My original plan was to scan every channel in the Hack Club workspace weekly and fetch message history from all channels whenever a slash command was used. After looking into it, I realized the workspace has so many channels that a single command could take hours to finish, making the approach impractical. For now, I switched to a manually curated list of channels that the bot will monitor while I investigate a more scalable solution.