TextChatService now Supports Autocomplete for Emojis and Commands!

Is autocomplete something that only works for suggesting commands/emojis, or is it more customizable than that? It would be nice if I could type :spawn, for example, and then have my own autocompletion code suggest a list of players I can run the command on.

Take the built-in /whisper command as an example: typing /whisper playerDisplayName will enter you into whisper mode with that player. However, if two players in the server share a display name, you simply cannot whisper either of them:

Okay, that seems closer to a bug than just bad UX. But still, if two players have a very similar display name, only differing by 1 final character like so:

  • robloxgamer1

  • robloxgamer2

You still have to to type out the whole name to whisper who you want. That’s annoying. Auto-suggesting the valid matching names would fix both of these problems.

Also, as someone suggested in the Roblox OSS Community Discord, ‘fuzzy searching’ would make autocompletion easier. If I type 2, it should auto-suggest robloxgamer2. Currently, the autocomplete system does not use fuzzy searching:

image

image

As far as I can tell, custom auto-suggest behavior doesn’t exist currently. I would love to see it added.

Also, while we’re on the topic of TextChatCommandwhy are there exactly two aliases allowed (PrimaryAlias and SecondaryAlias)? It should be an any-length array of aliases! And messages should not have to start with the alias in order to trigger the command, that behavior should be customizable as well! Give us a TextChatCommand::Trigger, or else what’s the point of having a built-in command system in the first place if developers just end up building their own separate thing anyway?

2 Likes

Is it possible to replicate the auto-complete so we can use it to auto-complete other things?