I made a discord bot!
This is a general utility bot, aimed at a server. In future I’ll add more server-centric features. It can do as shown in the screenshot, and all the commands detailed in the repo.
DEFS the hardest part was setting up modmail. It’s also the most code out of anything, and I still have a relatively lazy solution. I decided, instead of doing straight threads like everyone else, my tickets are going to be channels and when done, archived to threads. This caused some headaches: the whole archive-to-threads thing was because i remembered discord had a 50-channel limit :/
a major problem in that was parsing and storing the messages in a modmail ticket. I cannot download all attachments and store it permanently: this will veeery quickly put a strain on storage. I’d rather not resend attachments by downloading and uploading them: this will use a lot of bandwith. and I can’t just forward every single message: this will have me very quickly hit my API rate limit. (archiving the channel can be done in bulk so I don’t hit the limit as easy there) so the solve i came up with is only messages with attachments are forwarded, and everything else is sent in the form of a .md file. You should be able to see how it looks yourself in the test server :D
i did a whooole lot of refactoring lol and I sure ain’t done. i went from single file to cogs, i went from .json to .toml, i went from single file config to multi file, and i went from writing to config as permanent storage to having a separate persistent.json file.
i hope i gave enough guidance to help you set up this bot myself! it is a bit hands-off: I don’t handhold through parts for which there are already guides (registering a discord bot, making a server and adding roles, cloning a git repo, etc) but i hope i did a good enough job on that which needs guidance. Otherwise, feel very free to try it out in the demo server, and just look at the config files without having to edit them :)
i hope you enjoy this bot, i had a lot of fun making it :D
- 4 devlogs
- 17h