diff --git a/__pycache__/octoapi.cpython-36.pyc b/__pycache__/octoapi.cpython-36.pyc index 3da0143..b714743 100644 Binary files a/__pycache__/octoapi.cpython-36.pyc and b/__pycache__/octoapi.cpython-36.pyc differ diff --git a/octoapi.py b/octoapi.py index b0f2b57..6061af7 100644 --- a/octoapi.py +++ b/octoapi.py @@ -135,7 +135,7 @@ def get_printTimeLeft(): return get_job_dict()["progress"]["printTimeLeft"] def get_printFileName(): - return get_job_dict()["file"]["name"] + return get_job_dict()["job"]["file"]["name"] def get_sd_dict(): kwargs = {"url": "printer/sd"} diff --git a/r0b3bot.py b/r0b3bot.py index f53899a..923193d 100644 --- a/r0b3bot.py +++ b/r0b3bot.py @@ -62,7 +62,7 @@ async def printpic(ctx): os.remove(full_file_name) try: - print_filename = octoapi.print_FileName() + print_filename = octoapi.get_printFileName() except: print_filename = "Unknown" @@ -98,8 +98,7 @@ async def printpic(ctx): time_remaining = "%s Hours %s Minutes" % (print_hoursleft, print_minleft) #print_completion = "%s%" % (print_completion) - embed = discord.Embed(title="R0b3's 3D Printer Status", description="", color=0xF5A623) - embed.add_field(name="Job File: ", value=print_filename) + embed = discord.Embed(title="R0b3's 3D Printer Status", description="File Name: " + print_filename, color=0xF5A623) embed.add_field(name="Percent Complete: ", value=str(print_completion)) embed.add_field(name="Time Elapsed: ", value=time_elapsed) embed.add_field(name="Time Remaining: ", value=time_remaining)