Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server

Home Page:http://dinnerbone.com/minecraft/tools/status/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting timeout for status.plays.online

Carterb188 opened this issue · comments

I call McStatus (My file that grabs the server) which passes it to the variable "server". everything works fine until I get to the line "players_on = str(status.players.online)" my program will not get past this point without getting a time out error.

Import mcStatus


def get_response(message: str) -> str:
    p_message = message.lower()

    if p_message == '!hello':
        return 'Hey there!'

    if p_message == '!server':
        server = mcStatus.getServer()
        print(server)

        status = server.status()
        print("server status fetched")
        players_on = str(status.players.online)
        print(players_on)
        return players_on
    else:

    return 'I didn\'t understand what you wrote. Try typing "!help".'

Can you please send the full error?

This is the wrong repo to post this issue too. Please visit the new location and provide more information.