Skip to content

Commit b5aef72

Browse files
committed
Rename InteractionCallback to InteractionCallbackResponse
1 parent 776fc22 commit b5aef72

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

discord/interactions.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
'Interaction',
5555
'InteractionMessage',
5656
'InteractionResponse',
57-
'InteractionCallback',
57+
'InteractionCallbackResponse',
5858
'InteractionCallbackActivityInstance',
5959
)
6060

@@ -659,7 +659,7 @@ def __init__(self, data: InteractionCallbackActivityPayload) -> None:
659659
self.id: str = data['id']
660660

661661

662-
class InteractionCallback(Generic[ClientT]):
662+
class InteractionCallbackResponse(Generic[ClientT]):
663663
"""Represents an interaction response callback.
664664
665665
.. versionadded:: 2.5
@@ -776,7 +776,7 @@ async def defer(
776776
*,
777777
ephemeral: bool = False,
778778
thinking: bool = False,
779-
) -> Optional[InteractionCallback[ClientT]]:
779+
) -> Optional[InteractionCallbackResponse[ClientT]]:
780780
"""|coro|
781781
782782
Defers the interaction response.
@@ -849,7 +849,7 @@ async def defer(
849849
params=params,
850850
)
851851
self._response_type = InteractionResponseType(defer_type)
852-
return InteractionCallback(
852+
return InteractionCallbackResponse(
853853
data=response,
854854
parent=self._parent,
855855
state=self._parent._state,
@@ -904,7 +904,7 @@ async def send_message(
904904
silent: bool = False,
905905
delete_after: Optional[float] = None,
906906
poll: Poll = MISSING,
907-
) -> InteractionCallback[ClientT]:
907+
) -> InteractionCallbackResponse[ClientT]:
908908
"""|coro|
909909
910910
Responds to this interaction by sending a message.
@@ -1031,7 +1031,7 @@ async def inner_call(delay: float = delete_after):
10311031

10321032
asyncio.create_task(inner_call())
10331033

1034-
return InteractionCallback(
1034+
return InteractionCallbackResponse(
10351035
data=response,
10361036
parent=self._parent,
10371037
state=self._parent._state,
@@ -1049,7 +1049,7 @@ async def edit_message(
10491049
allowed_mentions: Optional[AllowedMentions] = MISSING,
10501050
delete_after: Optional[float] = None,
10511051
suppress_embeds: bool = MISSING,
1052-
) -> Optional[InteractionCallback[ClientT]]:
1052+
) -> Optional[InteractionCallbackResponse[ClientT]]:
10531053
"""|coro|
10541054
10551055
Responds to this interaction by editing the original message of
@@ -1175,14 +1175,14 @@ async def inner_call(delay: float = delete_after):
11751175

11761176
asyncio.create_task(inner_call())
11771177

1178-
return InteractionCallback(
1178+
return InteractionCallbackResponse(
11791179
data=response,
11801180
parent=self._parent,
11811181
state=self._parent._state,
11821182
type=self._response_type,
11831183
)
11841184

1185-
async def send_modal(self, modal: Modal, /) -> InteractionCallback[ClientT]:
1185+
async def send_modal(self, modal: Modal, /) -> InteractionCallbackResponse[ClientT]:
11861186
"""|coro|
11871187
11881188
Responds to this interaction by sending a modal.
@@ -1232,7 +1232,7 @@ async def send_modal(self, modal: Modal, /) -> InteractionCallback[ClientT]:
12321232
self._parent._state.store_view(modal)
12331233
self._response_type = InteractionResponseType.modal
12341234

1235-
return InteractionCallback(
1235+
return InteractionCallbackResponse(
12361236
data=response,
12371237
parent=self._parent,
12381238
state=self._parent._state,

docs/interactions/api.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ InteractionResponse
2828
.. autoclass:: InteractionResponse()
2929
:members:
3030

31-
InteractionCallback
32-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
InteractionCallbackResponse
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3333

34-
.. attributetable:: InteractionCallback
34+
.. attributetable:: InteractionCallbackResponse
3535

36-
.. autoclass:: InteractionCallback()
36+
.. autoclass:: InteractionCallbackResponse()
3737
:members:
3838

3939
InteractionCallbackActivityInstance

0 commit comments

Comments
 (0)