Fixed link formatting in few events

This commit is contained in:
Frisk 2018-06-24 22:44:29 +02:00
parent fac7acfe57
commit 1947985260
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C

View file

@ -140,17 +140,17 @@ def webhook_formatter(action, STATIC, **params):
embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}))").format(link=embed["image"]["url"])}]
params["desc"] = _("{desc}\nLicense: {license}").format(desc=params["desc"], license=license)
elif action == 6:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_"))
embed["title"] = _("Deleted page {article}").format(article=params["title"])
elif action == 7:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_"))
embed["title"] = _("Deleted redirect {article} by overwriting").format(article=params["title"])
elif action == 14:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["target"].replace(" ", "_"))
params["desc"] = "{supress}. {desc}".format(desc=params["desc"], supress=_("No redirect has been made") if params["supress"] == True else _("A redirect has been made"))
embed["title"] = _("Moved {article} to {target}").format(article = params["title"], target=params["target"])
elif action == 15:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["target"].replace(" ", "_"))
embed["title"] = _("Moved {article} to {title} over redirect").format(article=params["title"], title=params["target"])
elif action == 16:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)