mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-25 02:23:04 +00:00
Update to pyright 1.1.242
This commit is contained in:
@@ -711,12 +711,8 @@ class Command(Generic[GroupT, P, T]):
|
||||
return False
|
||||
|
||||
if self.binding is not None:
|
||||
try:
|
||||
# Type checker does not like runtime attribute retrieval
|
||||
check: Check = self.binding.interaction_check # type: ignore
|
||||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
check: Optional[Check] = getattr(self.binding, 'interaction_check', None)
|
||||
if check:
|
||||
ret = await maybe_coroutine(check, interaction)
|
||||
if not ret:
|
||||
return False
|
||||
|
||||
@@ -1004,7 +1004,8 @@ class CommandTree(Generic[ClientT]):
|
||||
|
||||
resolved = Namespace._get_resolved_items(interaction, data.get('resolved', {}))
|
||||
|
||||
target_id = data.get('target_id')
|
||||
# This is annotated as str | int but realistically this will always be str
|
||||
target_id: Optional[Union[str, int]] = data.get('target_id')
|
||||
# Right now, the only types are message and user
|
||||
# Therefore, there's no conflict with snowflakes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user