hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
77 lines (37 loc) • 997 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [ChatManager](./server.chatmanager.md) > [sendBroadcastMessage](./server.chatmanager.sendbroadcastmessage.md)
## ChatManager.sendBroadcastMessage() method
Send a system broadcast message to all players in the world.
**Signature:**
```typescript
sendBroadcastMessage(message: string, color?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
message
</td><td>
string
</td><td>
The message to send.
</td></tr>
<tr><td>
color
</td><td>
string
</td><td>
_(Optional)_ The color of the message as a hex color code, excluding \#.
</td></tr>
</tbody></table>
**Returns:**
void
## Example
```typescript
chatManager.sendBroadcastMessage('Hello, world!', 'FF00AA');
```