mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-09 20:09:30 +02:00
✔ Remove flask usages
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
import os
|
||||
|
||||
from flask import Flask
|
||||
from flask_discord import DiscordOAuth2Session
|
||||
|
||||
|
||||
discord = DiscordOAuth2Session(client_id=490732332240863233)
|
||||
from quart import Quart
|
||||
from quart_discord import DiscordOAuth2Session
|
||||
|
||||
|
||||
def get_app():
|
||||
app = Flask(__name__)
|
||||
app = Quart(__name__)
|
||||
|
||||
app.secret_key = b"%\xe0'\x01\xdeH\x8e\x85m|\xb3\xffCN\xc9g"
|
||||
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "true" # !! Only in development environment.
|
||||
@@ -18,6 +15,6 @@ def get_app():
|
||||
app.config["DISCORD_BOT_TOKEN"] = os.getenv("DISCORD_BOT_TOKEN")
|
||||
app.config["DISCORD_REDIRECT_URI"] = "http://127.0.0.1:5000/callback"
|
||||
|
||||
discord.init_app(app)
|
||||
app.discord = DiscordOAuth2Session(app, client_id=490732332240863233)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user