aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNCPlayz <[email protected]>2019-03-22 21:43:04 +0000
committerRapptz <[email protected]>2019-03-22 20:25:03 -0400
commita1caaf8dcfff63aa3254f9e445044a221d06c856 (patch)
treee1822706738587ab292f6358dc01724a6bfecbd4
parentFix documentation for Channel.last_message (diff)
downloaddiscord.py-a1caaf8dcfff63aa3254f9e445044a221d06c856.tar.xz
discord.py-a1caaf8dcfff63aa3254f9e445044a221d06c856.zip
Add Guild.max_presences and Guild.max_members
Fixes #1822 Fixes #1418
-rw-r--r--discord/guild.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 9e7f1796..0019494c 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -96,6 +96,10 @@ class Guild(Hashable):
all be None. It is best to not do anything with the guild if it is unavailable.
Check the :func:`on_guild_unavailable` and :func:`on_guild_available` events.
+ max_presences: Optional[:class:`int`]
+ The maximum amount of presences for the guild.
+ max_members: Optional[:class:`int`]
+ The maximum amount of members for the guild.
banner: Optional[:class:`str`]
The guild's banner.
description: Optional[:class:`str`]
@@ -129,7 +133,7 @@ class Guild(Hashable):
'owner_id', 'mfa_level', 'emojis', 'features',
'verification_level', 'explicit_content_filter', 'splash',
'_voice_states', '_system_channel_id', 'default_notifications',
- 'description')
+ 'description', 'max_presences', 'max_members')
def __init__(self, *, data, state):
self._channels = {}
@@ -232,6 +236,8 @@ class Guild(Hashable):
self.splash = guild.get('splash')
self._system_channel_id = utils._get_as_snowflake(guild, 'system_channel_id')
self.description = guild.get('description')
+ self.max_presences = guild.get('max_presences')
+ self.max_members = guild.get('max_members')
for mdata in guild.get('members', []):
member = Member(data=mdata, guild=self, state=state)