Skip to content

Almost no servers return MOTD on ping #147

@j5155

Description

@j5155

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions