adampy / adambot

General-purpose discord bot, called Adam-Bot. The main bot instance is hosted on AWS EC2 Spot Instances, however can run locally when needed.
6 stars 6 forks source link

`-ban` command not working #48

Open adampy opened 1 year ago

adampy commented 1 year ago

As title implies. It seems all bans are currently broken.

raven0034 commented 1 year ago

Given nothing has changed within the codebase it might be worth looking at dependency related issues (or if it might be something on Discord's side). has d.py been updated recently? haven't really kept up to date with this stuff for a while

adampy commented 1 year ago

I can't say I have been keeping up with it either. Discord.py has been updated to V2 but tbh the ban command has always been a bit iffy. I'm thinking of removing the traditional dash commands and only keeping the slash commands to keep up with the times too - plus that would reduce code a lot.

Doing the above might also mean that we get some types enforced in the code, and things like banning would become a lot easier. Let me know what you think :rocket:

raven0034 commented 1 year ago

The original intent of keeping both was for the sake of convenience for the server it was primarily intended for, however if it makes it simpler to use only slash commands that sounds like a plan (and I do agree with what you've mentioned). although I never really figured out how to custom commands for slash commands, it'll be simpler to replace this with a separate cog with things specific e.g. to 9-1, and perhaps have that in a separate repo - one of things I wanted to avoid was having server specific code within the repo! I say this because whilst the custom commands stuff was fun to write it's a maintainability nightmare imo.

Type enforcement is the main pro here - there's a lot of things which could lead to unexpected behaviour at the moment that we have to explicitly cover, but a lot of this can be removed if we can safely rely on the API to provide data in the form we're expecting. I vaguely remember some limitations on slash commands, but that was ages ago so I don't remember specifics, and it's probably improved since (or I missed things at the time).