mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 18:33:02 +00:00
Add missing generic parameters on various Interaction parameters
This commit is contained in:
@ -27,6 +27,7 @@ from __future__ import annotations
|
||||
from typing import Any, Callable, Coroutine, Dict, Generic, Optional, TYPE_CHECKING, Tuple, Type, TypeVar
|
||||
|
||||
from ..interactions import Interaction
|
||||
from .._types import ClientT
|
||||
|
||||
# fmt: off
|
||||
__all__ = (
|
||||
@ -119,7 +120,7 @@ class Item(Generic[V]):
|
||||
"""Optional[:class:`View`]: The underlying view for this item."""
|
||||
return self._view
|
||||
|
||||
async def callback(self, interaction: Interaction) -> Any:
|
||||
async def callback(self, interaction: Interaction[ClientT]) -> Any:
|
||||
"""|coro|
|
||||
|
||||
The callback associated with this UI item.
|
||||
|
@ -31,6 +31,7 @@ from copy import deepcopy
|
||||
from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, ClassVar, List
|
||||
|
||||
from ..utils import MISSING, find
|
||||
from .._types import ClientT
|
||||
from .item import Item
|
||||
from .view import View
|
||||
|
||||
@ -134,7 +135,7 @@ class Modal(View):
|
||||
|
||||
super().__init__(timeout=timeout)
|
||||
|
||||
async def on_submit(self, interaction: Interaction, /) -> None:
|
||||
async def on_submit(self, interaction: Interaction[ClientT], /) -> None:
|
||||
"""|coro|
|
||||
|
||||
Called when the modal is submitted.
|
||||
@ -146,7 +147,7 @@ class Modal(View):
|
||||
"""
|
||||
pass
|
||||
|
||||
async def on_error(self, interaction: Interaction, error: Exception, /) -> None:
|
||||
async def on_error(self, interaction: Interaction[ClientT], error: Exception, /) -> None:
|
||||
"""|coro|
|
||||
|
||||
A callback that is called when :meth:`on_submit`
|
||||
|
Reference in New Issue
Block a user