Skip to content

Commit 540f93b

Browse files
committed
Fix contact command reporting always blocked
is_user_blocked un-intuitively returns a tuple. this should probably be looked over at some point
1 parent 76304f1 commit 540f93b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s
3232
### Fixed
3333
- Persistent notes have been fixed after the previous discord.py update.
3434
- `is_image` now is true only if the image is actually an image.
35+
- Fix contact command reporting user was blocked when they weren't.
3536

3637
### Internal
3738
- Add `update_title` and `update_nsfw` methods to `ApiClient` to update thread title and nsfw status in the database.

cogs/modmail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ async def contact(
15641564
elif u.bot:
15651565
errors.append(f"{u} is a bot, cannot add to thread.")
15661566
users.remove(u)
1567-
elif await self.bot.blocklist.is_user_blocked(u):
1567+
elif (await self.bot.blocklist.is_user_blocked(u))[0]:
15681568
ref = f"{u.mention} is" if ctx.author != u else "You are"
15691569
errors.append(f"{ref} currently blocked from contacting {self.bot.user.name}.")
15701570
users.remove(u)

0 commit comments

Comments
 (0)