Skip to content

Commit e90f253

Browse files
committed
Fix #190 - exceptions on button interactions
1 parent 83c009b commit e90f253

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord_slash/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,9 @@ async def on_socket_response(self, msg):
887887

888888
to_use = msg["d"]
889889

890+
if to_use["type"] not in (1, 2):
891+
return # to only process ack and slash-commands and exclude other interactions like buttons
892+
890893
if to_use["data"]["name"] in self.commands:
891894

892895
ctx = context.SlashContext(self.req, to_use, self._discord, self.logger)

0 commit comments

Comments
 (0)