You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up a basic project with @discordjs/builders as a dependency
Create a new slash command using the builder
Test to see if it works with commonjs
Set "type" to "module" in package.json
It will error with the error below.
(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_
The text was updated successfully, but these errors were encountered:
Which package is this bug report for?
builders
Issue description
(First run was me testing with commonjs, which does work)
Code sample
index.js:
The text was updated successfully, but these errors were encountered: