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

Slash Command Builder fails to run when type is set to module #8263

Closed
flaxeneel2 opened this issue Jul 10, 2022 · 3 comments
Closed

Slash Command Builder fails to run when type is set to module #8263

flaxeneel2 opened this issue Jul 10, 2022 · 3 comments

Comments

@flaxeneel2
Copy link

Which package is this bug report for?

builders

Issue description

  1. Set up a basic project with @discordjs/builders as a dependency
  2. Create a new slash command using the builder
  3. Test to see if it works with commonjs
  4. Set "type" to "module" in package.json
  5. It will error with the error below.
    image
    (First run was me testing with commonjs, which does work)

Code sample

package.json:

{
  "name": "testarea",
  "version": "1.0.0",
  "description": "",
  "type": "module",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

index.js:

import builder from "@discordjs/builders"

let cmd = new builder.SlashCommandBuilder()
        .setName("testcmd")
        .setDescription("test test")
        .addUserOption(option => option.setName("user").setDescription("The user to test").setRequired(true))

console.log(cmd.toJSON())


### Package version

@discordjs/builders@0.15.0

### Node.js version

18.5.0

### Operating system

Windows 11

### Priority this issue should have

Medium (should be fixed soon)

### Which partials do you have configured?

No Partials

### Which gateway intents are you subscribing to?

No Intents

### I have tested this issue on a development release

_No response_
@imranbarbhuiya
Copy link
Contributor

it's an issue with shapeshift please report it there. https://github.com/sapphiredev/shapeshift

@imranbarbhuiya
Copy link
Contributor

imranbarbhuiya commented Jul 10, 2022

sapphiredev/shapeshift#155 will fix it. Till then pin the shapeshift version to 3.4.x

@flaxeneel2
Copy link
Author

Ah okay. Thank you

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants