I’ve been playing around with and making custom chat systems for over 10 years now, but ROBLOX seems to change the chat every once in a while and it’s a little annoying.
Previously, I would use GetChatForUserAsync() via TextService, but now the Create Hub says it’s deprecated and says to use TextChatService instead. However, I cannot see an equivalent under TextChatService.
If possible, how do I filter messages for my custom chat?
I’m getting player messages now via .MessageReceived from TextChatService instead of using Player.Chatted like I used to. Is the result I get from .MessageReceived automatically filtered?
My main concern is my game getting moderated because I failed to comply to ROBLOX’s current policies and guidelines because I did not make and/or filter my custom chat correctly.
FilterStringAsyncseems to be the way to filter strings as of now. The documentation does not say it is deprecated so I see no reason to not use this.
TextService is not deprecated (or at least, the documentation makes no mention if it is) and is the preferred service. Chat, which was the old service, is deprecated and the documentation reflects this.
I meant GetChatForUserAsync() is deprecated, not TextService itself. If you read about that specific method, it says on the create hub to use TextChatService instead when filtering messages for chat. Unfortunately, I cannot find an equivalent method under TextChatService
Ok, so my game shouldn’t be moderated if I just get player messages via TextChatService? In that case, I think some parts of the Create Hub need to be updated or made more clear, since I believe what you just said isn’t clearly written anywhere on there.
TextService:FilterStringAsync will not be deprecated in part of TextChatService’s automatic message filtration. Other forms of user-generated text still require manual filtration, such as naming pets, configuring billboards, sending notes alongside gifts, and more.
FilterStringAsync returns a TextFilterResult, which developers use to extract the appropriately filtered text. This is where you will find the properly deprecated API member and its formal succession by TextChatService: