mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 11:05:39 +00:00
Merge pull request #59 from Jan200101/formatting-edit
improve log formatting
This commit is contained in:
commit
206b8b812e
13
cogs/logs.py
13
cogs/logs.py
|
@ -226,12 +226,17 @@ class Logs(Cog):
|
||||||
|
|
||||||
await self.do_spy(after)
|
await self.do_spy(after)
|
||||||
|
|
||||||
|
# U+200D is a Zero Width Joiner stopping backticks from breaking the formatting
|
||||||
|
before_content = before.clean_content.replace("`", "`\u200d")
|
||||||
|
after_content = after.clean_content.replace("`", "`\u200d")
|
||||||
|
|
||||||
log_channel = self.bot.get_channel(config.log_channel)
|
log_channel = self.bot.get_channel(config.log_channel)
|
||||||
|
|
||||||
msg = (
|
msg = (
|
||||||
"📝 **Message edit**: \n"
|
"📝 **Message edit**: \n"\
|
||||||
f"from {self.bot.escape_message(after.author.name)} "
|
f"from {self.bot.escape_message(after.author.name)} "\
|
||||||
f"({after.author.id}), in {after.channel.mention}:\n"
|
f"({after.author.id}), in {after.channel.mention}:\n"\
|
||||||
f"`{before.clean_content}` → `{after.clean_content}`"
|
f"```{before_content}``` → ```{after_content}```"
|
||||||
)
|
)
|
||||||
|
|
||||||
# If resulting message is too long, upload to hastebin
|
# If resulting message is too long, upload to hastebin
|
||||||
|
|
Loading…
Reference in a new issue