Minor bugfixes resolving around modlog UI (#5615)

Multiple bugfixes
 * Fixed unbound channel_value
 * Fixed lack of new lines for listcases
 * Fixed response text for case. It can only be used in the current server.
This commit is contained in:
Kowlin 2022-06-05 17:38:46 +02:00 committed by GitHub
parent 485e6837ca
commit 4580a13e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ class ModLog(commands.Cog):
try:
case = await modlog.get_case(number, ctx.guild, self.bot)
except RuntimeError:
await ctx.send(_("That case does not exist for that server."))
await ctx.send(_("That case does not exist for this server."))
return
else:
if await ctx.embed_requested():
@ -115,7 +115,7 @@ class ModLog(commands.Cog):
created_at = datetime.fromtimestamp(case.created_at, tz=timezone.utc)
message += (
f"{await case.message_content(embed=False)}\n"
f"{bold(_('Timestamp:'))} {discord.utils.format_dt(created_at)}"
f"{bold(_('Timestamp:'))} {discord.utils.format_dt(created_at)}\n\n"
)
for page in pagify(message, ["\n\n", "\n"], priority=True):
rendered_cases.append(page)