-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
fix(APIChannel): correctly type name
based on channel type
#666
fix(APIChannel): correctly type name
based on channel type
#666
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Can you apply it to the other channel types to make name non-nullable 🙏 |
bddd998
to
75ffe81
Compare
75ffe81
to
dcf9914
Compare
Done, I've made the Guild/DM channel types more specific regarding whether their |
Just so we're safe there's no regressions, can you add some tests too please? 🥺 |
Done, I've only tested the |
I'm quite unsure as to why the CI build is failing telling me I didn't build the Deno types, edit: scripts have done weird stuff, fixed it 😅 |
dcbfcb8
to
a11c4eb
Compare
a11c4eb
to
9ccfcaa
Compare
deno/payloads/v10/channel.ts
Outdated
/** | ||
* The name of the channel (1-100 characters) | ||
*/ | ||
name?: string; |
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.
Guild channels will always have a name
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
oof, GitHub's re-request thing dropped the other reviewers 💀 |
name
based on channel type
Please describe the changes this PR makes and why it should be merged:
Types incorrectly assume PartialChannel objects will always have a name.
In some circumstances, PartialChannels may be DM channels, which do have a null name.
Also fixes the comment about minimum name length.
If applicable, please reference Discord API Docs PRs or commits that influenced this PR:
This change aligns with the already documented Channel data structure