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

`cc!ban` does not ban the user if they have DMs disabled #228

Closed lyallstewart closed 2 years ago

lyallstewart commented 2 years ago

Describe the bug

Attemping to ban a user who has DMs disabled from server members will not sucessfully ban the user, instead a DiscordAPIError will be thrown and the user remains in the server (the only way to ban them is via Discord directly or through another bot)

Expected behavior

The user should be banned regardless of their privacy settings. Although I would suggest that a message be sent in chat letting the moderator know that while the ban was successful, the user would not have recieved the appeal form or reason.

To Reproduce

Steps to reproduce the behavior:

  1. Disable DMs from server members on an alt account
  2. Attempt to ban the alt account via cc!ban
  3. Error is thrown and user is not banned.

Screenshots

image

Additional context

Fairly low-priority bug seeing as we can always just ban via Discord but it's also decently important to have users receive the appeal form.

Victoria-DR commented 2 years ago

Text commands have been phased out.