From 3f45db5c3b3ebb0cffbab206a926e25506e0fa71 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 30 Apr 2017 02:53:33 -0400 Subject: [PATCH] Better TextChannel.is_nsfw() check. --- discord/channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/channel.py b/discord/channel.py index d674d5b76..fee9fd01e 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -113,7 +113,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): def is_nsfw(self): """Checks if the channel is NSFW.""" n = self.name - return n == 'nsfw' if len(n) < 5 else n[:5] == 'nsfw-' + return n == 'nsfw' or n[:5] == 'nsfw-' @asyncio.coroutine def edit(self, **options):