-
Hi, I would like to add autocompletion features on slashed command. Here interaction task : But I have this error : When I run the application (Without the line with error), the Data property is ok : What is the problem ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The first issue is, you're trying to get the object Secondly, that's not how you'd get the Command Name from an autocomplete. What you want to do is cast the As |
Beta Was this translation helpful? Give feedback.
-
First ... You're write for the object name : Bad simplification for the screenshot ^^ And so, I tried to cast into SocketAutocompleteInteractionData, but, if the code is OK for the parser ... At execution, I have an exception : With hard cast : With "as" function : |
Beta Was this translation helpful? Give feedback.
Ah my bad, try casting
interaction
to aSocketAutocompleteInteraction
instead,Data
will be auto converted