Originally Posted by Lesteryoung
I'm trying to create a command function that simply clears the chat that you currently have selected, whether it be the combat log or the main chat or any other chat frame.
This is what I have, but the code is off.
Code:
SlashCmdList["CLEAR"] = function() SELECTED_CHAT_FRAME() end
SLASH_CLEAR1 = "/clear"
|
Try this.
Code:
SlashCmdList.CLEAR_CHAT = function()
for i = 1, NUM_CHAT_WINDOWS do
_G[format("ChatFrame%d", i)]:Clear()
end
end
SLASH_CLEAR_CHAT1 = "/clear"
If you want to see some other ones look here.
https://github.com/Kkthnx/KkthnxUI/b...e/Commands.lua