From 540f93bff53c2cfc79000a43d0234de658ceb745 Mon Sep 17 00:00:00 2001 From: Khakers <22665282+khakers@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:51:42 -0700 Subject: [PATCH] Fix contact command reporting always blocked is_user_blocked un-intuitively returns a tuple. this should probably be looked over at some point --- CHANGELOG.md | 1 + cogs/modmail.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a369ce6624..ee4f7f3e33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/cogs/modmail.py b/cogs/modmail.py index 057b307558..ecfb63bc14 100644 --- a/cogs/modmail.py +++ b/cogs/modmail.py @@ -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)