Hello,
I am trying to run a Flask app and to run Nextcord bot at the same time, same file.
I tried to use this gist but it doesn’t seem to work.
Are there any ways to solve this problem?
Thanks, Matan.
Hello,
I am trying to run a Flask app and to run Nextcord bot at the same time, same file.
I tried to use this gist but it doesn’t seem to work.
Are there any ways to solve this problem?
Thanks, Matan.
In what way does it not work? Please provide an error/exception
Two things:
Nevermind, I solved the problem using this code:
from threading import Thread
from quart import Quart
from functools import partial
from nextcord.ext import commands
app = Quart(__name__)
bot = commands.Bot()
bot.loop.create_task(app.run_task(host="0.0.0.0", port=81, debug=True))
bot.run("Your token")
I switched from Flask to Quart
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.