UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

78 lines (37 loc) 993 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [ChatManager](./server.chatmanager.md) &gt; [handleCommand](./server.chatmanager.handlecommand.md) ## ChatManager.handleCommand() method Handle a command if it exists. **Signature:** ```typescript handleCommand(player: Player, message: string): boolean; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> player </td><td> [Player](./server.player.md) </td><td> The player that sent the command. </td></tr> <tr><td> message </td><td> string </td><td> The full message. </td></tr> </tbody></table> **Returns:** boolean True if a command was handled, false otherwise. ## Remarks The command is parsed as the first space-delimited token in the message. \*\*Category:\*\* Chat