Merge remote-tracking branch 'origin/testing' into testing

This commit is contained in:
Frisk 2024-08-23 22:31:54 +02:00
commit 636adbed27

View file

@ -36,10 +36,10 @@ def embed_cargo_createtable(ctx: Context, change: dict):
@formatter.compact(event="cargo/createtable")
def compact_cargo_createtable(ctx: Context, change: dict):
author, author_url = compact_author(ctx, change)
table = re.search(r"\[(.*?)]\(<(.*?)>\)", ctx.client.parse_links(change["logparams"]["0"]))
content = ctx._("[{author}]({author_url}) created the Cargo table \"{table}\"").format(author=author,
author_url=author_url,
table=table)
table_link = ctx.client.parse_links(change["logparams"]["0"])
content = ctx._("[{author}]({author_url}) created the Cargo table {table_link}").format(author=author,
author_url=author_url,
table_link=table_link)
return DiscordMessage(ctx.message_type, ctx.event, ctx.webhook_url, content=content)
@ -59,10 +59,10 @@ def embed_cargo_recreatetable(ctx: Context, change: dict):
@formatter.compact(event="cargo/recreatetable")
def compact_cargo_recreatetable(ctx: Context, change: dict):
author, author_url = compact_author(ctx, change)
table = re.search(r"\[(.*?)]\(<(.*?)>\)", ctx.client.parse_links(change["logparams"]["0"]))
content = ctx._("[{author}]({author_url}) recreated the Cargo table \"{table}\"").format(author=author,
author_url=author_url,
table=table)
table_link = ctx.client.parse_links(change["logparams"]["0"])
content = ctx._("[{author}]({author_url}) recreated the Cargo table {table_link}").format(author=author,
author_url=author_url,
table_link=table_link)
return DiscordMessage(ctx.message_type, ctx.event, ctx.webhook_url, content=content)
@ -82,10 +82,10 @@ def embed_cargo_replacetable(ctx: Context, change: dict):
@formatter.compact(event="cargo/replacetable")
def compact_cargo_replacetable(ctx: Context, change: dict):
author, author_url = compact_author(ctx, change)
table = re.search(r"\[(.*?)]\(<(.*?)>\)", ctx.client.parse_links(change["logparams"]["0"]))
content = ctx._("[{author}]({author_url}) replaced the Cargo table \"{table}\"").format(author=author,
author_url=author_url,
table=table)
table_link = ctx.client.parse_links(change["logparams"]["0"])
content = ctx._("[{author}]({author_url}) replaced the Cargo table {table_link}").format(author=author,
author_url=author_url,
table_link=table_link)
return DiscordMessage(ctx.message_type, ctx.event, ctx.webhook_url, content=content)