CodecademyCommunity / codecademy-discord-bot

Custom moderation bot for the official Codecademy Community Discord server.
https://codecademycommunity.github.io/
MIT License
11 stars 1 forks source link

convert verbal command to slash cmd #311

Closed mikejoh12 closed 2 years ago

mikejoh12 commented 2 years ago

What issue is this solving?

Closes #300

Description

Converts cc!verbal to a slash command.

Any helpful knowledge/context for the reviewer?

Please make sure you've attempted to meet the following coding standards

mikejoh12 commented 2 years ago

I added error handling for users with DMs disabled. In case of blocked DMs on the target-user the command will now inform the person using the command that DMs are likely blocked so that they can take other action.

Also incorporated the helper function to verify that reason length fits in the database column. Since some text was added to the reason in one of the tables, I needed to use a value less than 255 characters. The verifyReasonLength function was slightly modified to display the correct max length in case of values other than 255.

mikejoh12 commented 2 years ago

The merge conflict is resolved and was related to the command permission settings since timeout just got merged.