Text Channel
*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.
Resumen
Propiedades
Métodos
AddUserAsync(userId: User):Tuple |
DisplaySystemMessage(systemMessage: string,metadata: string):TextChatMessage |
SendAsync(message: string,metadata: string):TextChatMessage |
SetDirectChatRequester(requester: Player):() |
Eventos
MessageReceived(incomingMessage: TextChatMessage):RBXScriptSignal |
Llamadas
OnIncomingMessage(message: TextChatMessage):Tuple |
ShouldDeliverCallback(message: TextChatMessage,textSource: TextSource):Tuple |
Referencia API
Propiedades
Métodos
Display System Message
Devuelve
Send Async
Devuelve
Set Direct Chat Requester
Parámetros
Devuelve
()
Muestras de código
Establecer Solicitante de Chat Directo
local Players = game:GetService("Players")
local function createWhisperChannel(fromPlayer, toPlayer)
local whisperChannel = Instance.new("TextChannel")
whisperChannel:SetDirectChatRequester(fromPlayer)
whisperChannel:AddUserAsync(toPlayer.UserId)
-- La instancia de TextChannel ahora tiene dos instancias de TextSource.
return whisperChannel
end
local players = Players:GetPlayers()
if #players >= 2 then
createWhisperChannel(players[1], players[2])
endEventos
Message Received
Parámetros
Llamadas
On Incoming Message
Parámetros
Devuelve
Should Deliver Callback
Parámetros
Devuelve