LawMixer

11

Jul 3rd, 2023
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. from interactions import Extension, slash_command, Client
  2. from interactions_restful import route
  3.  
  4. from flask import request, Flask
  5.  
  6.  
  7. class MyExtension(Extension):
  8. def __init__(self, client: Client):
  9. self.client = client
  10.  
  11. @route("POST", "/<guildId>/post")
  12. async def index(self, guildId):
  13. jsonData = request.json
  14.  
  15. guild = await self.client.fetch_channel(guildId)
  16. print(guild)
  17.  
  18. return {"data": "hello interactions.py"}
Advertisement
Add Comment
Please, Sign In to add comment