Browse Source

Fix false positives in animated for PartialEmoji.from_str

pull/9462/head
Alex Nørgaard 2 years ago
committed by GitHub
parent
commit
a7f2c670c9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      discord/partial_emoji.py

2
discord/partial_emoji.py

@ -94,7 +94,7 @@ class PartialEmoji(_EmojiTag, AssetMixin):
__slots__ = ('animated', 'name', 'id', '_state')
_CUSTOM_EMOJI_RE = re.compile(r'<?(?P<animated>a)?:?(?P<name>[A-Za-z0-9\_]+):(?P<id>[0-9]{13,20})>?')
_CUSTOM_EMOJI_RE = re.compile(r'<?(?:(?P<animated>a)?:)?(?P<name>[A-Za-z0-9\_]+):(?P<id>[0-9]{13,20})>?')
if TYPE_CHECKING:
id: Optional[int]

Loading…
Cancel
Save