-
I am having a little trouble trying to get the blueprints working with Quart implementation. Are you able to add an example to your examples for using quart? I currently have it all in one file which works great, but its started to get to crowded and needs to get broken up. My docker container shows following error when I try with current examples.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Using Quart vs Flask shouldn't impact the blueprint registration part of things--pretty much the only difference internally between how this library handles Flask and Quart is inside the call to From the error you posted, it seems like you're calling
When I get a chance, I'll write up a better example of blueprint usage with Quart. I agree that it would be good to have! |
Beta Was this translation helpful? Give feedback.
Using Quart vs Flask shouldn't impact the blueprint registration part of things--pretty much the only difference internally between how this library handles Flask and Quart is inside the call to
DiscordInteractions.set_route
, so declaring blueprints in Flask vs Quart should be exactly the same. When I get a chance, I'll write up an example to verify this.From the error you posted, it seems like you're calling
discord.register_blueprint()
with a function instead of aDiscordInteractionsBlueprint
object. Regardless of if you're using Flask or Quart, you need to define your blueprint as aDiscordInteractionsBlueprint
, not aFlask.Blueprint
or aQuart.Blueprint
.