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(GuildMember): add dmChannel getter #8281
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -210,6 +210,15 @@ class GuildMember extends Base { | |||
return this.user.id; | |||
} | |||
|
|||
/** | |||
* The DM between the client's user and this member |
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.
Might be worth mentioning that it only returns the channel if it is cached (I know the description is the same as the User class and the private method, but perhaps those should be updated too)
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.
I think that's implicit when you make a property a getter and make it nullable, isn't it?
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.
I don't know. One could assume it returns null
if the channel does not exist 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.
hmm not sure, it's still a getter and all getters rely on cache (or almost all) so I don't think it's necessary. If a maintainer does I can change this and the other descriptions so I'll keep this open until one of them resolves it
b2e9841
to
c1ac5b2
Compare
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.
Sure
Please describe the changes this PR makes and why it should be merged:
This PR adds the dmChannel getter to the GuildMember class, similar to the one on the User class. If there's the createDM and deleteDM methods it only makes sense to have this
Status and versioning classification: