Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PartialEmoji.from_str incorrectly assumes emojis starting with a but not including : are animated #9456

Closed
3 tasks done
TrustyJAID opened this issue Jun 20, 2023 · 0 comments · Fixed by #9457
Closed
3 tasks done
Labels
bug This is a bug with the library.

Comments

@TrustyJAID
Copy link

TrustyJAID commented Jun 20, 2023

Summary

PartialEmoji.from_str incorrectly assumes emojis starting with a but not including : are animated

Reproduction Steps

  • Create an emoji that starts with a such as anemoji
  • Save the emoji information as emoji_name:emoji_id, a listed valid representation for PartialEmoji.from_str.
  • Call PartialEmoji.from_str("anemoji:12345678910111213")
  • The returned PartialEmoji assumes that the emoji is animated when it isn't.

Minimal Reproducible Code

>>> my_emoji = PartialEmoji.from_str("anemoji:12345678910111213")
>>> print(repr(my_emoji))
>>> <PartialEmoji animated=True name='nemoji' id=12345678910111213>

Expected Results

I expected following a valid format for PartialEmoji.from_str to return a valid representation of the emoji.

Actual Results

Emojis with names starting with a are incorrectly assumed to be animated despite missing the animated separator.

Intents

all

System Information

  • Python v3.11.4-final
  • discord.py v2.3.0-final
  • aiohttp v3.8.4
  • system info: Linux 5.15.90.2-microsoft-standard-WSL2 SMP Fri Jun 2 00:45:15 UTC 2023

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

@TrustyJAID TrustyJAID added the unconfirmed bug A bug report that needs triaging label Jun 20, 2023
@Rapptz Rapptz added bug This is a bug with the library. and removed unconfirmed bug A bug report that needs triaging labels Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug with the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants