Lua Code:
local Frame = FCF_OpenNewWindow("chat window title")
ChatFrame_RemoveAllMessageGroups(Frame)
ChatFrame_RemoveAllChannels(Frame)
ChatFrame_AddMessageGroup(Frame, "WHISPER")
ChatFrame_AddMessageGroup(Frame, "GUILD")
ChatFrame_AddChanngel(Frame, "Trade")
This will insert a new frame, it'll be whatever index the game assigns it to.
If you want to specifically do ChatFrame3, replace the first line with this:
A full example of how I set up my chat frames on first login:
https://github.com/p3lim-wow/Inomena...aster/chat.lua
There's some other things in there that helps facilitate it, which you can ignore, the whole addon is about setting up on fresh characters (chat, cvars, bindings, scaling).