big boi shit
@@ -27,7 +27,11 @@ class Events(commands.Cog):
self.web_app = web.Application()
self.web_app.add_routes([web.post("/dbl2", self.on_dbl2_vote)])
- web.run_app(self.web_app)
+
+ self.web_runner = web.AppRunner(self.web_app)
+ self.bot.loop.create_task(self.web_runner.setup())
+ self.site = web.TCPSite(self.web_runner, "localhost", 8000)
+ self.bot.loop.create_task(self.site.start())
def cog_unload(self):
self.bot.loop.create_task(self.dblpy.close())
