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:
@bot.command()
async def ping(ctx, ip):
pingedServer = MinecraftServer.lookup(ip)
try:
status = pingedServer.status()
await ctx.channel.send(f'{ip} has {status.players.online} players online and responded in {status.latency}ms. It runs {status.version.name}. \n MOTD: ```\n{str(status.description)}\n```')
except:
await ctx.channel.send('Server did not respond to request.')
When I ping most servers with this command (example: cubecraft.net), it returns
cubecraft.net has 6704 players online and responded in 101.289ms. It runs §cWe support: 1.12.2 - 1.17.
MOTD:
but when I ping hypixel.net it returns
hypixel.net has 0 players online and responded in 92.341ms. It runs Requires MC 1.8 / 1.17.
MOTD:
§aHypixel Network §c[Maintenance]
§cFor More Information, §bhttps://hypixel.net
Is this an issue with the library or with my code? If it's my code, how can I fix this?
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?