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"