TextChatService¶
A service handling in-experience text chat.
Not implemented yet
The modern chat UI is a work item. Age-segregated chat is intentionally not planned; legacy chat and bubble chat remain supported.
Workaround: Use the legacy Chat service / bubble chat, or build a custom chat UI.
Description¶
A service handling in-experience text chat, including managing TextChannels, decorating messages, filtering text, creating TextChatCommands, and developing custom chats interfaces. To learn more, see text chat overview.
For further customization, TextChatService has the following singleton
children:
To display content from a TextChannel in a custom location, place a TextChannelWindow under a ScreenGui or SurfaceGui.
Inheritance¶
Object → Instance → TextChatService
Properties¶
| Member | Signature | Summary |
|---|---|---|
ChatTranslationEnabled |
ChatTranslationEnabled: bool |
Determines whether a user has chat translation enabled. |
ChatTranslationFTUXShown |
ChatTranslationFTUXShown: bool |
— |
ChatTranslationToggleEnabled |
ChatTranslationToggleEnabled: bool |
— |
ChatVersion |
ChatVersion: ChatVersion |
Determines whether to fully enable TextChatService or revert to the legacy chat system. |
CreateDefaultCommands |
CreateDefaultCommands: bool |
Determines whether TextChatService should create default TextChatCommands. |
CreateDefaultTextChannels |
CreateDefaultTextChannels: bool |
Determines whether TextChatService should create default TextChannels. |
HasSeenDeprecationDialog |
HasSeenDeprecationDialog: bool |
— |
IsLegacyChatDisabled |
IsLegacyChatDisabled: bool |
— |
PlatformIntegratedChat |
PlatformIntegratedChat: RolloutState |
Determines whether platform-integrated chat is enabled for the experience. Requires RobloxScript security. |
Methods¶
| Member | Signature | Summary |
|---|---|---|
CanUserChatAsync |
TextChatService:CanUserChatAsync(userId: User): bool |
Determines whether a user has permission to chat in experiences. |
CanUsersChatAsync |
TextChatService:CanUsersChatAsync(userIdFrom: User, userIdTo: User): bool |
Determines whether or not two users can receive messages from each other. |
CanUsersDirectChatAsync |
TextChatService:CanUsersDirectChatAsync(requesterUserId: User, userIds: Array): Array |
Determines whether a user has permission to chat directly with other users in experiences based on factors such as their parental control settings. |
CanUsersWhisperAsync |
TextChatService:CanUsersWhisperAsync(fromUserId: User, toUserId: User): bool |
— |
DisplayBubble |
TextChatService:DisplayBubble(partOrCharacter: Instance, message: string): null |
Displays a chat bubble above the provided part or player character. |
GetChatableUserCountAsync |
TextChatService:GetChatableUserCountAsync(userId: User, context: string): int |
— |
GetChatGroupsAsync |
TextChatService:GetChatGroupsAsync(players: Instances): Array |
Returns chat group IDs that indicate which players can synchronously text chat together. |
GetPresetsAsync |
TextChatService:GetPresetsAsync(): Dictionary |
— |
GetTextChannelWindows |
TextChatService:GetTextChannelWindows(): Array |
— |
HasAllocatedUniverseChatContext |
TextChatService:HasAllocatedUniverseChatContext(context: string): bool |
— |
IsProtectedChatEnabled |
TextChatService:IsProtectedChatEnabled(): bool |
— |
OnUserChatSettingUpdateAsync |
TextChatService:OnUserChatSettingUpdateAsync(featureName: string, featureValue: string): bool |
— |
SendDictatedSpeechUniverseChatAsync |
TextChatService:SendDictatedSpeechUniverseChatAsync(text: string): TextChatMessage |
— |
SendEnableChatButtonClicked |
TextChatService:SendEnableChatButtonClicked(): null |
— |
SendEnableChatButtonShown |
TextChatService:SendEnableChatButtonShown(): null |
— |
SendExpChatLoadSuccess |
TextChatService:SendExpChatLoadSuccess(loadingLatency: int, extras: Dictionary?, chatWindowType: string, textChannelWindowName: string): null |
— |
SendExpChatMessageClientRendered |
TextChatService:SendExpChatMessageClientRendered(textChatMessage: TextChatMessage, messageRenderedSurface: string = unknown, selectedChannelTab: int64 = -1, textChannelWindowName: string): null |
— |
SendExpChatWindowScroll |
TextChatService:SendExpChatWindowScroll(chatWindowType: string, textChannelWindowName: string): null |
— |
SendExpChatWindowStatusChange |
TextChatService:SendExpChatWindowStatusChange(timeClosed: int, timeOpen: int, timeBackgroundIdle: int, timeTextIdle: int, chatWindowType: string, textChannelWindowName: string): null |
— |
SendTextChatCommandClientSent |
TextChatService:SendTextChatCommandClientSent(textChatCommandName: string, chatWindowType: string, textChannelWindowName: string): null |
— |
SendUniverseChatMessageAsync |
TextChatService:SendUniverseChatMessageAsync(text: string, metadata: string): TextChatMessage |
— |
SendUniverseChatPresetAsync |
TextChatService:SendUniverseChatPresetAsync(presetId: string): TextChatMessage |
— |
setModerationModeEnabled |
TextChatService:setModerationModeEnabled(userId: int64, enabled: bool): bool |
— |
Events¶
| Member | Signature | Summary |
|---|---|---|
BubbleDisplayed |
BubbleDisplayed(partOrCharacter: Instance, textChatMessage: TextChatMessage) |
Fires when TextChatService.DisplayBubble() is called. |
ChatActionReceived |
ChatActionReceived(chatActionMessage: TextChatMessage) |
— |
ClientToServerChatableUserCountRequestSignal |
ClientToServerChatableUserCountRequestSignal(requestId: string) |
— |
ClientToServerMessageReplicateSignalV2 |
ClientToServerMessageReplicateSignalV2(text: string, metadata: string, messageId: string, textSource: TextSource, textChannel: TextChannel) |
— |
ClientToServerMessageReplicateSignalV3 |
ClientToServerMessageReplicateSignalV3(text: string, metadata: string, messageId: string, textSource: TextSource, textChannel: TextChannel, verified: bool, isEscapedFlagEnabled: bool) |
— |
ClientToServerMessageReplicateSignalV4 |
ClientToServerMessageReplicateSignalV4(text: string, metadata: string, messageId: string, textSource: TextSource, textChannel: TextChannel, verified: bool, isEscapedFlagEnabled: bool, presetId: string, presetChatVersion: string) |
— |
ClientToServerUniverseChatMessageSignalV1 |
ClientToServerUniverseChatMessageSignalV1(text: string, metadata: string, messageId: string, userId: int64, verified: bool) |
— |
ClientToServerUniverseChatMessageSignalV2 |
ClientToServerUniverseChatMessageSignalV2(text: string, metadata: string, messageId: string, userId: int64, verified: bool, presetId: string, presetChatVersion: string) |
— |
ExpChatFeatureValueChanged |
ExpChatFeatureValueChanged(userId: int64, featureName: string, featureValue: string) |
— |
MessageReceived |
MessageReceived(textChatMessage: TextChatMessage) |
Fires when TextChannel.DisplaySystemMessage() is invoked on the client, or when the client receives a valid [TextChannel.SendAsync… |
OnIncomingMessageEvent |
OnIncomingMessageEvent(textChatMessage: TextChatMessage) |
— |
OnUserChatSettingUpdateServer |
OnUserChatSettingUpdateServer(featureName: string) |
— |
SendingMessage |
SendingMessage(textChatMessage: TextChatMessage) |
Fires when TextChannel.SendAsync() is called by the sending client. |
SendingUniverseChatMessage |
SendingUniverseChatMessage(textChatMessage: TextChatMessage) |
— |
ServerToClientChatableUserCountResponseSignal |
ServerToClientChatableUserCountResponseSignal(count: int, requestId: string) |
— |
ServerToClientChatActionReplicateSignal |
ServerToClientChatActionReplicateSignal(data: Dictionary) |
— |
ServerToClientMessageReplicateSignal |
ServerToClientMessageReplicateSignal(text: string, prefixText: string, metadata: string, messageId: string, textSource: TextSource, textChannel: TextChannel, timestamp: int64, status: TextChatMessageStatus) |
— |
ServerToClientMessageReplicateSignalV2 |
ServerToClientMessageReplicateSignalV2(data: Dictionary) |
— |
ServerToClientPresetChatConfigChangedSignal |
ServerToClientPresetChatConfigChangedSignal(enabled: bool, version: string) |
— |
ServerToClientPresetChatUserAccessChangedSignal |
ServerToClientPresetChatUserAccessChangedSignal(accessLevel: string) |
— |
ServerToClientUniverseChatChannelAllocatedSignalV1 |
ServerToClientUniverseChatChannelAllocatedSignalV1(context: string) |
— |
ServerToClientUniverseChatMessageSignalV1 |
ServerToClientUniverseChatMessageSignalV1(data: Dictionary) |
— |
TextChannelWindowAdded |
TextChannelWindowAdded(textChannelWindow: TextChannelWindow) |
— |
TextChannelWindowRemoved |
TextChannelWindowRemoved(textChannelWindow: TextChannelWindow) |
— |
UniverseChatChannelAllocated |
UniverseChatChannelAllocated(context: string) |
— |
UniverseChatMessageReceived |
UniverseChatMessageReceived(textChatMessage: TextChatMessage) |
— |
UserMessageIntentSent |
UserMessageIntentSent(userIntentMessage: TextChatMessage) |
— |
UserMessageIntentSentRemote |
UserMessageIntentSentRemote(text: string, prefixText: string, metadata: string, messageId: string, textSource: TextSource, textChannel: TextChannel, timestamp: int64) |
— |
Callbacks¶
| Member | Signature | Summary |
|---|---|---|
OnBubbleAdded |
OnBubbleAdded(message: TextChatMessage, adornee: Instance) -> Tuple |
Called when a bubble chat is about to be displayed. |
OnChatWindowAdded |
OnChatWindowAdded(message: TextChatMessage) -> Tuple |
Called when a new message is about to be displayed in the chat window. This can only be implemented on the client. |
OnIncomingMessage |
OnIncomingMessage(message: TextChatMessage) -> Tuple |
Called when TextChatService is receiving an incoming message. |
Roblox reference: TextChatService
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.