# Chat management

Before using chat API, please create chat management object. The methods as follows:

local Chat = class.Chat.new()

The specific function name and description are as follows:

Serial number Function name Description
1 sendChat(...) Send chat message(Default to all players)
2 sendSystemMsg(...) Send system message(Default to all players)

# sendChat

  • Parameters and types:
    • content:string
    • targetuin:numberSend to the player, whose uin is targetuin. 0 means sending to all players.
  • Return value and types:
  • The main role of this method: Send chat message(Default to all players)
  • The specific use cases are as follows:
local result = Chat:sendChat(content, targetuin)

# sendSystemMsg

  • Parameters and types:
    • content:string
    • targetuin:numberSend to the player, whose uin is targetuin. 0 means sending to all players.
  • Return value and types:
  • The main role of this method: Send system message(Default to all players)
  • The specific use cases are as follows:
local result = Chat:sendSystemMsg(content, targetuin)
Last Update: 11/22/2019, 2:31:59 PM