Skip to content

Commit 748c7a4

Browse files
authored
Dispatch unknown_command when command doesnt exist
1 parent 06cfbf1 commit 748c7a4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

discord/bot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ async def handle_interaction(self, interaction: Interaction) -> None:
247247
try:
248248
command = self.app_commands[interaction.data["id"]]
249249
except KeyError:
250-
print(f"Received unknown application command: {interaction.data}")
251-
await interaction.response.send_message("I didn't recognize that command")
250+
self.dispatch("unknown_command", interaction)
252251
else:
253252
await command.invoke(interaction)
254253

0 commit comments

Comments
 (0)