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

Namespace according to API endpoints #943

Open
SQKo opened this issue Oct 14, 2022 · 0 comments
Open

Namespace according to API endpoints #943

SQKo opened this issue Oct 14, 2022 · 0 comments
Assignees

Comments

@SQKo
Copy link
Member

SQKo commented Oct 14, 2022

From beginning the Part class folder structure follows the Discord API documentation sections but from time to time they start separating each object to another page. Then the Part structure becomes inconsistent...

So I'm suggesting to follow the API endpoints, for example Messages are available from /channels/channel.id/messages/message.id, so the folder would be /Channel/Message/ and any of object that is included on it will be put in the parent class folder, and if none of the criteria match then we will fall back to Discord API documentation section.

Things to consider as well that some Part class have same name, placing it in different folders makes IDE autocomplete aliasing to correct namespace, e.g. Member for Guild & Thread when placed in Guild/Member will auto alias to GuildMember and Thread/Member will auto alias to ThreadMember

  • Channel
    • Attachment -> Channel/Message/Attachment
    • Channel
    • Invite
    • Message -> Channel/Message/Message
    • Overwrite
    • Reaction -> Channel/Message/Reaction
    • StageInstance
    • Webhook
  • Embed -> Channel/Message/Embed
    • Author -> Channel/Message/Embed/Author
    • Embed -> Channel/Message/Embed/Embed
    • Field -> Channel/Message/Embed/Field
    • Footer -> Channel/Message/Embed/Footer
    • Image -> Channel/Message/Embed/Image
    • Video -> Channel/Message/Embed/Video
  • Forum -> Channel/Forum
    • Reaction -> Channel/Forum/Reaction
    • Tag -> Channel/Forum/Tag
  • Guild
  • Interactions
  • OAuth
  • Permissions
  • Thread
  • User

WIP*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant