-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add support for attachment flags #9486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the library is_
methods are always methods, i.e. callable. Since these are properties/flags you need to remove the is_
prefix.
As those are always methods. Rapptz#9486 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
@flag_value | ||
def clip(self): | ||
""":class:`bool`: Returns ``True`` if the attachment is a clip.""" | ||
return 1 << 0 | ||
|
||
@flag_value | ||
def thumbnail(self): | ||
""":class:`bool`: Returns ``True`` if the attachment is a thumbnail.""" | ||
return 1 << 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these are undocumented on Discord's side but it sure would be nice to know what these even are for better documentation and maybe better naming, but this won't block this PR.
Summary
This PR adds support for attachment flags.
Depends on discord/discord-api-docs#6272
Checklist