1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-26 21:14:19 +00:00

🐛 Display non-cropped names in the message

This commit is contained in:
Steffo 2021-04-03 18:53:52 +02:00
parent 49e31eb3d4
commit 1af59f32dc
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -36,13 +36,13 @@ async def ship(*, _sentry: engi.Sentry, _msg: engi.Message, first: str, second:
log.debug(f"Matches: {first_match!r} + {second_match!r}") log.debug(f"Matches: {first_match!r} + {second_match!r}")
# Get the matched characters if the matches were successful, or cut the names in half if they weren't # Get the matched characters if the matches were successful, or cut the names in half if they weren't
first = first_match.group(0) if first_match else first[:(len(first) // 2)] first_crop = first_match.group(0) if first_match else first[:(len(first) // 2)]
second = second_match.group(0) if second_match else second[(len(second) // 2):] second_crop = second_match.group(0) if second_match else second[(len(second) // 2):]
log.debug(f"Cropped: {first!r} + {second!r}") log.debug(f"Cropped: {first_crop!r} + {second_crop!r}")
# Combine the two parts # Combine the two parts
combined = f"{first}{second}" combined = f"{first_crop}{second_crop}"
log.info(f"Combined: {combined!r}") log.info(f"Combined: {combined!r}")