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

feat(Message): new message types #905

Merged
merged 12 commits into from
Jan 10, 2023

Conversation

Victorsitou
Copy link
Member

@Victorsitou Victorsitou commented Jan 5, 2023

Summary

discord/discord-api-docs#5815

I don't know what's the content of interaction_premium_upsell and guild_application_premium_subscription, neither their description, so I left it as TBD. Also, it seems that stage_raise_hand isn't shown in the UI (that's why I didn't add it to Message.system_message)

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running task lint
    • I have type-checked the code by running task pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@shiftinv shiftinv added t: enhancement New feature t: api support Support of Discord API features s: needs review Issue/PR is awaiting reviews labels Jan 5, 2023
@shiftinv shiftinv added this to the disnake v2.8 milestone Jan 5, 2023
@Victorsitou Victorsitou marked this pull request as draft January 7, 2023 22:38
Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far!
Good catch on the MessageType literal, looks like that one was slightly outdated.

Regarding system_content:

  • Type 26 is the message type of an (ephemeral?) interaction response that can be sent by applications with premium subscriptions; that one should just be return self.content, as far as I can tell.
  • Type 32 should be something like f"{self.author.name} upgraded {application_name} to premium for this server! 🎉", where application_name is self.application.get("name") if present, or "a deleted application" if not.

docs/api.rst Outdated Show resolved Hide resolved
Victorsitou and others added 4 commits January 10, 2023 13:43
Co-authored-by: shiftinv <8530778+shiftinv@users.noreply.github.com>
Signed-off-by: Victor <67214928+Victorsitou@users.noreply.github.com>
@Victorsitou Victorsitou marked this pull request as ready for review January 10, 2023 16:52
disnake/message.py Outdated Show resolved Hide resolved
Victorsitou and others added 3 commits January 10, 2023 15:37
Co-authored-by: shiftinv <8530778+shiftinv@users.noreply.github.com>
Signed-off-by: Victor <67214928+Victorsitou@users.noreply.github.com>
Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@shiftinv shiftinv merged commit 479ea23 into DisnakeDev:master Jan 10, 2023
@onerandomusername onerandomusername removed the s: needs review Issue/PR is awaiting reviews label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: api support Support of Discord API features t: enhancement New feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants