Fixes to messages about group changes

This commit is contained in:
Frisk 2018-07-03 22:02:11 +02:00
parent daf780e626
commit bf7fd64d93
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C

View file

@ -220,8 +220,8 @@ def webhook_formatter(action, STATIC, **params):
#link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
embed["title"] = _("Deleted a comment on {target}'s profile").format(target=params["target"])
elif action == 20:
link = "https://{wiki}.gamepedia.com/".format(wiki=settings["wiki"])+params["user"].replace(" ", "_").replace(')', '\)')
embed["title"] = _("Changed group membership for {target}").format(target=params["user"])
link = "https://{wiki}.gamepedia.com/User:".format(wiki=settings["wiki"])+params["title"].split(":")[1]
embed["title"] = _("Changed group membership for {target}").format(target=params["title"].split(":")[1])
if params["old_groups"].count(' ') < params["new_groups"].count(' '):
embed["thumbnail"]["url"] = "https://i.imgur.com/WnGhF5g.gif"
if len(params["old_groups"]) < 4: