-
Notifications
You must be signed in to change notification settings - Fork 14
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
refactor(interactions): use the new channel
field
#63
Conversation
f4dee7a
to
31cb6cb
Compare
index.d.ts
Outdated
@@ -69,6 +69,7 @@ declare namespace Dysnomia { | |||
type GuildTextableChannel = TextChannel | TextVoiceChannel | NewsChannel | StageChannel; | |||
type GuildTextableWithThreads = GuildTextableChannel | AnyThreadChannel; | |||
type InviteChannel = InvitePartialChannel | Exclude<AnyGuildChannel, CategoryChannel | AnyThreadChannel>; | |||
type PossiblyUncachedInteractionChannel = Textable | { id: string; type: ChannelTypes }; |
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.
Maybe use Pick<Channel, 'id' | 'type'>
?
or use a new interface on line 63?
interface UncachedChannel extends Uncached { type: ChannelTypes }
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.
Textable also doesn't have any channel related properties, is there a better type we can use?
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.
Maybe TextableChannel | PartialChannel
would be a better choice?
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.
Yeah, I agree.
Also, type in PartialChannel is a number instead of ChannelTypes. Something to update here?
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.
Definitely something to tackle (in a different PR)
* refactor(interactions): use the new `channel` field Ref: discord/discord-api-docs@88a7618 * use a better type for PossiblyUncachedInteractionChannel
* refactor(interactions): use the new `channel` field Ref: discord/discord-api-docs@88a7618 * use a better type for PossiblyUncachedInteractionChannel
Ref: discord/discord-api-docs@88a7618