We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fb34ce commit 87106d5Copy full SHA for 87106d5
discord_slash/context.py
@@ -86,6 +86,8 @@ async def defer(self, hidden: bool = False):
86
87
:param hidden: Whether the deffered response should be ephemeral . Default ``False``.
88
"""
89
+ if self._deffered or self._sent:
90
+ raise error.AlreadyResponded("You have already responded to this command!")
91
base = {"type": 5}
92
if hidden:
93
base["data"] = {"flags": 64}
discord_slash/error.py
@@ -54,3 +54,8 @@ class IncorrectType(SlashCommandError):
54
55
Type passed was incorrect
56
57
+
58
+class AlreadyResponded(SlashCommandError):
59
+ """
60
+ The interaction was already responded to
61
0 commit comments