mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Update pyright version
This commit is contained in:
@ -132,6 +132,7 @@ if TYPE_CHECKING:
|
||||
from .types.integration import IntegrationType
|
||||
from .types.snowflake import SnowflakeList
|
||||
from .types.widget import EditWidgetSettings
|
||||
from .types.audit_log import AuditLogEvent
|
||||
from .message import EmojiInputType
|
||||
|
||||
VocalGuildChannel = Union[VoiceChannel, StageChannel]
|
||||
@ -3853,7 +3854,7 @@ class Guild(Hashable):
|
||||
async def _before_strategy(retrieve: int, before: Optional[Snowflake], limit: Optional[int]):
|
||||
before_id = before.id if before else None
|
||||
data = await self._state.http.get_audit_logs(
|
||||
self.id, limit=retrieve, user_id=user_id, action_type=action, before=before_id
|
||||
self.id, limit=retrieve, user_id=user_id, action_type=action_type, before=before_id
|
||||
)
|
||||
|
||||
entries = data.get('audit_log_entries', [])
|
||||
@ -3869,7 +3870,7 @@ class Guild(Hashable):
|
||||
async def _after_strategy(retrieve: int, after: Optional[Snowflake], limit: Optional[int]):
|
||||
after_id = after.id if after else None
|
||||
data = await self._state.http.get_audit_logs(
|
||||
self.id, limit=retrieve, user_id=user_id, action_type=action, after=after_id
|
||||
self.id, limit=retrieve, user_id=user_id, action_type=action_type, after=after_id
|
||||
)
|
||||
|
||||
entries = data.get('audit_log_entries', [])
|
||||
@ -3887,8 +3888,10 @@ class Guild(Hashable):
|
||||
else:
|
||||
user_id = None
|
||||
|
||||
if action:
|
||||
action = action.value
|
||||
if action is not MISSING:
|
||||
action_type: Optional[AuditLogEvent] = action.value
|
||||
else:
|
||||
action_type = None
|
||||
|
||||
if isinstance(before, datetime.datetime):
|
||||
before = Object(id=utils.time_snowflake(before, high=False))
|
||||
|
Reference in New Issue
Block a user