54
54
'Interaction' ,
55
55
'InteractionMessage' ,
56
56
'InteractionResponse' ,
57
- 'InteractionCallback ' ,
57
+ 'InteractionCallbackResponse ' ,
58
58
'InteractionCallbackActivityInstance' ,
59
59
)
60
60
@@ -659,7 +659,7 @@ def __init__(self, data: InteractionCallbackActivityPayload) -> None:
659
659
self .id : str = data ['id' ]
660
660
661
661
662
- class InteractionCallback (Generic [ClientT ]):
662
+ class InteractionCallbackResponse (Generic [ClientT ]):
663
663
"""Represents an interaction response callback.
664
664
665
665
.. versionadded:: 2.5
@@ -776,7 +776,7 @@ async def defer(
776
776
* ,
777
777
ephemeral : bool = False ,
778
778
thinking : bool = False ,
779
- ) -> Optional [InteractionCallback [ClientT ]]:
779
+ ) -> Optional [InteractionCallbackResponse [ClientT ]]:
780
780
"""|coro|
781
781
782
782
Defers the interaction response.
@@ -791,7 +791,7 @@ async def defer(
791
791
- :attr:`InteractionType.modal_submit`
792
792
793
793
.. versionchanged:: 2.5
794
- This now returns a :class:`InteractionCallback ` instance.
794
+ This now returns a :class:`InteractionCallbackResponse ` instance.
795
795
796
796
Parameters
797
797
-----------
@@ -814,7 +814,7 @@ async def defer(
814
814
815
815
Returns
816
816
-------
817
- Optional[:class:`InteractionCallback `]
817
+ Optional[:class:`InteractionCallbackResponse `]
818
818
The interaction callback resource, or ``None``.
819
819
"""
820
820
if self ._response_type :
@@ -849,7 +849,7 @@ async def defer(
849
849
params = params ,
850
850
)
851
851
self ._response_type = InteractionResponseType (defer_type )
852
- return InteractionCallback (
852
+ return InteractionCallbackResponse (
853
853
data = response ,
854
854
parent = self ._parent ,
855
855
state = self ._parent ._state ,
@@ -904,13 +904,13 @@ async def send_message(
904
904
silent : bool = False ,
905
905
delete_after : Optional [float ] = None ,
906
906
poll : Poll = MISSING ,
907
- ) -> InteractionCallback [ClientT ]:
907
+ ) -> InteractionCallbackResponse [ClientT ]:
908
908
"""|coro|
909
909
910
910
Responds to this interaction by sending a message.
911
911
912
912
.. versionchanged:: 2.5
913
- This now returns a :class:`InteractionCallback ` instance.
913
+ This now returns a :class:`InteractionCallbackResponse ` instance.
914
914
915
915
Parameters
916
916
-----------
@@ -968,7 +968,7 @@ async def send_message(
968
968
969
969
Returns
970
970
-------
971
- :class:`InteractionCallback `
971
+ :class:`InteractionCallbackResponse `
972
972
The interaction callback data.
973
973
"""
974
974
if self ._response_type :
@@ -1031,7 +1031,7 @@ async def inner_call(delay: float = delete_after):
1031
1031
1032
1032
asyncio .create_task (inner_call ())
1033
1033
1034
- return InteractionCallback (
1034
+ return InteractionCallbackResponse (
1035
1035
data = response ,
1036
1036
parent = self ._parent ,
1037
1037
state = self ._parent ._state ,
@@ -1049,14 +1049,14 @@ async def edit_message(
1049
1049
allowed_mentions : Optional [AllowedMentions ] = MISSING ,
1050
1050
delete_after : Optional [float ] = None ,
1051
1051
suppress_embeds : bool = MISSING ,
1052
- ) -> Optional [InteractionCallback [ClientT ]]:
1052
+ ) -> Optional [InteractionCallbackResponse [ClientT ]]:
1053
1053
"""|coro|
1054
1054
1055
1055
Responds to this interaction by editing the original message of
1056
1056
a component or modal interaction.
1057
1057
1058
1058
.. versionchanged:: 2.5
1059
- This now returns a :class:`InteractionCallback ` instance.
1059
+ This now returns a :class:`InteractionCallbackResponse ` instance.
1060
1060
1061
1061
Parameters
1062
1062
-----------
@@ -1106,7 +1106,7 @@ async def edit_message(
1106
1106
1107
1107
Returns
1108
1108
-------
1109
- Optional[:class:`InteractionCallback `]
1109
+ Optional[:class:`InteractionCallbackResponse `]
1110
1110
The interaction callback data, or ``None`` if editing the message was not possible.
1111
1111
"""
1112
1112
if self ._response_type :
@@ -1175,20 +1175,20 @@ async def inner_call(delay: float = delete_after):
1175
1175
1176
1176
asyncio .create_task (inner_call ())
1177
1177
1178
- return InteractionCallback (
1178
+ return InteractionCallbackResponse (
1179
1179
data = response ,
1180
1180
parent = self ._parent ,
1181
1181
state = self ._parent ._state ,
1182
1182
type = self ._response_type ,
1183
1183
)
1184
1184
1185
- async def send_modal (self , modal : Modal , / ) -> InteractionCallback [ClientT ]:
1185
+ async def send_modal (self , modal : Modal , / ) -> InteractionCallbackResponse [ClientT ]:
1186
1186
"""|coro|
1187
1187
1188
1188
Responds to this interaction by sending a modal.
1189
1189
1190
1190
.. versionchanged:: 2.5
1191
- This now returns a :class:`InteractionCallback ` instance.
1191
+ This now returns a :class:`InteractionCallbackResponse ` instance.
1192
1192
1193
1193
Parameters
1194
1194
-----------
@@ -1208,7 +1208,7 @@ async def send_modal(self, modal: Modal, /) -> InteractionCallback[ClientT]:
1208
1208
1209
1209
Returns
1210
1210
-------
1211
- :class:`InteractionCallback `
1211
+ :class:`InteractionCallbackResponse `
1212
1212
The interaction callback data.
1213
1213
"""
1214
1214
if self ._response_type :
@@ -1232,7 +1232,7 @@ async def send_modal(self, modal: Modal, /) -> InteractionCallback[ClientT]:
1232
1232
self ._parent ._state .store_view (modal )
1233
1233
self ._response_type = InteractionResponseType .modal
1234
1234
1235
- return InteractionCallback (
1235
+ return InteractionCallbackResponse (
1236
1236
data = response ,
1237
1237
parent = self ._parent ,
1238
1238
state = self ._parent ._state ,
0 commit comments