#Webhook Events
1 messages · Page 1 of 1 (latest)
Hey! Once your issue is solved, press the button below to close this thread!
there is - i would firstly recommend fastapi as it is actually asynchronous, but regardless it should be possible to create some type of interop where both your bot and fastapi are listening at the same time
admittedly how is something i would have to research
you likely can combine your bot starting via astart with this: https://www.uvicorn.org/#config-and-server-instances
The lightning-fast ASGI server.
ie (code not verified):
async def main():
config = uvicorn.Config(app, port=8000)
server = uvicorn.Server(config)
# if you use python 3.11, a TaskGroup is better, but for 3.10...
await asyncio.gather(server.serve(), bot.astart())
wait a sec we have a package lol
right, https://github.com/interactions-py/restful might make your life easier
An extension library for interactions.py allowing runtime API structures. - GitHub - interactions-py/restful: An extension library for interactions.py allowing runtime API structures.
Is this updated for v5?
yep
Im a biut confused how to use the @route decorator. Like how to get data from the route in my response