Add "WHISPER" mode info
m (→Notes) |
(Add "WHISPER" mode info) |
||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | {{wowapi}} __NOTOC__ | ||
Sends a message to hidden AddOn channels. Introduced in [[Patch 1.12]]. | Sends a message to hidden AddOn channels. Introduced in [[Patch 1.12]]. | ||
SendAddonMessage("prefix", "text", "type") | SendAddonMessage("prefix", "text", "type", "target") | ||
== Parameters == | == Parameters == | ||
| Line 7: | Line 7: | ||
:;prefix : String - Message prefix, can be used as your addon identifier. | :;prefix : String - Message prefix, can be used as your addon identifier. | ||
:;text : String - Text to send. | :;text : String - Text to send. | ||
:;type : String - AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND". | :;type : String - AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND". As of 2.1, "WHISPER" was also added. | ||
:;target : String - Used only for "WHISPER" communication - the player to whisper to. | |||
== Example == | == Example == | ||
| Line 18: | Line 19: | ||
* 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. | * 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. | ||
* The "WHISPER" mode was added with patch 2.1, as servers will begin to rate throttle regular whispers to alleviate [[spam]] problems. | |||