File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,12 @@ An Extension library to add Fast API for your interactions.py bot .
1111
1212``` python
1313import interactions
14- from interactions.ext.api import setup
14+ from interactions.ext.fastapi import setup
1515
1616client = interactions.Client(... )
1717api = setup(client)
1818
19- @api.route ( " GET " , " /" )
19+ @api.get ( " /" )
2020async def index ():
2121 return {" status" : " success" }
2222
Original file line number Diff line number Diff line change 44from fastapi import WebSocket , WebSocketDisconnect
55
66import interactions
7- from interactions .ext .api import setup
7+ from interactions .ext .fastapi import setup
88
99load_dotenv ()
1010
@@ -27,7 +27,7 @@ async def index():
2727 return {"test" : "yay" }
2828
2929
30- @api .route ( " get" , "/guilds/{guild_id}/members/{member_id}" )
30+ @api .get ( "/guilds/{guild_id}/members/{member_id}" )
3131async def test (guild_id : int , member_id : int ):
3232 for guild in bot .guilds :
3333 if int (guild .id ) == guild_id :
Original file line number Diff line number Diff line change 11from interactions import Extension , extension_command
2- from interactions .ext .api import route
2+ from interactions .ext .fastapi import route
33
44
55class Cog (Extension ):
You can’t perform that action at this time.
0 commit comments