Skip to content

Commit

Permalink
Further fixes to Unicode regexp taken from https://gist.github.com/Al…
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkessel committed Mar 16, 2024
1 parent a42e37c commit 9e86437
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion maubot.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
maubot: 0.1.0
id: org.rosi-kessel.reacjibot
version: 2.7.12
version: 2.7.14
license: MIT
modules:
- reacjibot
Expand Down
17 changes: 16 additions & 1 deletion reacjibot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,22 @@
from maubot import Plugin, MessageEvent
from maubot.handlers import command, event

EMOJI=re.compile('(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])+', flags=re.UNICODE)
EMOJI = re.compile(
"["
"\U0001F1E0-\U0001F1FF" # flags (iOS)
"\U0001F300-\U0001F5FF" # symbols & pictographs
"\U0001F600-\U0001F64F" # emoticons
"\U0001F680-\U0001F6FF" # transport & map symbols
"\U0001F700-\U0001F77F" # alchemical symbols
"\U0001F780-\U0001F7FF" # Geometric Shapes Extended
"\U0001F800-\U0001F8FF" # Supplemental Arrows-C
"\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
"\U0001FA00-\U0001FA6F" # Chess Symbols
"\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A
"\U00002702-\U000027B0" # Dingbats
"\U000024C2-\U0001F251"
"]+"
)

class Config(BaseProxyConfig):
def do_update(self, helper: ConfigUpdateHelper) -> None:
Expand Down

0 comments on commit 9e86437

Please sign in to comment.