I’m trying to make my bot loop statuses now, and everytime I fix all the errors literally nothing pops up in the console. I’ve waited around 10 minutes just in case. If you see any other errors/bugs in my code please tell me.
Here’s the code that makes it like that:
You have some things that need to fix first, like, message.content == ("susman!") should be message.content == "susman!" . The way you are doing it, you’re comparing a string to a tuple.
You are runnning the flaskapp along with the bot, don’t do that (each of these processes do different things and need to be run independently of one another.). Create another file to run your FlaskApp like server.py and put your code there:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Bot up and running"
if __name__ == '__main__':
app.run(host="0.0.0.0",debug=True,port=8080)
Another thing, this part is not necessary too: await client.wait_until_ready(), since the event on_ready() is only called after the client is already connected and ready (so that makes client.wait already true).
As far as python is concerned, that’s actually not a tuple. IIRC, python doesn’t count it as a tuple unless there’s more than one element, or it’s something like ("susman!",).