The above approach is not optimal due to the increased complexity involved in building the DLL however. Research was also performed to investigate the possibility of using another library for Discord functionality. Unfortunately, Remora was found to have a similar limitation when used with Mono.
Considering that Discord.Net and Terracord can be built with and run under .NET Core and .NET 5/6, it would be ideal if TShock could leverage these platforms as well. Hopefully, https://github.com/Pryaxis/TShock/pull/1735 gains some traction and gets merged at some point. This will enable Terracord to run under the BSDs, Linux, macOS, etc. without the use of Mono.
Terracord's dependence on the Discord.Net library has long caused runtime issues while using the plugin under Mono. This is due to Discord.Net being incompatible with Mono's WebSocket implementation. See the following links for reference: https://docs.stillu.cc/guides/getting_started/installing.html?tabs=vs-install%2Ccore2-1#supported-platforms https://github.com/discord-net/Discord.Net/issues/1086
There has been success in using
Terracord.dll
targetingnet46
under Mono 6.8.x. The process can be gleaned from this Dockerfile: https://github.com/Didstopia/terraria-server/blob/master/DockerfileThe above approach is not optimal due to the increased complexity involved in building the DLL however. Research was also performed to investigate the possibility of using another library for Discord functionality. Unfortunately, Remora was found to have a similar limitation when used with Mono.
Considering that Discord.Net and Terracord can be built with and run under .NET Core and .NET 5/6, it would be ideal if TShock could leverage these platforms as well. Hopefully, https://github.com/Pryaxis/TShock/pull/1735 gains some traction and gets merged at some point. This will enable Terracord to run under the BSDs, Linux, macOS, etc. without the use of Mono.