Answer the question
In order to leave comments, you need to log in
Why is this code complaining about "multiple values"?
main.py:
def bot_guild_count():
return len(bot.guilds)
mrwolfsite.functions(count=bot_guild_count()).run_this()
from flask import Flask, render_template
app = Flask(__name__)
class functions:
def __init__(count):
count = count
def run():
app.run(host='0.0.0.0', port=8080)
def run_this():
server = Thread(target=run)
server.start()
@app.route("/")
def info_bot():
return render_template('index.html', count=functions.count)
Answer the question
In order to leave comments, you need to log in
Because count
- is an attribute of the object that is created when the class object is initialized. Moreover, it was created incorrectly.
Are you doing some absolutely inadequate nonsense, maybe it’s worth at least learning the basics of Python?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question