Made it possible to run chat commands in team chat.

#861
Made group chat use team if group chat does not exist.

#861