Browse Source

fix up plugin loop code

master
granny 4 years ago
parent
commit
84bba77f46
  1. 12
      cogs/timings.py

12
cogs/timings.py

@ -185,13 +185,13 @@ class Timings(commands.Cog):
try: try:
plugins = r["timingsMaster"]["plugins"] plugins = r["timingsMaster"]["plugins"]
if not YAML_ERROR: if not YAML_ERROR:
for server_name in TIMINGS_CHECK["plugins"]:
if server_name in r["timingsMaster"]["config"]:
for plugin in plugins: for plugin in plugins:
for stored_plugin in TIMINGS_CHECK["plugins"]["paper"]:
if plugin == stored_plugin["name"]:
embed_var.add_field(**create_field(stored_plugin))
if "purpur" in r["timingsMaster"]["config"] and "purpur" in TIMINGS_CHECK["plugins"]:
for stored_plugin in TIMINGS_CHECK["plugins"]["purpur"]:
if plugin == stored_plugin["name"]:
for plugin_name in TIMINGS_CHECK["plugins"][server_name]:
if plugin == plugin_name:
stored_plugin = TIMINGS_CHECK["plugins"][server_name][plugin_name]
stored_plugin["name"] = plugin_name
embed_var.add_field(**create_field(stored_plugin)) embed_var.add_field(**create_field(stored_plugin))
else: else:
embed_var.add_field(name="Error loading YAML file", embed_var.add_field(name="Error loading YAML file",

Loading…
Cancel
Save