Closed py-mine-bot closed 2 years ago
Authored by Iapetus-11
It appears to be an issue with how the library handles server motds. Some servers return a dictionary if the text has colors or other formatting in it, and the library just ignores all that.
https://github.com/Dinnerbone/mcstatus/blob/master/mcstatus/pinger.py#L207-L210
if isinstance(raw["description"], dict):
self.description = raw["description"]["text"]
else:
self.description = raw["description"]
I'll make and submit a PR soon!
I'm trying to make a python discord bot that pings servers using this library, but for some reason it only sends MOTD or description of the server for very few servers. My code:
When I ping most servers with this command (example: cubecraft.net), it returns
but when I ping hypixel.net it returns
Is this an issue with the library or with my code? If it's my code, how can I fix this?