I have some difficulties with my Discord Bot! (Development Server Issue)

Hello! I made a Discord Bot while following the freecodecamp video tutorial on YouTube. Less than 24 hours later, I am experiencing a syntax error porblem within my code!

The syntax error on the code points to line 43, where the it says it says client.run(my_secret)

The syntax error throws out a whole block of code, File “main.py”, line 43, in
client.run(my_secret), followed by a few dozen errors. I am not sure on how to fix this, and would be helpful if someone would be able to show me, as I am new to Python!

Edit: I have just recognised this issue: “WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.” Would anyone know how to fix this, or what the solution for this issue is? Thanks!

Where is the code deployed?
I’m not sure if discord bots should run under WSGI servers
Perhaps your deployment is slightly-misconfigured and it thinks of the application as a Flask/Django application?

Moreover, the WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. message isn’t an error, it’s a warning. I think the application should run fine.
In most cases, it’s better to deploy on production WSGI environments(Gunicorn is a popular choice)

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