Ask coding questions

← Back to all posts
Discord bot output keeps resulting with "SyntaxError: Unexpected token '?' "
nguyenpaul51

So im trying to make the discord bot but the output was like this

is there a way to fix this

Voters
KeaganLandfried
nguyenpaul51
Comments
hotnewtop
MrVoo

Isn't the ? operator only one question mark? Try that

KeaganLandfried

I am not familiar with Discord.js, but I use Discord.py extensively. You need to make sure you are properly declaring your token (with no syntax errors of course). That error is likely caused by an issue with the token not being read.