Can't get Discord Bot Deployment to run

I’ve deployed a background worker server for my python Discord bot. All it does is connect and print a message to the Discord server. It works fine when I press “Run” but when I deploy it, the bot never seems to run or connect to Discord.

The file is called test.py and my run command is “python3 test.py”

I added exceptions on os retrieval of keys (and added and checked my keys on deployment config). I also added exceptions on creating the discord object/connection. Neither of these are triggered so I assume it’s fine.

The bot does not seem to even run on the deployment. Any ideas? Any way I can test to see if the app is even loading and running like printing to logs? Deployment logs just show:

5/9/2023, 4:54:10 PM initializing deployment without listening for application ports

Thanks!

That’s unfortunate. I went ahead and used the “Always On” option and that will do for now. Thank you!

Hi, I’m an engineer at Replit who works on the Deployments product. Just wanted to correct the answer you’ve received. There’s no reason that dependencies should be missing from the Deployment. We’re committed to making sure that everything that works in the Replit workspace also works just as well (if not better) in Deployments. If you share your Repl ID with me, or a link to the Repl, I’d be happy to look into the failures that you were noticing.

4 Likes

Here is the link: https://replit.com/@grummz/A-Luna-Discord-Bot

Thanks, I’ll look into it and send you a private message with anything I find!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.