get script path more nicely

This commit is contained in:
MarkusRost 2023-05-06 17:30:54 +02:00
parent c74172f6b3
commit 116e159d19

View file

@ -30,7 +30,7 @@ async def compact_formatter(action, change, parsed_comment, categories, recent_c
WIKI_SCRIPT_PATH = paths[1]
WIKI_ARTICLE_PATH = paths[2]
WIKI_JUST_DOMAIN = paths[3]
BUTTON_PREFIX = "rc_/" + WIKI_SCRIPT_PATH.split('/', 3)[3]
BUTTON_PREFIX = "rc_/" + WIKI_SCRIPT_PATH[len(WIKI_JUST_DOMAIN):]
action_buttons = message_target[0][2].split('|') if message_target[0][2] is not None else []
message_buttons = []
if action != "suppressed":
@ -628,7 +628,7 @@ async def embed_formatter(action, change, parsed_comment, categories, recent_cha
WIKI_SCRIPT_PATH = paths[1]
WIKI_ARTICLE_PATH = paths[2]
WIKI_JUST_DOMAIN = paths[3]
BUTTON_PREFIX = "rc_/" + WIKI_SCRIPT_PATH.split('/', 3)[3]
BUTTON_PREFIX = "rc_/" + WIKI_SCRIPT_PATH[len(WIKI_JUST_DOMAIN):]
action_buttons = message_target[0][2].split('|') if message_target[0][2] is not None else []
embed = DiscordMessage("embed", action, message_target[1], wiki=WIKI_SCRIPT_PATH)
if parsed_comment is None: