Syntax error

async execute(interaction) { ^^^^^ SyntaxError: Unexpected token 'async' at internalCompileFunction (node:internal/vm:77:18) at wrapSafe (node:internal/modules/cjs/loader:1288:20) at Module._compile (node:internal/modules/cjs/loader:1340:27) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 Node.js v20.10.0
4 Replies
d.js toolkit
d.js toolkit5mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Fisch
Fisch5mo ago
Don't know why, even though I have node.js v20
AlexCdDg
AlexCdDg5mo ago
You have a syntax error in one of your files, it doesn't have to do anything with node version nor discord.js
treble/luna
treble/luna5mo ago
also just basic js in general
Want results from more Discord servers?
Add your server
More Posts
DiscordAPIError[50035]: Invalid Form BodyAfter yesterdays scheduled restart, the following error appears after a button interaction reply. ThIssue with guild.roles.create()I am trying to create a role with discord.js, using guild.roles.create(). The promise this function Interaction already deferred.https://github.com/KiraKenjiro/bot The bot at the moment works almost *perfectly*. qj's been a saviHow to add support for private slash commandsNot a big Discord user so lots of common stuff I don't know. But I've made a bot for use just in oneSelecting the same Slash Command option multiple timesHello. Currently learning the basics of Discord.js, I was wondering if it supported selecting the saDiscord Error Code 10015 when using a collector to handle button eventsHello! I am working on a bot Im on the development team with and I dont know how to fix this issue. How would I send an interaction user a message DM?Currently trying to send a user a DM, I've had a quick scope at the docs and Noticed `createDM`, NoDiscord TTS botHi there I am trying to create a discord bot where it would join a vc that I am in and when I use !tHow to retrieve original command interaction options from select menu interaction?Hi people, I am trying to figure out if it's possible to retrieve CommandInteraction options from a When I interact, whether creating ephemeral messages or editing (editReply) it doesn't workWhen I interact with a dropdown or button, whether to edit or create a new ephemera message, it does