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(GuildChannel): createInvite target options #5514

Merged
merged 17 commits into from May 11, 2021

Conversation

almostSouji
Copy link
Member

@almostSouji almostSouji commented Apr 9, 2021

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

Invite accepts a target as documented in:

Target can be a user (has to be streaming in the VC the invite targets) or an embedded application (has to play VC activity in the VC the invite targets).

image

In order to facilitate this the following changes have been made:

  • IntegrationApplication: add missing properties to
  • GuildChannel: .createInvite(...) add and handle option keys targetType, targetUser and targetApplication
  • Introduce ApplicationResolvable typedef
  • QoL: Invite#targetUser should be "of this invite", "for" is used for creation
  • QoL: specify ClientApplication#cover to be the hash
  • ⚠️ QoL: rename TargetUser to TargetType (more in line with actual function)
  • ⚠️ QoL: rename Application#coverImage to #coverURL for consistency with other CDN getters

TODO:

  • What does hook (boolean) indicate in application data?
  • What does verify_key (string) indicate in application data?
  • Document and handle verify_key

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • 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)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

@almostSouji
Copy link
Member Author

almostSouji commented Apr 9, 2021

Later extended and corrected in discord/discord-api-docs#2690 updated OP

@almostSouji almostSouji marked this pull request as draft April 9, 2021 19:09
@almostSouji almostSouji force-pushed the feat/invite-target branch 2 times, most recently from 1236880 to 38c60f3 Compare April 10, 2021 11:21
@almostSouji almostSouji force-pushed the feat/invite-target branch 2 times, most recently from ff9e8e6 to 4fa4136 Compare April 11, 2021 01:22
@almostSouji almostSouji marked this pull request as ready for review April 12, 2021 08:49
src/structures/IntegrationApplication.js Outdated Show resolved Hide resolved
src/structures/IntegrationApplication.js Outdated Show resolved Hide resolved
Copy link
Member

@kyranet kyranet left a comment

Choose a reason for hiding this comment

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

For consistency with many other methods (e.g. Guild#iconURL, Guild#splashURL, User#avatarURL, etc):

src/structures/interfaces/Application.js Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
src/structures/IntegrationApplication.js Outdated Show resolved Hide resolved
src/structures/IntegrationApplication.js Outdated Show resolved Hide resolved
src/structures/IntegrationApplication.js Outdated Show resolved Hide resolved
src/structures/Invite.js Outdated Show resolved Hide resolved
src/structures/Invite.js Outdated Show resolved Hide resolved
src/structures/GuildChannel.js Outdated Show resolved Hide resolved
almostSouji and others added 10 commits May 10, 2021 13:30
src/structures/GuildChannel.js Outdated Show resolved Hide resolved
@iCrawl iCrawl merged commit f831872 into discordjs:master May 11, 2021
@almostSouji almostSouji deleted the feat/invite-target branch May 12, 2021 18:56
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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.

None yet

7 participants