File Chat.lua
Functions
gw.ReceiveLocal (sender, message) | Parses and handles an encoded message from the add-on channel. |
gw.ReplicateMessage (event, message, guild_id, arglist) | Copies a message received on a common channel to all chat window instances of a target chat channel. |
gw.SendLocal (type, message) | Sends an encoded message to the rest of the same container on the add-on channel. |
gw.handlerGuildChat (type, guild_id, content, arglist) | Callback handler for guild chat messages. |
gw.handlerOfficerChat (type, guild_id, content, arglist) | Callback handler for officer chat messages. |
Functions
- gw.ReceiveLocal (sender, message)
-
Parses and handles an encoded message from the add-on channel.
Parameters:
-
sender
: The sender of the message. -
message
: The encoded message.
Return value:
- True on successful handling, false on failure.
-
- gw.ReplicateMessage (event, message, guild_id, arglist)
-
Copies a message received on a common channel to all chat window instances of a target chat channel.
Parameters:
-
event
: Chat message event to generate. Accepted values: 'GUILD' 'OFFICER' 'GUILD_ACHIEVEMENT' 'SYSTEM' -
message
: The message to replicate. -
guild_id
: (optional) Guild ID of the sender. -
arglist
: (optional) API event arguments.
-
- gw.SendLocal (type, message)
-
Sends an encoded message to the rest of the same container on the add-on channel.
Parameters:
-
type
: The message type: GW_MTYPE_CONTROL, GW_MTYPE_REQUEST, or GW_MTYPE_RESPONSE. -
message
: Text of the message.
-
- gw.handlerGuildChat (type, guild_id, content, arglist)
-
Callback handler for guild chat messages.
Parameters:
-
type
: Message type received. -
guild_id
: ID of the guild the message was received from. -
content
: Message content as a table. -
arglist
: API event arguments.
-
- gw.handlerOfficerChat (type, guild_id, content, arglist)
-
Callback handler for officer chat messages.
Parameters:
-
type
: Message type received. -
guild_id
: ID of the guild the mesage was received from. -
content
: Message content as a table. -
arglist
: API event arguments.
-