API SendChatMessage

Sends a chat message. SendChatMessage(msg [, chatType, languageID, target])

Arguments

 * msg : string - The message to be sent. Large messages are truncated to max 255 characters, and only valid chat message characters are permitted.
 * chatType : string ? - The type of message to be sent, e.g. . If omitted, this defaults to
 * languageID : number ? - The languageID used for the message. If omitted the default language will be used: Orcish for the Horde and Common for the Alliance, as returned by
 * target : string |number ? - The player name or channel number receiving the message for  or   chatTypes.

Chat types

 * HW - denotes if the chatType requires a hardware event when in the outdoor world, i.e. not in an instance/battleground.

Details

 * Fires CHAT_MSG_* events, e.g. and
 * "RAID_WARNING" is accessible to raid leaders, or to all members of a party (when not in a raid)
 * "WHISPER" works across all realms in a region, it's not restricted to connected realms and you don't need to have interacted with the recipient before.

Examples
Sends a message, defaults to "SAY".

Sends a /yell message.

Sends a message to General Chat which is usually on channel index 1

Whispers your target.

Sets your /dnd message.

Speaks in Thalassian, provided your toon knows the language.

Sends a message to a raid, or instance group, or party.