You could read all chat from the server log. There is no feature for this in the vanilla client.
Or you could use a 3rd-party API mod to pipe it to Discord, or possibly even a chat log file in the host server. Server management tools are Pinned in the Multiplayer section.