Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

How to get this? #160

Closed x5tr closed 3 years ago

x5tr commented 3 years ago

image How to get this?

kevinkjt2000 commented 3 years ago

Oops. My caffeine obviously hasn't kicked in yet this morning. You wanted the MOTD. That's stored in the status object.

from mcstatus import MinecraftServer

server = MinecraftServer.lookup("example.org:1234")
status = server.status()
print(status.description)

It's also included in the query response as motd.