aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-04-16 20:29:13 -0400
committerRapptz <[email protected]>2019-04-16 20:29:13 -0400
commit812578f0c953f3532c405568284a5bec9863ada2 (patch)
treec0fd697d902cd924ed626757d5f4a5fa32b46515
parentMake discord --version a bit more helpful. (diff)
downloaddiscord.py-812578f0c953f3532c405568284a5bec9863ada2.tar.xz
discord.py-812578f0c953f3532c405568284a5bec9863ada2.zip
Remove legacy nsfw check.
-rw-r--r--discord/channel.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 26fcb386..96f9e3c6 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -146,8 +146,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
def is_nsfw(self):
"""Checks if the channel is NSFW."""
- n = self.name
- return self.nsfw or n == 'nsfw' or n[:5] == 'nsfw-'
+ return self.nsfw
def is_news(self):
"""Checks if the channel is a news channel."""
@@ -628,8 +627,7 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
def is_nsfw(self):
"""Checks if the category is NSFW."""
- n = self.name
- return self.nsfw or n == 'nsfw' or n[:5] == 'nsfw-'
+ return self.nsfw
async def edit(self, *, reason=None, **options):
"""|coro|
@@ -791,8 +789,7 @@ class StoreChannel(discord.abc.GuildChannel, Hashable):
def is_nsfw(self):
"""Checks if the channel is NSFW."""
- n = self.name
- return self.nsfw or n == 'nsfw' or n[:5] == 'nsfw-'
+ return self.nsfw
async def edit(self, *, reason=None, **options):
"""|coro|