conflict fixes

This commit is contained in:
iDutchy
2021-01-14 18:03:09 -06:00
39 changed files with 1181 additions and 184 deletions

View File

@@ -157,13 +157,17 @@ class Member(discord.abc.Messageable, _BaseUser):
The guild that the member belongs to.
nick: Optional[:class:`str`]
The guild specific nickname of the user.
pending: :class:`bool`
Whether the member is pending member verification.
.. versionadded:: 1.6
premium_since: Optional[:class:`datetime.datetime`]
A datetime object that specifies the date and time in UTC when the member used their
Nitro boost on the guild, if available. This could be ``None``.
"""
__slots__ = ('_roles', 'joined_at', 'premium_since', '_client_status',
'activities', 'guild', 'nick', '_user', '_state')
'activities', 'guild', 'pending', 'nick', '_user', '_state')
def __init__(self, *, data, guild, state):
self._state = state
@@ -177,6 +181,7 @@ class Member(discord.abc.Messageable, _BaseUser):
}
self.activities = tuple(map(create_activity, data.get('activities', [])))
self.nick = data.get('nick', None)
self.pending = data.get('pending', False)
def __str__(self):
return str(self._user)
@@ -208,6 +213,7 @@ class Member(discord.abc.Messageable, _BaseUser):
self.premium_since = utils.parse_time(data.get('premium_since'))
self._update_roles(data)
self.nick = data.get('nick', None)
self.pending = data.get('pending', False)
@classmethod
def _try_upgrade(cls, *, data, guild, state):
@@ -241,6 +247,7 @@ class Member(discord.abc.Messageable, _BaseUser):
self._client_status = member._client_status.copy()
self.guild = member.guild
self.nick = member.nick
self.pending = member.pending
self.activities = member.activities
self._state = member._state
@@ -264,6 +271,11 @@ class Member(discord.abc.Messageable, _BaseUser):
except KeyError:
pass
try:
self.pending = data['pending']
except KeyError:
pass
self.premium_since = utils.parse_time(data.get('premium_since'))
self._update_roles(data)
@@ -634,7 +646,8 @@ class Member(discord.abc.Messageable, _BaseUser):
Gives the member a number of :class:`Role`\s.
You must have the :attr:`~Permissions.manage_roles` permission to
use this.
use this, and the added :class:`Role`\s must appear lower in the list
of roles than the highest role of the member.
Parameters
-----------
@@ -672,7 +685,8 @@ class Member(discord.abc.Messageable, _BaseUser):
Removes :class:`Role`\s from this member.
You must have the :attr:`~Permissions.manage_roles` permission to
use this.
use this, and the removed :class:`Role`\s must appear lower in the list
of roles than the highest role of the member.
Parameters
-----------