From 5708021c42e8d4315b233c5e06ff447ea4334576 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sun, 4 Dec 2022 14:04:03 +0000 Subject: Fix help channels with no content not opening properly Chanels that just contained one or more images as an exampole would have the message.content equal to the empty string which != None, so the current check never got hit. Closes #2355 Closes BOT-3BW --- bot/exts/help_channels/_channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py index 5c47a3559..fad2a32a9 100644 --- a/bot/exts/help_channels/_channel.py +++ b/bot/exts/help_channels/_channel.py @@ -94,7 +94,7 @@ async def send_opened_post_dm(post: discord.Thread) -> None: return formatted_message = textwrap.shorten(message.content, width=100, placeholder="...").strip() - if formatted_message is None: + if not formatted_message: # This most likely means the initial message is only an image or similar formatted_message = "No text content." -- cgit v1.2.3