aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-06-08 05:36:23 -0400
committerRapptz <[email protected]>2021-06-08 05:37:10 -0400
commit5c2945bcd4aa264fbd47abc31fc5521fb6319e8d (patch)
treeb188cb8ee7a40c5d1cd91aa1f613924f456fdb70
parentupdate types subpackage with latest docs (diff)
downloaddiscord.py-5c2945bcd4aa264fbd47abc31fc5521fb6319e8d.tar.xz
discord.py-5c2945bcd4aa264fbd47abc31fc5521fb6319e8d.zip
Fix AttributeError in is_nsfw() methods
-rw-r--r--discord/channel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 96cdaeb1..743619f4 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -175,7 +175,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
def is_nsfw(self):
""":class:`bool`: Checks if the channel is NSFW."""
- return self.nsfw or self.guild.nsfw
+ return self.nsfw
def is_news(self):
""":class:`bool`: Checks if the channel is a news channel."""
@@ -1128,7 +1128,7 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
def is_nsfw(self):
""":class:`bool`: Checks if the category is NSFW."""
- return self.nsfw or self.guild.nsfw
+ return self.nsfw
@utils.copy_doc(discord.abc.GuildChannel.clone)
async def clone(self, *, name: str = None, reason: Optional[str] = None) -> CategoryChannel:
@@ -1355,7 +1355,7 @@ class StoreChannel(discord.abc.GuildChannel, Hashable):
def is_nsfw(self):
""":class:`bool`: Checks if the channel is NSFW."""
- return self.nsfw or self.guild.nsfw
+ return self.nsfw
@utils.copy_doc(discord.abc.GuildChannel.clone)
async def clone(self, *, name: str = None, reason: Optional[str] = None) -> StoreChannel: