mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-08 04:08:56 -05:00
isolate direction of username within modlog (#5422)
* isolate direction of username within modlog * Add link to Unicode's usage Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
b091f13df5
commit
7db3339aba
@ -467,10 +467,21 @@ class Case:
|
||||
translated = _("Unknown or Deleted User")
|
||||
user = f"[{translated}] ({self.user})"
|
||||
else:
|
||||
user = f"{self.last_known_username} ({self.user})"
|
||||
# See usage explanation here: https://www.unicode.org/reports/tr9/#Formatting
|
||||
name = self.last_known_username[:-5]
|
||||
discriminator = self.last_known_username[-4:]
|
||||
user = (
|
||||
f"\N{FIRST STRONG ISOLATE}{name}"
|
||||
f"\N{POP DIRECTIONAL ISOLATE}#{discriminator} ({self.user})"
|
||||
)
|
||||
else:
|
||||
# isolate the name so that the direction of the discriminator and ID do not get changed
|
||||
# See usage explanation here: https://www.unicode.org/reports/tr9/#Formatting
|
||||
user = escape_spoilers(
|
||||
filter_invites(f"{self.user} ({self.user.id})")
|
||||
filter_invites(
|
||||
f"\N{FIRST STRONG ISOLATE}{self.user.name}"
|
||||
f"\N{POP DIRECTIONAL ISOLATE}#{self.user.discriminator} ({self.user.id})"
|
||||
)
|
||||
) # Invites and spoilers get rendered even in embeds.
|
||||
|
||||
if embed:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user