Classe motore
TextChannel
*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.
Sommario
Proprietà
Metodi
AddUserAsync(userId: User):Tuple |
DisplaySystemMessage(systemMessage: string,metadata: string):TextChatMessage |
SendAsync(message: string,metadata: string):TextChatMessage |
SetDirectChatRequester(requester: Player):() |
Eventi
MessageReceived(incomingMessage: TextChatMessage):RBXScriptSignal |
Richiami
OnIncomingMessage(message: TextChatMessage):Tuple |
ShouldDeliverCallback(message: TextChatMessage,textSource: TextSource):Tuple |
Riferimento API
Proprietà
Metodi
DisplaySystemMessage
Restituzioni
SendAsync
Restituzioni
SetDirectChatRequester
Parametri
Restituzioni
()
Campioni di codice
Imposta Richiesta di Chat Diretta
local function createWhisperChannel(fromPlayer, toPlayer)
local whisperChannel = Instance.new("TextChannel")
whisperChannel:SetDirectChatRequester(fromPlayer)
whisperChannel:AddUserAsync(toPlayer.UserId)
-- L'istanza TextChannel ora ha due istanze TextSource.
return whisperChannel
endEventi
MessageReceived
Parametri
Richiami
OnIncomingMessage
Parametri
Restituzioni
ShouldDeliverCallback
Parametri
Restituzioni