diff options
| author | Rapptz <[email protected]> | 2021-06-08 05:36:23 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-06-08 05:37:10 -0400 |
| commit | 5c2945bcd4aa264fbd47abc31fc5521fb6319e8d (patch) | |
| tree | b188cb8ee7a40c5d1cd91aa1f613924f456fdb70 | |
| parent | update types subpackage with latest docs (diff) | |
| download | discord.py-5c2945bcd4aa264fbd47abc31fc5521fb6319e8d.tar.xz discord.py-5c2945bcd4aa264fbd47abc31fc5521fb6319e8d.zip | |
Fix AttributeError in is_nsfw() methods
| -rw-r--r-- | discord/channel.py | 6 |
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: |