Skip to main content
Chat events allow resources to intercept messages, add suggestions, and control the chat UI.

Server Events

chatMessage

Fired when a player sends a chat message. Can be cancelled to prevent the message from being processed.
Parameters:
number
Player server ID
string
Player name
string
Message content
Example:

Client Events

chat:addMessage

Add a message to the chat UI.
string
Message type (see Message Types below)
string
Message content
string
Sender name
number
Timestamp

chat:clearChat

Clear the chat for a specific player.

chat:addSuggestion

Add a command suggestion to the player’s chat.
string
Command name with / prefix
string
Help text
table
Parameter definitions

chat:removeSuggestion

Remove a command suggestion.

chat:resetSuggestions

Reset all command suggestions for a player.

Message Types


Middleware Events

Characters:Spawning

Chat refreshes available commands when a character spawns (priority 3).

Job:Server:DutyAdd / Job:Server:DutyRemove

Chat refreshes commands when duty status changes.

Next Steps

Chat - Exports

Command registration and messaging

Middleware API

Event middleware system

Jobs Events

Job-related events