From 4e9c5a6c8710da718ca18f0614c4dcc2955d6e05 Mon Sep 17 00:00:00 2001 From: Frisk Date: Mon, 24 Dec 2018 21:50:00 +0100 Subject: [PATCH] Fixed a veeery weird bug where the message can be skipped due to no broken cat entries --- rcgcdw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index 503ec78..f58404e 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -494,7 +494,7 @@ def webhook_formatter(action, STATIC, **params): tag_displayname.append(tag) embed["fields"].append({"name": _("Tags"), "value": ", ".join(tag_displayname)}) logging.debug("Current params in edit action: {}".format(params)) - if "changed_categories" in STATIC and STATIC["changed_categories"] is not None: + if "changed_categories" in STATIC and STATIC["changed_categories"] is not None and not (len(STATIC["changed_categories"]["new"]) == 0 and len(STATIC["changed_categories"]["removed"]) == 0): if "fields" not in embed: embed["fields"] = [] # embed["fields"].append({"name": _("Changed categories"), "value": ", ".join(params["new_categories"][0:15]) + ("" if (len(params["new_categories"]) < 15) else _(" and {} more").format(len(params["new_categories"])-14))})