I am trying to invite my Discord.js bot to a server but whenever I use the URL, it says CLIENT_ID "(my client ID is in here)" is not snowflake.
What does this mean, I've looked about but haven't seen any fixes to this problem. My redirect URI is with CLIENTID as my client ID. I'm not fully sure on how to use a redirect URI properly, as for my other bot(in python) I didn't need it.
2 Answers
I had this same issue, for me it turns out my client id ended up having a semicolon at the end because Prettier auto-appended it to my .env file.
Try printing out your client ID and make sure it's just a string of numbers like this
CLIENT_ID = "123456789876543210" with no other characters in it
This appears to be an issue with the ID you substituted into the URL, double check the ID you provided is right and corresponds to the bot; if this turns up okay, I would recommend generating an invite URL through the Discord developer portal.
If you navigate to the Discord Developer Portal and click on the application you want to invite (your discord.js bot) it will open the application's page. From there click OAuth2 on the side panel then URL Generator and select the scopes and permissions you want for the bot and Discord will generate the URL for you.
On a side note, the programming library or language you use will have not affect on the invite link.
3