From 5d78f43e558cdd55e22eb12a090d3d75fd258a8e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 12 Feb 2019 20:21:29 -0500 Subject: Expose more information from partial invites, along with counts. This adds the following information. * `PartialInviteGuild` to replace `Object` patching * `PartialInviteChannel` to replace `Object` patching * Invite.approximate_member_count and Invite.approximate_presence_count The new partial objects provide better documentation on what is expected when you fetch random invites. Fixes #1830 --- discord/guild.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'discord/guild.py') diff --git a/discord/guild.py b/discord/guild.py index 97247666..7777f0eb 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -83,7 +83,7 @@ class Guild(Hashable): The timeout to get sent to the AFK channel. afk_channel: Optional[:class:`VoiceChannel`] The channel that denotes the AFK channel. None if it doesn't exist. - icon: :class:`str` + icon: Optional[:class:`str`] The guild's icon. id: :class:`int` The guild's ID. @@ -114,7 +114,7 @@ class Guild(Hashable): - ``VERIFIED``: Guild is a "verified" server. - ``MORE_EMOJI``: Guild is allowed to have more than 50 custom emoji. - splash: :class:`str` + splash: Optional[:class:`str`] The guild's invite splash. """ @@ -601,7 +601,7 @@ class Guild(Hashable): channel upon creation. This parameter expects a :class:`dict` of overwrites with the target (either a :class:`Member` or a :class:`Role`) as the key and a :class:`PermissionOverwrite` as the value. - + Note -------- Creating a channel of a specified position will not update the position of @@ -641,7 +641,7 @@ class Guild(Hashable): The permissions will be automatically synced to category if no overwrites are provided. position: :class:`int` - The position in the channel list. This is a number that starts + The position in the channel list. This is a number that starts at 0. e.g. the top channel is position 0. topic: Optional[:class:`str`] The new channel's topic. @@ -679,7 +679,7 @@ class Guild(Hashable): This is similar to :meth:`create_text_channel` except makes a :class:`VoiceChannel` instead, in addition to having the following new parameters. - + Parameters ----------- bitrate: :class:`int` -- cgit v1.2.3