diff options
| author | Rapptz <[email protected]> | 2017-04-30 02:53:33 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-04-30 02:53:33 -0400 |
| commit | 3f45db5c3b3ebb0cffbab206a926e25506e0fa71 (patch) | |
| tree | 2877dc587bfffee5d24277b7703c3b7bd5ba73e3 | |
| parent | Add Client.get_emoji to get an Emoji from an ID. (diff) | |
| download | discord.py-3f45db5c3b3ebb0cffbab206a926e25506e0fa71.tar.xz discord.py-3f45db5c3b3ebb0cffbab206a926e25506e0fa71.zip | |
Better TextChannel.is_nsfw() check.
| -rw-r--r-- | discord/channel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/channel.py b/discord/channel.py index d674d5b7..fee9fd01 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): |