Remove GuildChannel.is_default
This commit is contained in:
parent
1582116b72
commit
8acf3d01ce
@ -254,10 +254,6 @@ class GuildChannel:
|
|||||||
ret.append(role)
|
ret.append(role)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def is_default(self):
|
|
||||||
"""bool : Indicates if this is the default channel for the :class:`Guild` it belongs to."""
|
|
||||||
return self.guild.id == self.id
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mention(self):
|
def mention(self):
|
||||||
"""str : The string that allows you to mention the channel."""
|
"""str : The string that allows you to mention the channel."""
|
||||||
@ -356,9 +352,7 @@ class GuildChannel:
|
|||||||
# have to take into effect.
|
# have to take into effect.
|
||||||
# After all that is done.. you have to do the following:
|
# After all that is done.. you have to do the following:
|
||||||
|
|
||||||
# If manage permissions is True, then all permissions are set to
|
# If manage permissions is True, then all permissions are set to True.
|
||||||
# True. If the channel is the default channel then everyone gets
|
|
||||||
# read permissions regardless.
|
|
||||||
|
|
||||||
# The operation first takes into consideration the denied
|
# The operation first takes into consideration the denied
|
||||||
# and then the allowed.
|
# and then the allowed.
|
||||||
@ -408,10 +402,6 @@ class GuildChannel:
|
|||||||
base.handle_overwrite(allow=overwrite.allow, deny=overwrite.deny)
|
base.handle_overwrite(allow=overwrite.allow, deny=overwrite.deny)
|
||||||
break
|
break
|
||||||
|
|
||||||
# default channels can always be read
|
|
||||||
if self.is_default():
|
|
||||||
base.read_messages = True
|
|
||||||
|
|
||||||
# if you can't send a message in a channel then you can't have certain
|
# if you can't send a message in a channel then you can't have certain
|
||||||
# permissions as well
|
# permissions as well
|
||||||
if not base.send_messages:
|
if not base.send_messages:
|
||||||
|
@ -207,7 +207,6 @@ In order to be a bit more consistent, certain things that were properties were c
|
|||||||
|
|
||||||
The following are now methods instead of properties (requires parentheses):
|
The following are now methods instead of properties (requires parentheses):
|
||||||
|
|
||||||
- :meth:`TextChannel.is_default`
|
|
||||||
- :meth:`Role.is_default`
|
- :meth:`Role.is_default`
|
||||||
- :meth:`Client.is_ready`
|
- :meth:`Client.is_ready`
|
||||||
- :meth:`Client.is_closed`
|
- :meth:`Client.is_closed`
|
||||||
@ -337,7 +336,7 @@ They will be enumerated here.
|
|||||||
|
|
||||||
- There is no replacement for this one. This functionality is deprecated API wise.
|
- There is no replacement for this one. This functionality is deprecated API wise.
|
||||||
|
|
||||||
- ``Guild.default_channel`` / ``Server.default_channel``
|
- ``Guild.default_channel`` / ``Server.default_channel`` and ``Channel.is_default``
|
||||||
|
|
||||||
- The concept of a default channel was removed from Discord.
|
- The concept of a default channel was removed from Discord.
|
||||||
See `#329 <https://github.com/hammerandchisel/discord-api-docs/pull/329>`_.
|
See `#329 <https://github.com/hammerandchisel/discord-api-docs/pull/329>`_.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user