Skip to content

Commit

Permalink
Fix contact command reporting always blocked
Browse files Browse the repository at this point in the history
is_user_blocked un-intuitively returns a tuple. this should probably be looked over at some point
  • Loading branch information
khakers committed Apr 13, 2024
1 parent 76304f1 commit 540f93b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s
### Fixed
- Persistent notes have been fixed after the previous discord.py update.
- `is_image` now is true only if the image is actually an image.
- Fix contact command reporting user was blocked when they weren't.

### Internal
- Add `update_title` and `update_nsfw` methods to `ApiClient` to update thread title and nsfw status in the database.
Expand Down
2 changes: 1 addition & 1 deletion cogs/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ async def contact(
elif u.bot:
errors.append(f"{u} is a bot, cannot add to thread.")
users.remove(u)
elif await self.bot.blocklist.is_user_blocked(u):
elif (await self.bot.blocklist.is_user_blocked(u))[0]:
ref = f"{u.mention} is" if ctx.author != u else "You are"
errors.append(f"{ref} currently blocked from contacting {self.bot.user.name}.")
users.remove(u)
Expand Down

0 comments on commit 540f93b

Please sign in to comment.