From bb46d6b1d67a1ae375bf0b3692597b8bcf72e75b Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Tue, 19 Jan 2021 00:31:47 -0600 Subject: [PATCH] Timings - Check datapacks --- cogs/timings_public.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cogs/timings_public.py b/cogs/timings_public.py index 768adc2..8440ed9 100644 --- a/cogs/timings_public.py +++ b/cogs/timings_public.py @@ -168,6 +168,15 @@ class Timings(commands.Cog): except KeyError as key: print("Missing: " + str(key)) + try: + datapacks = request_raw["datapacks"] + if len(datapacks) > 2: + datapack_count = len(datapacks) - 2 + embed_var.add_field(name="❌ Datapacks", + value="You have " + str(datapack_count) + " datapack(s). To see if they are causing lag, unzip them and look for a folder called functions. If the folder exists, remove the datapack.") + except KeyError as key: + print("Missing: " + str(key)) + plugins = request["timingsMaster"]["plugins"] if "plugins" in request["timingsMaster"] else None server_properties = request["timingsMaster"]["config"]["server.properties"] if "server.properties" in request["timingsMaster"]["config"] else None bukkit = request["timingsMaster"]["config"]["bukkit"] if "bukkit" in request["timingsMaster"]["config"] else None