Adds ban and unban slash commands. Ban now works for a user that has DMs disabled or is not part of the guild as long as the user-id is entered. The ban command also includes an option for 0 to 7 days of messages to delete when banning a user. This range was chosen because it's what the discord.js API supports.
I added the command permissions to the commandRoles permission handler for consistency even though now with Discord permissions v2 that functionality of setting command permissions does not work.
Any helpful knowledge/context for the reviewer?
Since our programmatic permission setting is currently not working you may need to go to Server Settings -> Interactions -> Your Dev Bot and enable the command manually for the Moderator role and above.
Is a re-seeding of the database necessary? No
Any new dependencies to install? No
Any special requirements to test?
Test with both your admin and alt account.
Please make sure you've attempted to meet the following coding standards
[X] Code has been tested and does not produce errors
[X] Code is readable and formatted
[X] There isn't any unnecessary commented-out code
What issue is this solving?
Closes #296
Description
Adds ban and unban slash commands. Ban now works for a user that has DMs disabled or is not part of the guild as long as the user-id is entered. The ban command also includes an option for 0 to 7 days of messages to delete when banning a user. This range was chosen because it's what the discord.js API supports.
I added the command permissions to the commandRoles permission handler for consistency even though now with Discord permissions v2 that functionality of setting command permissions does not work.
Any helpful knowledge/context for the reviewer?
Since our programmatic permission setting is currently not working you may need to go to Server Settings -> Interactions -> Your Dev Bot and enable the command manually for the Moderator role and above.
Please make sure you've attempted to meet the following coding standards