Remove Guild.default_channel
The concept no longer exists.
This commit is contained in:
parent
9cfa39a1c7
commit
3dc1195637
@ -322,11 +322,6 @@ class Guild(Hashable):
|
||||
"""Gets the @everyone role that all members have by default."""
|
||||
return utils.find(lambda r: r.is_default(), self.roles)
|
||||
|
||||
@property
|
||||
def default_channel(self):
|
||||
"""Gets the default :class:`TextChannel` for the guild."""
|
||||
return self.get_channel(self.id)
|
||||
|
||||
@property
|
||||
def owner(self):
|
||||
""":class:`Member`: The member that owns the guild."""
|
||||
@ -1100,8 +1095,13 @@ class Guild(Hashable):
|
||||
|
||||
# we start with { code: abc }
|
||||
payload = yield from self._state.http.get_vanity_code(self.id)
|
||||
|
||||
# get the vanity URL channel since default channels aren't
|
||||
# reliable or a thing anymore
|
||||
data = yield from self._state.http.get_invite(payload['code'])
|
||||
|
||||
payload['guild'] = self
|
||||
payload['channel'] = self.default_channel
|
||||
payload['channel'] = self.get_channel(int(data['channel']['id']))
|
||||
payload['revoked'] = False
|
||||
payload['temporary'] = False
|
||||
payload['max_uses'] = 0
|
||||
@ -1181,7 +1181,7 @@ class Guild(Hashable):
|
||||
Getting entries made by a specific user: ::
|
||||
|
||||
entries = await guild.audit_logs(limit=None, user=guild.me).flatten()
|
||||
await guild.default_channel.send('I made {} moderation actions.'.format(len(entries)))
|
||||
await channel.send('I made {} moderation actions.'.format(len(entries)))
|
||||
"""
|
||||
if user:
|
||||
user = user.id
|
||||
|
@ -337,6 +337,11 @@ They will be enumerated here.
|
||||
|
||||
- There is no replacement for this one. This functionality is deprecated API wise.
|
||||
|
||||
- ``Guild.default_channel`` / ``Server.default_channel``
|
||||
|
||||
- The concept of a default channel was removed from Discord.
|
||||
See `#329 <https://github.com/hammerandchisel/discord-api-docs/pull/329>`_.
|
||||
|
||||
- ``Message.edited_timestamp``
|
||||
|
||||
- Use :attr:`Message.edited_at` instead.
|
||||
|
Loading…
x
Reference in New Issue
Block a user