From 1947985260904bec3f7535fced300f718ed0c989 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 24 Jun 2018 22:44:29 +0200 Subject: [PATCH] Fixed link formatting in few events --- rcgcdw.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index ee9e861..67d751c 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -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)