TextChatMessage

사용되지 않는 항목 표시

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.

만들 수 없음

텍스트 채팅 메시지를 나타내는 변경할 수 없는 데이터 개체.

TextChatMessages의 사용에 대해 자세히 알아보려면 경험 내 텍스트 채팅을 참조하십시오.

요약

속성

속성

BubbleChatMessageProperties

병렬 읽기

ChatWindowMessageProperties

병렬 읽기

MessageId

병렬 읽기

TextChatMessage의 고유 식별자.

Metadata

병렬 읽기

다양한 데이터를 저장하는 일반적인 목적 필드입니다 TextChatMessage.TextChannel:SendAsync()TextChannel:DisplaySystemMessage()의 두 번째 인수는 이 필드를 채우는 데 사용됩니다.

이 필드를 사용하여 TextChatService.OnIncomingMessageTextChannel.OnIncomingMessage 콜백 내에서 특별 메시지에 추가 서식을 적용합니다.


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

다음은 채팅 시스템에서 발송하는 기본 시스템 메시지의 참조입니다:


<th>설명</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Roblox.ChatTranslation.ChatWindow.SystemMessage</code></td>
<td>시스템이 플레이어를 위해 채팅 메시지를 번역할 수 있음을 나타냅니다.</td>
</tr>
<tr>
<td><code>Roblox.Notification.Friend 가입됨</code></td>
<td>플레이어의 친구 중 한 명이 경험에 참여할 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.주의.Floodchecked</code></td>
<td>플레이어가 서버에 의해 메시지 전송이 제한되었을 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.주의.TextFilterFailed</code></td>
<td>텍스트 필터링 문제로 인해 플레이어의 메시지를 표시할 수 없을 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.주의.무효한 개인정보 설정</code></td>
<td>플레이어의 프라이버시 설정으로 인해 메시지를 보낼 수 없을 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.주의.Message가 길하다</code></td>
<td>플레이어가 너무 긴 콘텐츠가 포함된 메시지를 보낼 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.MessageStatus.주의.Unknown</code></td>
<td>시스템이 알 수 없는 이유로 플레이어의 메시지를 전송하지 못할 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.Help.Info</code></td>
<td>RBXHelpCommand 클래스.TextChatCommand에서 응답을 표시합니다.</td>
</tr>
<tr>
<td><code>Roblox.버전.Info</code></td>
<td>RBXVersionCommand 클래스.TextChatCommand 에서 응답을 표시합니다.</td>
</tr>
<tr>
<td><code>Roblox.Team.성공.지금 팀에 있음</code></td>
<td>플레이어의 팀이 변경될 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.Team.Error.CannotTeamChatIfNotInTeam 오류</code></td>
<td>플레이어가 <code>RBX팀명령</code><code>Class.TextChatCommand</code>을 트리거하지만 클래스 <code>팀</code>에 없을 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Info.성공</code></td>
<td>플레이어가 속삭임 대화를 성공적으로 시작할 때 표시됩니다.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Welcome.Sent</code></td>
<td>속삭임 클래스.TextChannel에 입력할 때 표시됩니다. <code>Displayed when entering a whisper Class.TextChannel</code>.</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.CannotWhisperToSelf</code></td>
<td>RBXWhisperCommand의 <code>오류 응답</code><code>Class.TextChatCommand</code> .</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.목표가 존재하지 않음</code></td>
<td>RBXWhisperCommand의 <code>오류 응답</code><code>Class.TextChatCommand</code> .</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.TooManyMatches</code></td>
<td>RBXWhisperCommand의 <code>오류 응답</code><code>Class.TextChatCommand</code> .</td>
</tr>
<tr>
<td><code>Roblox.Whisper.Error.Unknown</code></td>
<td>RBXWhisperCommand의 <code>오류 응답</code><code>Class.TextChatCommand</code> .</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.존재하지 않음</code></td>
<td>RBXEmoteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.UserEmotesNotEnabled</code></td>
<td>RBXEmoteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.TemporarilyUnavailable(로블록스.감정 표현.오류.일시적으로 사용 불가능)</code></td>
<td>RBXEmoteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.NotSupported</code></td>
<td>RBXEmoteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.R15로 전환</code></td>
<td>RBXEmoteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Emote.Error.AnimationPlaying</code></td>
<td>RBXEmoteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Error.PlayerNotFound</code></td>
<td>RBXMuteCommand 클래스.TextChatCommand에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Error.Multi플 매치</code></td>
<td>RBXMuteCommand 클래스.TextChatCommand에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Error.CannotMuteSelf</code></td>
<td>RBXMuteCommand 클래스.TextChatCommand에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Mute.Info.성공</code></td>
<td>RBXMuteCommand 클래스.TextChatCommand에서 성공 응답.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Error.PlayerNotFound</code></td>
<td>RBXUnmuteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Error.Multi플 일치</code></td>
<td>RBXUnmuteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Error.CannotMuteSelf</code></td>
<td>RBXUnmuteCommand 클래스.TextChatCommand 에서 오류 응답.</td>
</tr>
<tr>
<td><code>Roblox.Unmute.Info.성공</code></td>
<td>RBXUnmuteCommand 클래스.TextChatCommand에서 성공 응답.</td>
</tr>
</tbody>
메타데이터

PrefixText

병렬 읽기

사용자의 메시지에 추가할 접두사입니다. 이는 부자 텍스트를 지원하므로 개발자는 채팅 태그를 지원하기 위해 이 텍스트에 대한 사용자 지정 속성을 설정할 수 있습니다.

기본적으로, 는 사용자와 연결된 의 이름으로, 은 사용자와 연결된 을 통해 액세스하는 것입니다.

병렬 읽기

상태를 나타냅니다 TextChatMessage .

Text

병렬 읽기

사용자에 대한 필터링된 텍스트 메시지.다른 사용자는 필터링 규칙에 따라 이 속성에서 다른 문자열을 받을 수 있습니다.빈 문자열일 수 있습니다.

TextChannel

병렬 읽기

원본에 대한 참조 TextChannel .

TextSource

병렬 읽기

원본에 대한 참조 TextSource .

Timestamp

병렬 읽기

메시지가 처음 전송된 시간의 타임스탬프.

Translation

병렬 읽기

사용자의 지역화 설정에 따라 번역되고 필터링된 텍스트 메시지를 나타냅니다.시스템은 동일한 지역화 설정을 가진 사용자 간에 메시지를 번역하지 않거나 텍스트 필터 지원이 없는 언어를 사용하여 메시지를 번역하지 않으므로 이 속성은 번역이 발생하지 않으면 비어 있는 문자열일 수 있습니다.커스터마이즈를 위해서는 번역된 메시지 커스터마이즈를 참조하십시오.

메서드

이벤트