WoW:API SendAddonMessage: Difference between revisions
Jump to navigation
Jump to search
(revise) |
m (→Notes) |
||
Line 16: | Line 16: | ||
* Messages sent to "RAID" while in a party will get delivered to "PARTY"; messages sent to "RAID" or "PARTY" while not in a group will not be delivered. To send to your battleground group, "BATTLEGROUND" must be used. | * Messages sent to "RAID" while in a party will get delivered to "PARTY"; messages sent to "RAID" or "PARTY" while not in a group will not be delivered. To send to your battleground group, "BATTLEGROUND" must be used. | ||
* The message will not be affected by the player's level of [[Drunk|drunkenness]]. | * The message will not be affected by the player's level of [[Drunk|drunkenness]]. | ||
* The tab character ("\t") is used as a delimiter between the prefix and the message text -- because of this, \t can not be used as part of prefix. The combined length of message and prefix can be at most 254 characters (255th is the tab character used to delimit the two). | * The tab character ("\t") is used as a delimiter between the prefix and the message text -- because of this, \t can not be used as part of prefix. The combined length of message and prefix can be at most 254 characters (255th is the tab character used to delimit the two), lenght above 254 will disconnect you. | ||
* Like [[API_SendChatMessage|SendChatMessage]], sending a message containing "\n" will disconnect you. | * Like [[API_SendChatMessage|SendChatMessage]], sending a message containing "\n" will disconnect you. |
Revision as of 01:42, 13 January 2007
Sends a message to hidden AddOn channels. Introduced in Patch 1.12.
SendAddonMessage("prefix", "text", "type")
Parameters
Arguments
- prefix
- String - Message prefix, can be used as your addon identifier.
- text
- String - Text to send.
- type
- String - AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND".
Example
SendAddonMessage( "CTRA", "User Data: XYZ", "RAID" );
Notes
- Calling this function results in the event CHAT_MSG_ADDON being invoked on all clients in the PARTY, RAID, BATTLEGROUND or GUILD channels.
- Messages sent to "RAID" while in a party will get delivered to "PARTY"; messages sent to "RAID" or "PARTY" while not in a group will not be delivered. To send to your battleground group, "BATTLEGROUND" must be used.
- The message will not be affected by the player's level of drunkenness.
- The tab character ("\t") is used as a delimiter between the prefix and the message text -- because of this, \t can not be used as part of prefix. The combined length of message and prefix can be at most 254 characters (255th is the tab character used to delimit the two), lenght above 254 will disconnect you.
- Like SendChatMessage, sending a message containing "\n" will disconnect you.