mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Added #30
This commit is contained in:
parent
307acc24c1
commit
b597e21e00
21
rcgcdw.py
21
rcgcdw.py
|
@ -281,17 +281,29 @@ def webhook_formatter(action, STATIC, **params):
|
||||||
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
||||||
commentid=params["commentid"])
|
commentid=params["commentid"])
|
||||||
# link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) old way of linking
|
# link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) old way of linking
|
||||||
embed["title"] = _("Left a comment on {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Left a comment on {target}'s profile").format(target=params["target"]) if params[
|
||||||
|
"target"] != \
|
||||||
|
params[
|
||||||
|
"user"] else _(
|
||||||
|
"Left a comment on their own profile")
|
||||||
elif action == "curseprofile/comment-replied":
|
elif action == "curseprofile/comment-replied":
|
||||||
# link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
# link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
||||||
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
||||||
commentid=params["commentid"])
|
commentid=params["commentid"])
|
||||||
embed["title"] = _("Replied to a comment on {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Replied to a comment on {target}'s profile").format(target=params["target"]) if params[
|
||||||
|
"target"] != \
|
||||||
|
params[
|
||||||
|
"user"] else _(
|
||||||
|
"Replied to a comment on their own profile")
|
||||||
elif action == "curseprofile/comment-edited":
|
elif action == "curseprofile/comment-edited":
|
||||||
# link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
# link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
||||||
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
||||||
commentid=params["commentid"])
|
commentid=params["commentid"])
|
||||||
embed["title"] = _("Edited a comment on {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Edited a comment on {target}'s profile").format(target=params["target"]) if params[
|
||||||
|
"target"] != \
|
||||||
|
params[
|
||||||
|
"user"] else _(
|
||||||
|
"Edited a comment on their own profile")
|
||||||
elif action == "curseprofile/profile-edited":
|
elif action == "curseprofile/profile-edited":
|
||||||
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"],
|
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"],
|
||||||
target=params["target"].replace(" ",
|
target=params["target"].replace(" ",
|
||||||
|
@ -321,7 +333,8 @@ def webhook_formatter(action, STATIC, **params):
|
||||||
field = _("Steam link")
|
field = _("Steam link")
|
||||||
else:
|
else:
|
||||||
field = _("Unknown")
|
field = _("Unknown")
|
||||||
embed["title"] = _("Edited {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Edited {target}'s profile").format(target=params["target"]) if params["user"] != params[
|
||||||
|
"target"] else _("Left a comment on their own profile")
|
||||||
params["desc"] = _("{field} field changed to: {desc}").format(field=field, desc=params["desc"])
|
params["desc"] = _("{field} field changed to: {desc}").format(field=field, desc=params["desc"])
|
||||||
elif action == "curseprofile/comment-deleted":
|
elif action == "curseprofile/comment-deleted":
|
||||||
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
|
||||||
|
|
Loading…
Reference in a new issue