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

Add interaction channel field #810

Merged
merged 10 commits into from
Aug 2, 2023

Conversation

NoComment1105
Copy link
Contributor

Implements a partial channel object for this. As there was not one before

discord/discord-api-docs@88a7618

@lukellmann
Copy link
Member

i think there is no need for a new partial channel type, the exisiting DiscordChannel has everything optional except for id and type

@lukellmann
Copy link
Member

any updates on this @NoComment1105 ?

@NoComment1105
Copy link
Contributor Author

I saw this, I read this, I forgot about this. I'll sort it now

Copy link
Member

@lukellmann lukellmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also add a Interaction.channelType property taken from this new channel field

@NoComment1105 NoComment1105 requested a review from lukellmann May 7, 2023 06:11
@NoComment1105
Copy link
Contributor Author

Can this be reviewed please @lukellmann ?

@lukellmann
Copy link
Member

ah yes, forgot about it, will try to get to it today

@lukellmann lukellmann changed the base branch from 0.9.x to main June 17, 2023 13:52
@lukellmann
Copy link
Member

lukellmann commented Jun 19, 2023

after thinking about this for a bit, i think it might actually be better (and would result in way less intrusive changes) to just change the logic for getting the channelId to data.channel.value?.id ?: data.channelId.value!! (i.e. a non-null channelId) in all cases, without adding ChannelInteractionBehavior

what do you think?

@NoComment1105
Copy link
Contributor Author

after thinking about this for a bit, i think it might actually be better (and would result in way less intrusive changes) to just change the logic for getting the channelId to data.channel.value?.id ?: data.channelId.value!! (i.e. a non-null channelId) in all cases, without adding ChannelInteractionBehavior

what do you think?

That sounds better actually, I'll look into doing that ASAP. Sorry I've missed this for so long 😄

@NoComment1105 NoComment1105 requested a review from HopeBaron July 31, 2023 15:26
@NoComment1105
Copy link
Contributor Author

@lukellmann I have made your changes, could you please review them?

Copy link
Member

@lukellmann lukellmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except for all the redundant overrides (only Interaction.channelId should need to be changed) this looks good 👍

Copy link
Member

@lukellmann lukellmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for all the effort 😅

@lukellmann lukellmann merged commit cbba5f3 into kordlib:main Aug 2, 2023
@NoComment1105 NoComment1105 deleted the interaction-channel-field branch August 7, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants