-
Notifications
You must be signed in to change notification settings - Fork 139
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(Onboarding): add edit method #1011
base: master
Are you sure you want to change the base?
feat(Onboarding): add edit method #1011
Conversation
see d7d4d5bb08d0bba0760a001a80bce4745e441311
Co-authored-by: shiftinv <8530778+shiftinv@users.noreply.github.com> Signed-off-by: Victor <67214928+Victorsitou@users.noreply.github.com>
Co-authored-by: shiftinv <8530778+shiftinv@users.noreply.github.com> Signed-off-by: Victor <67214928+Victorsitou@users.noreply.github.com>
Any updates on this? |
…rsitou/disnake into feat/edit-guild-onboarding
Co-authored-by: shiftinv <8530778+shiftinv@users.noreply.github.com> Signed-off-by: Victor <67214928+Victorsitou@users.noreply.github.com>
…rsitou/disnake into feat/edit-guild-onboarding
disnake/onboarding.py
Outdated
Accesing this during construction will raise an :exc:`ValueError`. | ||
""" | ||
if not self._guild or self.id == 0: | ||
# TODO: better message and error? | ||
raise ValueError("You cannot access this on construction.") |
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.
Accesing this during construction will raise an :exc:`ValueError`. | |
""" | |
if not self._guild or self.id == 0: | |
# TODO: better message and error? | |
raise ValueError("You cannot access this on construction.") | |
Accessing this on manually constructed instances will raise a :exc:`ValueError`. | |
""" | |
if not self._guild: | |
raise ValueError("Roles cannot be resolved on manually constructed instances.") |
something like this, maybe?
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.
If there's a discrepancy between user constructible and api-originating objects, then user constructible shouldn't have that parameter at all
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.
@Enegg So what you're proposing is separating this into something like PartialOnboardingPromptOption
(user constructible) and OnboardingPromptOption
(api model)?
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.
Mhm
Separate types provide a clear distinction of what a user can and cannot do
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.
hmm, yeah. I agree with clear separation being better, however I'm not sure it's worth the effort here... it might be? With the way documentation works, this would mean a bunch of duplication both in the source code and in the built docs, for only a fairly small benefit, though.
The same topic also applies the polls implementation, might revisit this later after giving polls some more thought
…rsitou/disnake into feat/edit-guild-onboarding
Summary
discord/discord-api-docs#6101
blocked by #928Checklist
pdm lint
pdm pyright