A custom made bot for https://discord.io/FITMostar and https://reddit.com/r/FITMostar
You probably won't be able to run this bot without changing a bunch of hardcoded variables, like channel IDs, emoji IDs and such, but I am releasing the code anyway.
I do not vouch that this repository will be updated with the production code that the bot is running right now, because I just don't have the time to do that.
Below here are all the custom modules the bot is using.
They can be easily /cogs enable
-d and /cogs disable
-d, among other things. You can manually disable a cog from loading by either removing it from data/cogs, or renaming it so it doesn't end on .py (I use .disabled so the /cogs
commands work with it)
Cog | Description |
---|---|
custom_commands | Handles creation, editing, removal, and display of custom slash commands. |
confessions | Publicly, but anonymously confess something using /confess . |
join_message | Sends a DM to a user that joins the server. |
notify_roles | Notifies people that they should probably grab some /roles . |
pins | Handles #pins, uses Webhooks to make it look like a user sent the pin. |
role_picker | A custom, and very hard-coded role picker system that uses buttons. |
schedule | Figures out what year you are (ahem, /roles ) and sends you the schedule. |
scraper | Scrapes new posts from fit.ba/student, then sends them to a channel using a Webhook with the professor's name and photo. |
voice_channels | Automatically creates voice channels depending on if the current ones are used. |
voice_text | Gives access to the voice-text channel, but only if you're in a voice channel. |
There are a lot of things you'd have to do to make this bot run, here are some of them:
- Provide
txtBrojDosijea
,txtLozinka
,webhook_url
,roleTagID
,channelID
,guild_id
, and optionallyredditdata
indata/config.json
.
- Provide
self.confessions_webhook_url
,self.confessions_user_avatar_url
, andself.confessions_channel_id
indata/cogs/confessions.py
.
- Setup
self.chosen_roles
and provide a list of roles the user should have, indata/cogs/notify_roles.py
.
- Provide
self.pins_channel_id
indata/cogs/pins.py
, and make sure the channel has a bot-accessible webhook.
- Honestly, don't even try. Sorry about the spaghetti code.
- Provide
self.year_roles
indata/cogs/schedule.py
, and make suredata/rasporedi.json
have up-to-date image links.
- Provide
self.voice_text_channel_id
indata/cogs/voice_text.py
.
- These should work as-is.
- Set
TOKEN
andGUILDID
inmain.py
You can manually disable any cog from loading by simply adding .disabled to the end of its name.
No need. Please.
This project is licensed under the GNU General Public License v3.0, so you can do a lot of things with it. Have fun, I guess.