This commit is contained in:
Joe 2026-02-02 12:08:47 -06:00
parent a9b4f8e83b
commit e6efc04756
8494 changed files with 495610 additions and 0 deletions

View file

@ -0,0 +1,414 @@
# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: TextChatMessage
type: class
memory_category: Instances
summary: |
A data object representing a text chat message.
description: |
A data object representing a text chat message.
To learn more about using TextChatMessages, see
[In-Experience Text Chat](../../../chat/in-experience-text-chat.md).
code_samples: []
inherits:
- Instance
descendants: []
tags:
- NotCreatable
deprecation_message: ''
properties:
- name: TextChatMessage.BubbleChatMessageProperties
summary: ''
description: ''
code_samples: []
type: BubbleChatMessageProperties
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: true
can_save: true
capabilities:
- Chat
- name: TextChatMessage.ChatWindowMessageProperties
summary: ''
description: ''
code_samples: []
type: ChatWindowMessageProperties
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: true
can_save: true
capabilities:
- Chat
- name: TextChatMessage.MessageId
summary: |
A unique identifier for the `Class.TextChatMessage`.
description: |
A unique identifier for the `Class.TextChatMessage`.
code_samples: []
type: string
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: false
capabilities:
- Chat
- name: TextChatMessage.Metadata
summary: |
A general purpose field for storing miscellaneous data about the
`Class.TextChatMessage`.
description: |
A general purpose field for storing miscellaneous data about the
`TextChatMessage`. The second argument of `Class.TextChannel:SendAsync()`
and `Class.TextChannel:DisplaySystemMessage()` is used to populate this
field.
Use this field to apply additional formatting for special messages within
`Class.TextChatService.OnIncomingMessage` and
`Class.TextChannel.OnIncomingMessage` callbacks.
```
local TextChatService = game:GetService("TextChatService")
local generalChannel: TextChannel = TextChatService:WaitForChild("TextChannels").RBXGeneral
generalChannel:DisplaySystemMessage("This is an error!", "Game.Error.Generic")
generalChannel:DisplaySystemMessage("Could not find save data!", "Game.Error.SaveDataNotFound")
generalChannel:DisplaySystemMessage("You won the game!", "Game.Info.Win")
generalChannel:DisplaySystemMessage("You lost the game!", "Game.Info.Lose")
generalChannel.OnIncomingMessage = function(message: TextChatMessage)
if string.find(message.Metadata, "Error") then
local overrideProperties = Instance.new("TextChatMessageProperties")
overrideProperties.TextColor = Color3.fromRGB(255, 0, 0)
return overrideProperties
elseif string.find(message.Metadata, "Info") then
local overrideProperties = Instance.new("TextChatMessageProperties")
overrideProperties.TextColor = Color3.fromRGB(0, 255, 150)
return overrideProperties
end
return nil
end
```
As follows is a reference of the default system messages emitted by the
chat system:
<table size="small">
<thead>
<tr>
<th>Metadata</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Roblox.ChatTranslation.ChatWindow.SystemMessage</code></td>
<td>Indicates that the system may translate chat messages for the player.</td>
</tr>
<tr>
<td><code>Roblox.Notification.Friend.Joined</code></td>
<td>Displayed when one of the player's connections join the experience.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.Warning.Floodchecked</code></td>
<td>Displayed when the player's sent message was rate limited by the server.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.Warning.TextFilterFailed</code></td>
<td>Displayed when the player's sent message could not be displayed due to a text filtering issue.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.Warning.InvalidPrivacySettings</code></td>
<td>Displayed when the player's privacy settings prevent them from sending a message.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.Warning.MessageTooLong</code></td>
<td>Displayed when the player sends a message with content that is too long.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.Warning.Unknown</code></td>
<td>Displays when the system fails to send the player's message for an unknown reason.</td>
</tr>
<tr>
<td><code>Roblox.Help.Info</code></td>
<td>Displays the response from the <code>RBXHelpCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Version.Info</code></td>
<td>Displays the response from the <code>RBXVersionCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Team.Success.NowInTeam</code></td>
<td>Displayed when the player's team changes.</td>
</tr>
<tr>
<td><code>Roblox.Team.Error.CannotTeamChatIfNotInTeam</code></td>
<td>Displayed when the player triggers the <code>RBXTeamCommand</code> <code>Class.TextChatCommand</code> without being on a <code>Class.Team</code>.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Info.Success</code></td>
<td>Displayed when the player successfully starts a whisper conversation.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Welcome.Sent</code></td>
<td>Displayed when entering a whisper <code>Class.TextChannel</code>.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.CannotWhisperToSelf</code></td>
<td>An error response from the <code>RBXWhisperCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.TargetDoesNotExist</code></td>
<td>An error response from the <code>RBXWhisperCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.TooManyMatches</code></td>
<td>An error response from the <code>RBXWhisperCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.Unknown</code></td>
<td>An error response from the <code>RBXWhisperCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.DoesNotExist</code></td>
<td>An error response from the <code>RBXEmoteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.UserEmotesNotEnabled</code></td>
<td>An error response from the <code>RBXEmoteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.TemporarilyUnavailable</code></td>
<td>An error response from the <code>RBXEmoteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.NotSupported</code></td>
<td>An error response from the <code>RBXEmoteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.SwitchToR15</code></td>
<td>An error response from the <code>RBXEmoteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.AnimationPlaying</code></td>
<td>An error response from the <code>RBXEmoteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Error.PlayerNotFound</code></td>
<td>An error response from the <code>RBXMuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Error.MultipleMatches</code></td>
<td>An error response from the <code>RBXMuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Error.CannotMuteSelf</code></td>
<td>An error response from the <code>RBXMuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Info.Success</code></td>
<td>An success response from the <code>RBXMuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Error.PlayerNotFound</code></td>
<td>An error response from the <code>RBXUnmuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Error.MultipleMatches</code></td>
<td>An error response from the <code>RBXUnmuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Error.CannotMuteSelf</code></td>
<td>An error response from the <code>RBXUnmuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Info.Success</code></td>
<td>An success response from the <code>RBXUnmuteCommand</code> <code>Class.TextChatCommand</code>.</td>
</tr>
</tbody>
</table>
code_samples: []
type: string
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: false
capabilities:
- Chat
- name: TextChatMessage.PrefixText
summary: |
A prefix to add to a user's message.
description: |
A prefix to add to a user's message. This supports Rich Text, so
developers can set custom properties for this text to support chat tags.
By default, `Class.TextChatMessage.PrefixText` is the name of the
`Class.TextSource`, which is the `Class.Player.DisplayName` of the user
associated with the `Class.TextSource` via `Class.TextSource.UserId`.
code_samples: []
type: string
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: false
capabilities:
- Chat
- name: TextChatMessage.Status
summary: |
Indicates the status of the `Class.TextChatMessage`.
description: |
Indicates the status of the `Class.TextChatMessage`.
code_samples: []
type: TextChatMessageStatus
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: false
capabilities:
- Chat
- name: TextChatMessage.Text
summary: |
The filtered text message for the user.
description: |
The filtered text message for the user. Different users may receive
different strings from this property based on filtering rules. It can be
an empty string.
code_samples: []
type: string
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: false
capabilities:
- Chat
- name: TextChatMessage.TextChannel
summary: |
A reference to the origin `Class.TextChannel`.
description: |
A reference to the origin `Class.TextChannel`.
code_samples: []
type: TextChannel
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: true
can_save: true
capabilities:
- Chat
- name: TextChatMessage.TextSource
summary: |
A reference to the origin `Class.TextSource`.
description: |
A reference to the origin `Class.TextSource`.
code_samples: []
type: TextSource
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: true
can_save: true
capabilities:
- Chat
- name: TextChatMessage.Timestamp
summary: |
A timestamp of when the message was originally sent.
description: |
A timestamp of when the message was originally sent.
code_samples: []
type: DateTime
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: false
capabilities:
- Chat
- name: TextChatMessage.Translation
summary: |
Translated and filtered text message.
description: |
Represents translated and filtered text messages based on users'
localization settings. The system doesn't translate messages between users
with the same localization settings or using languages without the text
filter support, so this property can be an empty string if no translation
happens. For customization, see
[Customizing Translated Messages](../../../chat/chat-window.md).
code_samples: []
type: string
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: false
capabilities:
- Chat
methods: []
events: []
callbacks: []