From Wowpedia
Jump to: navigation, search

Sends a text payload to other players, only visible to registered addons.

success = C_ChatInfo.SendAddonMessage(prefix, message [, chatType, target])
        = C_ChatInfo.SendAddonMessageLogged(prefix, message [, chatType, target])


string - Message prefix, can be used as your addon identifier; at most 16 characters.
string - Text to send, at most 250 characters. All characters (decimal ID 1-255) are permissible except NULL (ASCII 0).
string? - The addon channel to send to. Defaults to "PARTY"
string|number? - The player name or custom channel number receiving the message for "WHISPER" or "CHANNEL" chatTypes.


boolean - Whether the message was successfully sent. This is regardless of being registered to its related prefix.

Chat types

chatType Retail Classic Description
Addon message to party members
Addon message to raid members
Addon message to grouped players in instanced content such as dungeons, raids and battlegrounds
Addon message to guild members
Addon message to guild officers
Addon message to a player on the same or connected realm (silently fails to incompatible realms). Use player name as target argument
Addon message to a custom chat channel. Use channel number as target argument. Disabled on Classic to prevent players communicating over custom chat channels
Addon message to players within /say range. Subject to heavy throttling and certain specific characters are disallowed[2]
Addon message to players within /yell range. Subject to heavy throttling and certain specific characters are disallowed[2]



Addons transmitting user-generated content should consider this API so recipients can report violations of the Code of Conduct.

  • Fires CHAT_MSG_ADDON_LOGGED when receiving messages sent via this function.
  • The message has to be plain text for the game masters to read it. Moreover, the messages will silently fail to be sent if it contains an unsupported non-printable character. Some amount of metadata is tolerated, but should be kept as minimal as possible to keep the messages readable for Blizzard's game masters. [3]
  • This function has been introduced as a solution to growing issues of harassment and doxxing via addon communications, where players would use addons to send content against the terms of service to other players (roleplaying addons are particularly affected as they offer a free form canvas to share a RP profiles). As regular addon messages are not logged they cannot be seen by game master, they had no way to act upon this content. If you use this function, game masters will be able to check the addon communication logs in case of a report and act upon the content. Users should report addon content that is against the terms of service using Blizzard's support website via the Harassment in addon text option.


Whispers yourself an addon message when you login or /reload

local prefix = "SomePrefix123"
local playerName = UnitName("player")

local function OnEvent(self, event, ...)
	if event == "CHAT_MSG_ADDON" then
		print(event, ...)
	elseif event == "PLAYER_ENTERING_WORLD" then
		local isInitialLogin, isReloadingUi = ...
		if isInitialLogin or isReloadingUi then
			C_ChatInfo.SendAddonMessage(prefix, "You can't see this message", "WHISPER", playerName)
			C_ChatInfo.SendAddonMessage(prefix, "Hello world!", "WHISPER", playerName)

local f = CreateFrame("Frame")
f:SetScript("OnEvent", OnEvent)

Patch changes



See also

External links

Available on WowAce
Stats on Globe wut
Available on WowAce