API GetChannelName

From Wowpedia
Jump to: navigation, search

Returns information about the specified channel.

id, name, instanceID = GetChannelName(id or "name")

Arguments

id 
Number - Channel id to query, e.g. 1 for the chat channel currently addressable using /1.
name 
String - Name of the channel to query, e.g. "Trade - City".

Returns

id 
Number - the id of the channel, or 0 if the channel is not found
name 
String - the name of the channel, e.g. "Trade - Stormwind", or nil if the player is not in the queried channel.
instanceID 
Number - ?, usually 0.

Details

  • Note that querying GetChannelName("Trade - City") may return values which appear to be valid even while the player is not a city. Consider using GetChannelName((GetChannelName("Trade - City"))) > 0 to check whether you really have access to the Trade channel.