mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 17:36:15 +00:00
Reformat code using black
Segments where readability was hampered were fixed by appropriate format skipping directives. New code should hopefully be black compatible. The moment they remove the -S option is probably the moment I stop using black though.
This commit is contained in:
@ -767,13 +767,15 @@ class Member(discord.abc.Messageable, _UserTag):
|
||||
|
||||
if roles is not MISSING:
|
||||
payload['roles'] = tuple(r.id for r in roles)
|
||||
|
||||
|
||||
if timed_out_until is not MISSING:
|
||||
if timed_out_until is None:
|
||||
payload['communication_disabled_until'] = None
|
||||
else:
|
||||
if timed_out_until.tzinfo is None:
|
||||
raise TypeError('timed_out_until must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.')
|
||||
raise TypeError(
|
||||
'timed_out_until must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'
|
||||
)
|
||||
payload['communication_disabled_until'] = timed_out_until.isoformat()
|
||||
|
||||
if payload:
|
||||
@ -940,7 +942,7 @@ class Member(discord.abc.Messageable, _UserTag):
|
||||
"""Returns whether this member is timed out.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
|
||||
|
||||
Returns
|
||||
--------
|
||||
:class:`bool`
|
||||
|
Reference in New Issue
Block a user