Skip to content

Commit 21ff691

Browse files
authored
fix: location of select values when dispatching for new select types (#1124)
1 parent 5c3c5d7 commit 21ff691

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

interactions/api/gateway/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,13 @@ def _dispatch_event(self, event: str, data: dict) -> None:
382382
if _context.data.component_type.value not in {5, 6, 7, 8}:
383383
__args.append(_context.data.values)
384384
else:
385+
_list = [] # temp storage for items
385386
for value in _context.data._json.get("values"):
386387
_data = self.__select_option_type_context(
387388
_context, _context.data.component_type.value
388389
) # resolved.
389-
__args.append(_data[value])
390+
_list.append(_data[value])
391+
__args.append(_list)
390392

391393
self._dispatch.dispatch("on_component", _context)
392394
elif data["type"] == InteractionType.APPLICATION_COMMAND_AUTOCOMPLETE:

0 commit comments

Comments
 (0)