Skip to content

Commit d342498

Browse files
style(pre-commit): auto fixes from pre-commit.com hooks
1 parent 8ee94ae commit d342498

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ These changes are available on the `master` branch, but have not yet been releas
5555
([#2714](https://github.com/Pycord-Development/pycord/pull/2714))
5656
- Added the ability to pass a `datetime.time` object to `format_dt`
5757
([#2747](https://github.com/Pycord-Development/pycord/pull/2747))
58-
- Implemented `with_response` for interaction callbacks, adding
58+
- Implemented `with_response` for interaction callbacks, adding
5959
`Interaction.callback.is_loading()` and `Interaction.callback.is_ephemeral()`.
6060
([#2711](https://github.com/Pycord-Development/pycord/pull/2711))
6161

discord/interactions.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"MessageInteraction",
6161
"InteractionMetadata",
6262
"AuthorizingIntegrationOwners",
63-
"InteractionCallback"
63+
"InteractionCallback",
6464
)
6565

6666
if TYPE_CHECKING:
@@ -83,8 +83,8 @@
8383
from .state import ConnectionState
8484
from .threads import Thread
8585
from .types.interactions import Interaction as InteractionPayload
86-
from .types.interactions import InteractionCallbackResponse, InteractionData
8786
from .types.interactions import InteractionCallback as InteractionCallbackPayload
87+
from .types.interactions import InteractionCallbackResponse, InteractionData
8888
from .types.interactions import InteractionMetadata as InteractionMetadataPayload
8989
from .types.interactions import MessageInteraction as MessageInteractionPayload
9090
from .ui.modal import Modal
@@ -1707,15 +1707,19 @@ def guild(self) -> Guild | None:
17071707
class InteractionCallback:
17081708
"""Information about the status of the interaction response.
17091709
1710-
.. versionadded:: 2.7
1711-
"""
1710+
.. versionadded:: 2.7
1711+
"""
1712+
17121713
def __init__(self, data: InteractionCallbackPayload):
1713-
self._response_message_loading: bool = data.get("response_message_loading", False)
1714-
self._response_message_ephemeral: bool = data.get("response_message_ephemeral", False)
1714+
self._response_message_loading: bool = data.get(
1715+
"response_message_loading", False
1716+
)
1717+
self._response_message_ephemeral: bool = data.get(
1718+
"response_message_ephemeral", False
1719+
)
17151720

17161721
def is_loading(self) -> bool:
1717-
"""Indicates whether the response message is in a loading state.
1718-
"""
1722+
"""Indicates whether the response message is in a loading state."""
17191723
return self._response_message_loading
17201724

17211725
def is_ephemeral(self) -> bool:
@@ -1724,4 +1728,3 @@ def is_ephemeral(self) -> bool:
17241728
This might be useful for determining if the message was forced to be ephemeral.
17251729
"""
17261730
return self._response_message_ephemeral
1727-

0 commit comments

Comments
 (0)