Railway Deployment Issue
edissz
HOBBYOP

a month 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.

$10 Bounty

16 Replies

Did you make sure to correctly add the commands with the Discord API? Are you creating global commands or guild commands?


edissz
HOBBYOP

a month ago

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:

The 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?


Have you reloaded your Discord client? Commands can take a bit to show up


Railway doesn't block anything


edissz
HOBBYOP

a month ago

Yup its been a whole day


If you run it locally do the commands show up?


edissz
HOBBYOP

a month ago

Yes they do



The commands shouldn't disappear, they haven't right


edissz
HOBBYOP

a month ago

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


edissz
HOBBYOP

a month ago

1437447990200631600



edissz
HOBBYOP

a month ago

no support 🥀


yellowmacaroni
PRO

a month ago

Looking at your code, it requires the environment variable AUTO_REGISTER_COMMANDS to be 'true' for it to refresh the commands?

1437550209063457000


yellowmacaroni
PRO

a month ago

Which I do not see in the list that you provided.


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


Loading...