4 months ago
My Discord bot is hosted on Railway, but it doesn’t deploy the new commands I’ve added.
They’re showing up correctly on GitHub, I’ve redeployed and restarted the bot, and I’ve even retested on Discord, but nothing changes.
This is really strange and I can’t figure out why it’s not updating.
16 Replies
4 months ago
Did you make sure to correctly add the commands with the Discord API? Are you creating global commands or guild commands?
I’m using Discord.js v14 with a full slash command setup.
My bot is hosted on Railway and redeploys fine, but new commands don’t appear. Im registering both global and guild commands automatically through the Discord API…
My environment variables on Railway are:
DEPLOY_GUILD_ID
AI_PROVIDER
openai
OPENAI_API_KEY
OPENROUTER_API_KEY
DISCORD_TOKEN
DISCORD_CLIENT_IDThe bot logs in successfully and prints ✅ Arvio Bot is online! but the new commands don’t show up.
It seems like Railway runs fine, but Discord isn’t syncing the new slash commands.
Do you know if Railway might be blocking outgoing HTTPS calls to Discord’s API for the command registration step?
4 months ago
Have you reloaded your Discord client? Commands can take a bit to show up
4 months ago
Railway doesn't block anything
4 months ago
If you run it locally do the commands show up?
4 months ago
🤨
4 months ago
The commands shouldn't disappear, they haven't right
Nope only the new ones don’t show up for some reason, it doesn’t update on my main on github
It’s fully linked to my main GitHub commits, but Railway just isn’t updating it
4 months ago
Looking at your code, it requires the environment variable AUTO_REGISTER_COMMANDS to be 'true' for it to refresh the commands?

4 months ago
Which I do not see in the list that you provided.
4 months ago
Discord requires that you deploy them globally (which may take an hour to propagate to all guilds) or to a specific guild id which is usually instantly. It’s always done through a script (either upon redeployment to register the new slash commands or if via a custom cli script)
https://discordjs.guide/legacy/app-creation/deploying-commands
