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

fix(MessageComponentInteraction): component getter is not null anymore #6835

Merged
merged 6 commits into from Oct 24, 2021

Conversation

chrdek
Copy link
Contributor

@chrdek chrdek commented Oct 14, 2021

Please describe the changes this PR makes and why it should be merged:

This refers issue #6481 - The component getter of a MessageComponentInteraction cannot be null.
Removed null coal. from both TS typings/main getter of the component.

(following init commit of d6e6244)

 
Status and versioning classification:

  • This includes updates on typings index.d.ts and MessageComponentInteraction core structures.
  • Testing layer remains -as-is.

@ImRodry
Copy link
Contributor

ImRodry commented Oct 14, 2021

Update typings and also please follow the PR template

@chrdek
Copy link
Contributor Author

chrdek commented Oct 14, 2021

no problem. will do

[Update 16:56]: Added relevant changes to typings, PR adheres to template now.

Updated typings/index.d.ts
Copy link
Contributor Author

@chrdek chrdek left a comment

Choose a reason for hiding this comment

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

updated relevant files.

src/structures/MessageComponentInteraction.js Outdated Show resolved Hide resolved
Copy link
Contributor Author

@chrdek chrdek left a comment

Choose a reason for hiding this comment

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

changes applied to MessageCompInteraction

src/structures/MessageComponentInteraction.js Outdated Show resolved Hide resolved
Copy link
Contributor Author

@chrdek chrdek left a comment

Choose a reason for hiding this comment

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

changes according to ESLint.

Copy link

@PuneetGopinath PuneetGopinath left a comment

Choose a reason for hiding this comment

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

Maybe change title to fix(MessageComponentInteraction): component getter is not nullable anymore

@chrdek chrdek changed the title Update MessageComponentInteraction.js fix(MessageComponentInteraction): component getter is not null anymore Oct 19, 2021
@chrdek
Copy link
Contributor Author

chrdek commented Oct 19, 2021

Changed title to the standard of template.

@monbrey
Copy link
Member

monbrey commented Oct 19, 2021

Couldn't this still be null in a partial Message?

@chrdek
Copy link
Contributor Author

chrdek commented Oct 19, 2021

Hi, from another quick view around the codebase, I believe MessageComponent itself doesn't set any null data irrespective of any partial or normal message event updates in it.

Check out file:
../src/structures/Message.js at lines 327-347 partial interactions and 365,366 partial getters.

The updates mentioning the changed lines of issue #6481 include customId which also cannot be null /whole component cannot default to null.

@iCrawl iCrawl merged commit 7621e9d into discordjs:main Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants