A search-based command needs an autocomplete for a user to reference the results, and the user can use that result for a command option.
Using autocomplete function
autocomplete function lets you specify the data to display to the user, while the command handler will take care of the results returned by the function.
Let's create a new sample Slash command called device, which asks the user what device they are using, and return a message with what they selected.