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

feat: restore missing typeguards #8328

Merged
merged 2 commits into from Jul 25, 2022
Merged

Conversation

monbrey
Copy link
Member

@monbrey monbrey commented Jul 21, 2022

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

This restores the following typeguard methods:

  • BaseInteraction#isAutocomplete()
  • BaseInteraction#isCommand()
  • BaseInteraction#isMessageComponent()
  • BaseInteraction#isModalSubmit()

While I agree with the principle that helper methods should not be provided where single equality checks suffice (e.g. channel typing) that principle cannot be consistently applied to Interaction types. For that reason, I believe having a consistent and intuitive library interface should take a higher priority.

  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

Closes #8321 if merged

@vercel
Copy link

vercel bot commented Jul 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
discord-js ⬜️ Ignored (Inspect) Jul 21, 2022 at 11:20AM (UTC)

@vercel vercel bot temporarily deployed to Preview July 21, 2022 02:45 Inactive
@vercel vercel bot temporarily deployed to Preview July 21, 2022 02:45 Inactive
@Jiralite Jiralite added this to the discord.js v14.1 milestone Jul 21, 2022
@monbrey
Copy link
Member Author

monbrey commented Jul 21, 2022

Closes #8321 if merged

Copy link

@Chr1s70ph Chr1s70ph left a comment

Choose a reason for hiding this comment

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

Looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

isModalSubmit typeguard for BaseInteraction
6 participants