test sync
This commit is contained in:
parent
6f6aa28cee
commit
2a9aa2419d
5 changed files with 33 additions and 11 deletions
|
@ -4,8 +4,11 @@ import string
|
|||
@hook.command(autohelp=False)
|
||||
def mcstatus(inp, bot=None):
|
||||
".mcstatus - Attempts to log in to minecraft"
|
||||
username = bot.config["api_keys"]["mc_user"]
|
||||
password = bot.config["api_keys"]["mc_pass"]
|
||||
username = bot.config.get("api_keys", {}).get("mc_user", None)
|
||||
password = bot.config.get("api_keys", {}).get("mc_pass", None)
|
||||
if api_key is None:
|
||||
return "error: no api key set"
|
||||
|
||||
login = http.get("https://login.minecraft.net/?user="+username+"&password="+password+"&version=13")
|
||||
if username.lower() in login.lower():
|
||||
return "Minecraft login servers appear to be online!"
|
||||
|
|
Reference in a new issue