As an addon (retail) running /gdo using the code below opens the guild window to the guild information tab.
If the frame isn't shown, it will open it and if it is shown but on another tab it will open the info tab.
Lua Code:
SLASH_GLDOPEN1 = "/gdo"
SlashCmdList["GLDOPEN"] = function()
if not CommunitiesFrame or not CommunitiesFrame:IsShown() then
ToggleGuildFrame()
end
CommunitiesFrame.GuildInfoTab:GetScript("OnClick")(CommunitiesFrame.GuildInfoTab)
end
Even if you're not in a guild so it would probably be best to use a "in guild" check.