TextChannel

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。


概要

イベント
継承されたメンバー

APIリファレンス
プロパティ
DirectChatRequester
読み取り専用
複製されていません
並列読み取り
機能: Chat
TextChannel.DirectChatRequester:Player

方法
AddUserAsync
イールド
機能: Chat
TextChannel:AddUserAsync(userId:User):Tuple
パラメータ
userId:User
戻り値

DisplaySystemMessage
機能: Chat
TextChannel:DisplaySystemMessage(
systemMessage:string, metadata:string
パラメータ
systemMessage:string
metadata:string

SendAsync
イールド
機能: Chat
TextChannel:SendAsync(
message:string, metadata:string
パラメータ
message:string
metadata:string

SetDirectChatRequester
機能: Chat
TextChannel:SetDirectChatRequester(requester:Player):()
パラメータ
requester:Player
戻り値
()
コードサンプル
ダイレクトチャットリクエスターの設定
local Players = game:GetService("Players")
local function createWhisperChannel(fromPlayer, toPlayer)
local whisperChannel = Instance.new("TextChannel")
whisperChannel:SetDirectChatRequester(fromPlayer)
whisperChannel:AddUserAsync(toPlayer.UserId)
-- TextChannel インスタンスには現在 2 つの TextSource インスタンスがあります。
return whisperChannel
end
local players = Players:GetPlayers()
if #players >= 2 then
createWhisperChannel(players[1], players[2])
end

イベント
MessageReceived
機能: Chat
TextChannel.MessageReceived(incomingMessage:TextChatMessage):RBXScriptSignal
パラメータ
incomingMessage:TextChatMessage

コールバック
OnIncomingMessage
機能: Chat
TextChannel.OnIncomingMessage(message:TextChatMessage):Tuple
パラメータ
戻り値

ShouldDeliverCallback
機能: Chat
TextChannel.ShouldDeliverCallback(
message:TextChatMessage, textSource:TextSource
パラメータ
textSource:TextSource
戻り値

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。