File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,11 @@ async def on_socket_response(res):
5757 if (res ["t" ] != "INTERACTION_CREATE" ) or (res ["d" ]["type" ] != 3 ):
5858 return
5959
60- if ("message_reference" in res ["d" ]["message" ]) and (not "channel_id" in res ["d" ]["message" ]["message_reference" ]):
60+ if ("message_reference" in res ["d" ]["message" ]) and (
61+ not "channel_id" in res ["d" ]["message" ]["message_reference" ]
62+ ):
6163 res ["d" ]["message" ]["message_reference" ]["channel_id" ] = res ["d" ]["channel_id" ]
62-
64+
6365 for key , value in InteractionEventType .items ():
6466 if value == res ["d" ]["data" ]["component_type" ]:
6567 self .bot .dispatch (f"raw_{ key } " , res ["d" ])
@@ -307,6 +309,10 @@ async def _get_interaction(self, json: dict):
307309 if len (data ["component" ]["values" ]) > 0 :
308310 for value in data ["component" ]["values" ]:
309311 rescomponent .append (SelectOption .from_json ({"value" : value }))
312+
313+ data ["component" ]["options" ] = list (
314+ map (lambda x : {"value" : x }, data ["component" ]["values" ])
315+ )
310316 parentcomponent = Select .from_json (data ["component" ])
311317
312318 ctx = Interaction (
You can’t perform that action at this time.
0 commit comments