interactions.py
interactions.py copied to clipboard
[FEAT] Add Onboarding API endpoints
Problem Description
The Get Guild Onboarding and Modify Guild Onboarding endpoints seem to be unimplemented. Supporting these would allow bots to change the Onboarding questions, like choosing roles, channels, etc.
Proposed Solution
Add methods named like fetch_onboarding and edit_onboarding to the Guild class.
Alternatives Considered
No response
Additional Information
I'm trying to make a bot that automatically creates channels and updates the Onboarding questions to include the new channels.
Code of Conduct
- [x] I agree to follow the contribution requirements.
Now I've come to think more about this, I think a more interactions-py-nic way of doing this would be to have individual edit methods on Onboarding, OnboardingPrompt, etc. objects, rather than a catch-all edit_onboarding method.
I would like to try and implement this. It's a little complicated because Onboarding has a bunch of OnboardingPrompts, which in turn have a bunch of OnboardingPromptOptions, each of which have ids.
I've come up with the following implementation plan, but I'm not sure if it's the best way to go:
Guildobjects have{fetch,get}_onboardingmethod which gets the onboarding for the guild. It returns anOnboardingobjectOnboardingobjects haveadd_promptanddelete_promptmethods, which manages the prompts, andedit, which edits all other fields- The prompts are
OnboardingPromptobjects, which haveeditmethod that edits themselves
Does anyone have better ideas? If not I'll try to implement it this way. (This is my first somewhat major contribution to an open source project, please point out any mistakes I make!)
We welcome you to create your own pull request where we can attach the issue and keep track of proposed development. #1645 may serve as a formal issue tracker for discussing ideas and implementation details