WoW API: GetChannelList

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetChannelList to API GetChannelList without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < GetChannelList

GetChannelList

Retrieves joined channels.

id1, name1, disabled1, id2, name2, disabled2, ... = GetChannelList();

Parameters[edit]

Arguments[edit]

() - none

Returns[edit]

id1, name1, disabled, ...
triplets of channel number, channel name, and channel disabled. (see Blizzard_TradeSkillUI.lua TradeSkillUIMixin:InitLinkToMenu()).

function GetJoinedChannels()
    local channels = { }
    local chanList = { GetChannelList() }
    for i=1, #chanList, 3 do
        table.insert(channels, {
            id = chanList[i],
            name = chanList[i+1],
            isDisabled = chanList[i+2], -- Not sure what a state of "blocked" would be
        })
    end
    return channels
end