Open ZaneIcezMaster11 opened 1 year ago
following the code in https://github.com/ewpratten/mcq/blob/master/src/main.rs specifically
let description = match status.description { ServerDescription::Plain(str) => str, ServerDescription::Object { text } => text, };
you can then call description in the webhook or anywhere else you need the value
So what im doing is very simple. Its trying to get server info from a certain ip and port using this package and when trying to get the motd, i use
status.status.description
to set it in a mut variable. The problem is that when trying to parse this info to my webhook, nothing works. Ive tried casting it into different variables, and trying to convert the struct to json packages. I have other things like max players and players online working just fine, but this is giving me issues. Is there any way you know to fix this or cast this to a usable variable that i can give to the webhook to print? My Code for this ill be link down below.Any possible solutions or insight into my problems would be nice. Any questions you have about this i can answer