This commit is contained in:
Frisk 2018-06-27 16:45:46 +02:00
parent 8bed09514b
commit f9af664282
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C
2 changed files with 5 additions and 2 deletions

View file

@ -356,11 +356,10 @@ def first_pass(change): #I've decided to split the embed formatter and change ha
combination = "{logtype}/{logaction}".format(logtype=logtype, logaction=logaction)
logging.debug("combination is {}".format(combination))
try:
settings["appearance"][combination]
STATIC_VARS = {**STATIC_VARS ,**{"color": settings["appearance"][combination]["color"], "icon": settings["appearance"][combination]["icon"]}}
except KeyError:
STATIC_VARS = {**STATIC_VARS ,**{"color": "", "icon": ""}}
logging.error("No value in the settings has been given for {}".format(combination))
STATIC_VARS = {**STATIC_VARS ,**{"color": settings["appearance"][combination]["color"], "icon": settings["appearance"][combination]["icon"]}}
if logtype=="protect" and logaction=="protect":
webhook_formatter(2, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, settings=change["logparams"]["description"])
elif logtype=="protect" and logaction=="modify":

View file

@ -117,6 +117,10 @@
"icon":"",
"color":null
},
"abusefilter/modify":{
"icon":"",
"color":null
},
"interwiki/iw_add":{
"icon":"",
"color":null