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

Introduce optional API calling to RestInteraction #2281

Merged
merged 7 commits into from
May 18, 2022

Conversation

csmir
Copy link
Collaborator

@csmir csmir commented May 1, 2022

In a previous PR (#2276) I opted to implement a number of breaking changes to achieve the same result as in this PR. After serious revision, I decided to completely revert this approach and start over. Considering the amount of data passed over interactions, even partial objects are enough to populate interactions enough to be functional, even for the interaction service.

Changes

This PR does not break anything for users that plan on keeping this behavior. A new configuration option has been introduced at Rest level to allow users to disable API calls on interaction creation.

The properties Channel and Guild will be null as a result of the above, and some values from app-command Data will not be fully populated. There is no way around this, even if we turn the properties lazy. These calls were forced on creation, there would be no point to lazy calling because it would be done directly. ChannelId and GuildId have been introduced to be able to manually make API calls if desired.

@csmir csmir marked this pull request as ready for review May 15, 2022 14:24
@csmir csmir requested a review from quinchs May 15, 2022 14:24
@quinchs quinchs merged commit a24dde4 into discord-net:dev May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants