Sending chat messages

We implemented an abstraction that will provide auto multicall and auto prefixing for you. You can use the following statements for example:

# Send chat message to all players.

# Send chat message to specific player or multiple players.
await'Test', 'player_login')  # Sends to single player.
await'Test', 'player_login', player_instance)  # Sends to both players.

# Execute in chain (Multicall).
  'global_message','Test', 'player_login'),'Test2', 'player_login2'),

# You can combine this with other calls in a GBX multicall:
await self.instance.gbx.multicall(
  self.instance.gbx.prepare('SetServerName', 'Test'),'Test2', 'player_login2'),

API Documentation

The chat contrib makes it possible to send chat messages way more easy and faster. It also maintains some other features related to the chat.


The Chat manager is available with: shortcut.


Execute and send one or multiple chat messages (prepared queries or raw strings) with a multicall.

Parameters:queries – One or more query instances or one or multiple strings that gets send as global messages.
Returns:The results of the multicall.
prepare(message=None, raw=False)[source]

Prepare a Chat Query by returning a Chat Query object.

  • message – Messsage predefined or build later.
  • raw – Don’t append prefixes or add any automatic message parts.

Query instance

Return type:


Prepare raw message query without prefixes!

Parameters:message – Predefined message.
Returns:Query instance