Ask coding questions

← Back to all posts
Why dosent quart-discord work on repl.it
Subscribe2 (0)

SO there is a module called quart-discord.It is simular to Flask.Meaning it makes a website using python.I cant get the window to open.Can someone help getting it to work.And if not replit team can you please make it possible.For stuff like dashboard's/websites for discord.py its handy but not compadible

Comments
hotnewtop
xfinnbar (81)

You're looking for Quart, not quart-discord. Use the packages menu to install it. quart-discord is an extension for Quart that allows you to create a "sign in with discord" button on your site. If you need this functionality, you can install both Quart and quart-discord. Also, Flask can be used alongside Discord.py like so:

from flask import Flask
from threading import Thread

app = Flask('')

@app.route('/')
def main():
    return 'Website!'

def run():
    app.run(host='0.0.0.0', port=8080)

def b():
    server = Thread(target=run)
server.start()

Put that code BEFORE client.run("token")
Although Flask does work, Quart is asynchronous so it is much faster.

Subscribe2 (0)

@xfinnbar
Thanks a lot,I would have perfered Quart though because like you said "its faster".I meant on the console it showed "running on port insert port name here ".I wanted it to open up a new window kind of like the HTML view,or the FLASK view.

xfinnbar (81)

@Subscribe2 If you want to use Quart, import asyncio and then put this on the bottom of your script instead of bot.run(token) or client.run(token):

https://pastebin.com/uWaQh0ZK

This code may need adjusted as it is pseudocode and is untested.