Detect full-width characters (mixed_unicode.py)

This commit is contained in:
jesopo 2018-11-20 12:00:47 +00:00
parent e54db0858c
commit 52d5b5da49

View file

@ -7,6 +7,7 @@ class Script(enum.Enum):
Cyrillic = 2
Greek = 3
Armenian = 4
FullWidth = 5
WORD_SEPERATORS = [",", " ", "\t", "."]
class Module(ModuleManager.BaseModule):
@ -20,6 +21,8 @@ class Module(ModuleManager.BaseModule):
return Script.Cyrillic
elif 1329 <= point <= 1418:
return Script.Armenian
elif 65281 <= point <= 65376:
return Script.FullWidth
return Script.Unknown
@utils.hook("received.message.channel")