Recognize more emoji

This commit is contained in:
Midgard 2023-11-07 18:59:08 +01:00
parent 9444b9db01
commit 9c57a40387
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -36,6 +36,9 @@ for line in sys.stdin:
message = re.sub(r"^[#>]* *|[*_`]*", "", message) message = re.sub(r"^[#>]* *|[*_`]*", "", message)
for emoji, numb in NUMBER_EMOJI.items(): for emoji, numb in NUMBER_EMOJI.items():
message = re.sub(f":{emoji}: *", numb, message) message = re.sub(f":{emoji}: *", numb, message)
for numb in range(0, 9+1):
message = re.sub(f":(green)?num{numb}: *", str(numb), message)
message = message.replace("\ufe0f", "").replace("\u20e3", "")
message = message.strip() message = message.strip()
else: else:
try: try: