sendTextChatMessage
sendTextChatMessage(
world,sendTextChatMessageOptions):Promise<TextChatSendResult>
Sends a message the sender typed to the room’s text chat, which decides
it: the sender’s right to send, the channel, the limits, the filter and
who receives it, each at the recipient’s own level. Resolves with the
message as the sender reads it, masked at the sender’s level, or why the
room refused it, and never rejects; the message also lands in
useTextChatSession. In a game played alone it resolves refused
alone. As Roblox’s TextChannel:SendAsync.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
sendTextChatMessageOptions |
SendTextChatMessageOptions |
Returns
Section titled “Returns”Promise<TextChatSendResult>
Example
Section titled “Example”const sent = await sendTextChatMessage(world, { text: "gg" });if (!sent.ok) showRefusal(sent.reason);