Skip to content

Conversation

@Syjalo
Copy link
Contributor

@Syjalo Syjalo commented Aug 5, 2022

Please describe the changes this PR makes and why it should be merged:
This PR splits CommandInteractionOptionResolver to make methods visible in the docs only what are available in the context.

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

@vercel
Copy link

vercel bot commented Aug 5, 2022

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

Name Status Preview Updated
discord-js ✅ Ready (Inspect) Visit Preview Aug 10, 2022 at 5:51PM (UTC)

@vercel vercel bot temporarily deployed to Preview August 5, 2022 11:05 Inactive
@Jiralite Jiralite added this to the discord.js v14.2 milestone Aug 5, 2022
@monbrey
Copy link
Member

monbrey commented Aug 7, 2022

I don't see how this split is correct?

Why are the methods for subcommands, subcommand groups and the primitive types (string, number, integer, boolean) removed from the AutocompleteInteractionOptionResolver? They should all still work, as the value doesn't require any resolved structures.

I thought the issue was only that Discord doesn't send resolved data for Users/GuildMembers, Roles and Channels in AutocompleteInteraction.

Also this is 100% breaking. You changed the interface.

@Rebazkoye

This comment was marked as off-topic.

@vercel vercel bot temporarily deployed to Preview August 10, 2022 17:52 Inactive
@iCrawl iCrawl requested a review from vladfrangu August 12, 2022 03:10
@iCrawl iCrawl added the blocked label Aug 15, 2022
@Jiralite Jiralite removed this from the discord.js v14.3 milestone Aug 17, 2022

/**
* The options passed to the command
* @type {CommandInteractionOptionResolver}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @type {CommandInteractionOptionResolver}
* @type {AutocompleteInteractionOptionResolver}


/**
* The options passed to the command.
* @type {CommandInteractionOptionResolver}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @type {CommandInteractionOptionResolver}
* @type {ChatInputCommandInteractionOptionResolver}

super(client, data);
/**
* The target of the interaction, parsed into options
* @type {CommandInteractionOptionResolver}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @type {CommandInteractionOptionResolver}
* @type {ContextMenuCommandInteractionOptionResolver}

@Jiralite Jiralite added this to the discord.js 15.0.0 milestone Jul 31, 2024
@Jiralite Jiralite removed the blocked label Oct 1, 2024
@Qjuh
Copy link
Member

Qjuh commented Mar 30, 2025

No idea if this PR is still meant to be implemented.

  • If it is then I got the question why MessageContextMenuInteraction and UserContextMenuInteraction would still share the same CommandInteractionOptionResolver having both methods for getUser() and getMessage(), as the split seems to only be done partially.
  • If it isn't then maybe this PR should be closed

@Syjalo Syjalo marked this pull request as draft March 30, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Review in Progress

Development

Successfully merging this pull request may close these issues.

8 participants