error when deploying discord bot
ive made a
token
variable. am i supposed to make another?22 Replies
Project ID:
N/A
You are using your token environment variable to login as the bot, correct?
yes
Are you trying to access privileges intents with your bot?
client.login(process.env.token);
im trying to host the botI understand, but that error is from the Discord api, not railway
and do you have a
token
service variable in railway?yes
can you show us
in my
.env
that is not a railway service variable
It’s best practice not to use .env files
You want to add it to the service through the dashboard on railway
oh mb one sec
But the error you are receiving is not related to your token. It is related to something you are trying to do
true
The issue is in your
handleCommands.js
file
You must be trying to access privileges intents but don’t have them turned on in your discord developer dashboard for your botcould it be the
clientId
?
i have all 3 turned onCan you share the handleCommands file?
sure one sec lemme put in sourcebin
The issue seems to be with you trying to use a put. There is something else going on there. It’s hard to debug, with just the one file, but you are not allowed to do what you are trying to do, and discord is blocking it
damn
so no fix?
I would review the discord.js docs and see if you can find a solution. But you should not need to make api calls to register your slash commands