This should work. It's very basic though. You can change the command to whatever you want
js code:
var command = "/min"; //Change the command here
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Message.substr(0, command.length) == command){
Interop.Call("user32.dll", "ShowWindow", ChatWnd.Handle, 6 /*SW_MINIMIXE*/);
return "";
}
}