The idea seems to contain certain inherent problems that would require coding for exceptions (slash commands you wanted to use etc. etc.) and situational requirements which would probably ultimately lead to Oops, I forgot to ...
.
As a quick and dirty test of the basic premise you could try the following (/reload to reset)
/run local function OEP(s)local t,p=s:GetText(),s:GetAttribute("chatType")if not(t=="/reload"or p=="GUILD"or p== "PARTY"or p== "RAID")then ChatEdit_ClearChat(s)return end ChatEdit_OnEnterPressed(s)end ChatFrame1.editBox:SetScript("OnEnterPressed", OEP)
Only allows guild/party/raid messages on ChatFrame 1 (General???).
Untested so anything eg. combat might break it.
The /reload
is case sensitive!