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: interactions #5448

Merged
merged 94 commits into from
May 7, 2021
Merged

feat: interactions #5448

merged 94 commits into from
May 7, 2021

Conversation

vaporoxx
Copy link
Contributor

@vaporoxx vaporoxx commented Mar 30, 2021

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

Attempt #​2! Most of the logic is taken from #5106, but with a giant refactor, most notably the interaction client class being removed and an application command manager class being added. To see a quick example of how this branch is structured, have a look here.

Additionally, this PR also adds the new USE_APPLICATION_COMMANDS permission, the APPLICATION_COMMAND message type and the EPHEMERAL and LOADING message flags.

Status and versioning classification:

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

src/structures/ApplicationCommand.js Outdated Show resolved Hide resolved
src/structures/ApplicationCommand.js Outdated Show resolved Hide resolved
src/structures/ApplicationCommand.js Outdated Show resolved Hide resolved
src/structures/CommandInteraction.js Outdated Show resolved Hide resolved
Copy link
Contributor

@izexi izexi left a comment

Choose a reason for hiding this comment

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

Just some minor nits

src/managers/ApplicationCommandManager.js Outdated Show resolved Hide resolved
src/managers/ApplicationCommandManager.js Outdated Show resolved Hide resolved
src/structures/Interaction.js Outdated Show resolved Hide resolved
src/structures/ApplicationCommand.js Outdated Show resolved Hide resolved
src/structures/CommandInteraction.js Show resolved Hide resolved
src/structures/CommandInteraction.js Outdated Show resolved Hide resolved
src/structures/CommandInteraction.js Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
@trulyronak
Copy link

Curious — what still needs to be done to get slash commands in, and how can outside developers in the community help? Really looking forward to being able to use discord.js for slash commands, and would be interested in helping out

@monbrey
Copy link
Member

monbrey commented May 5, 2021

Curious — what still needs to be done to get slash commands in, and how can outside developers in the community help? Really looking forward to being able to use discord.js for slash commands, and would be interested in helping out

There's nothing specific that needs to be done that wouldn't already be in the comments here. The PR is pending reviews and approvals from the maintainers.

We've also had to keep up with ongoing changes from Discord - the API has only reached a state of stability quite recently.

typings/index.d.ts Show resolved Hide resolved
@iCrawl iCrawl merged commit f7643f7 into discordjs:master May 7, 2021
@neolectron
Copy link

🎉

@vaporoxx vaporoxx deleted the feat-interactions branch May 7, 2021 15:30
@gruselhaus
Copy link

Wohoooo 🎉

@Dcai169
Copy link

Dcai169 commented May 7, 2021

Any eta on when this will be part of a release?

@kyranet
Copy link
Member

kyranet commented May 7, 2021

Any eta on when this will be part of a release?

Soon:tm:, we'll go thru all the semver: major PRs and review/merge those, then we'll release v13.

@Flo4604
Copy link

Flo4604 commented May 7, 2021

If someone wanted to use it as I do npm i discordjs/discord.js#master works just fine

@FlyCrafting
Copy link

FlyCrafting commented May 7, 2021

If someone wanted to use it as I do npm i discordjs/discord.js#master works just fine

you can just use npm i discordjs/discord.js because master is default branch

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.

Slash Commands Support