mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-06 20:07:17 +00:00
Fix typing errors in Guild.audit_logs
This commit is contained in:
parent
f2600995e8
commit
c406951532
@ -2759,10 +2759,10 @@ class Guild(Hashable):
|
|||||||
async def audit_logs(
|
async def audit_logs(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
limit: int = 100,
|
limit: Optional[int] = 100,
|
||||||
before: Optional[SnowflakeTime] = None,
|
before: SnowflakeTime = MISSING,
|
||||||
after: Optional[SnowflakeTime] = None,
|
after: SnowflakeTime = MISSING,
|
||||||
oldest_first: Optional[bool] = None,
|
oldest_first: bool = MISSING,
|
||||||
user: Snowflake = MISSING,
|
user: Snowflake = MISSING,
|
||||||
action: AuditLogAction = MISSING,
|
action: AuditLogAction = MISSING,
|
||||||
) -> AsyncIterator[AuditLogEntry]:
|
) -> AsyncIterator[AuditLogEntry]:
|
||||||
@ -2853,7 +2853,7 @@ class Guild(Hashable):
|
|||||||
|
|
||||||
return data.get('users', []), entries, after, limit
|
return data.get('users', []), entries, after, limit
|
||||||
|
|
||||||
if user is not None:
|
if user is not MISSING:
|
||||||
user_id = user.id
|
user_id = user.id
|
||||||
else:
|
else:
|
||||||
user_id = None
|
user_id = None
|
||||||
@ -2866,7 +2866,7 @@ class Guild(Hashable):
|
|||||||
if isinstance(after, datetime.datetime):
|
if isinstance(after, datetime.datetime):
|
||||||
after = Object(id=utils.time_snowflake(after, high=True))
|
after = Object(id=utils.time_snowflake(after, high=True))
|
||||||
|
|
||||||
if oldest_first is None:
|
if oldest_first is MISSING:
|
||||||
reverse = after is not None
|
reverse = after is not None
|
||||||
else:
|
else:
|
||||||
reverse = oldest_first
|
reverse = oldest_first
|
||||||
|
Loading…
x
Reference in New Issue
Block a user