API:SendChatMessage
SendChatMessage ( message, type, language?, channel )
Parameters[edit | edit source]
Arguments[edit | edit source]
- message
- String - The text to send
- type
- String - SAY, ZONE, YELL, GUILD, RAID, WHISPER, or CHANNEL
- language?
- Unknown
- channel
- String or number - The channel to send this message. For WHISPER, this is the name of the player (case-sensitive). For CHANNEL, it's the number of a custom channel
Returns[edit | edit source]
- nil
Example code[edit | edit source]
SendChatMessage("Some Text", "ZONE")
SendChatMessage("Some Text", "WHISPER", 0, "SomePlayerName")
for i,v in ipairs (GetChannelList()) do
if v == "MyChannelName" then
SendChatMessage("Some Text", "CHANNEL", 0, i) -- i should be number of channel because type CHANNEL
break
end
end