Ask coding questions

← Back to all posts
Question
lovelyleah7031 (0)

So uhm i am trying to create a new repl(discord bot). There were no errors in my coding but it kept telling me this in the console "/home/runner/Amore/node_modules/discord.js/src/rest/RESTManager.js:32
const token = this.client.token ?? this.client.accessToken;
^

SyntaxError: Unexpected token '?'". Its my first time seeing this so i am pretty confused

Comments
hotnewtop
CodingElf66 (321)

I suggest you look at this tutorial (https://realpython.com/how-to-make-a-discord-bot-python/), hopefully it helps!