fixed custom emoji in composition scan
This commit is contained in:
@@ -55,9 +55,9 @@ class CompositionScanner(Scanner):
|
|||||||
emotes_found = emojis.regex.findall(message.content)
|
emotes_found = emojis.regex.findall(message.content)
|
||||||
without_emote = message.content
|
without_emote = message.content
|
||||||
for name in emotes_found:
|
for name in emotes_found:
|
||||||
if name not in compo.emotes:
|
if name in emojis.unicode_list or re.match(
|
||||||
if name not in emojis.unicode_list:
|
r"(<a?:[\w\-\~]+:\d+>|:[\w\\-\~]+:)", name
|
||||||
continue
|
):
|
||||||
compo.emotes[name] += 1
|
compo.emotes[name] += 1
|
||||||
i = without_emote.index(name)
|
i = without_emote.index(name)
|
||||||
without_emote = without_emote[:i] + without_emote[i + len(name) :]
|
without_emote = without_emote[:i] + without_emote[i + len(name) :]
|
||||||
|
|||||||
Reference in New Issue
Block a user