From c5414c752c020b8d954ee29b7cd38ab8168fd450 Mon Sep 17 00:00:00 2001 From: tookender Date: Sat, 4 May 2024 20:01:09 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Some=20debugging=20and=20name=20cha?= =?UTF-8?q?nge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/ipc/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/ipc/__init__.py b/extensions/ipc/__init__.py index dc3008f..544f56b 100644 --- a/extensions/ipc/__init__.py +++ b/extensions/ipc/__init__.py @@ -12,13 +12,13 @@ def __init__(self, bot: Korii): self.app = app self.router = app.router self.router.add_route("get", "/ping", self.ping) - self.router.add_route("post", "/in_server", self.is_in_server) + self.router.add_route("post", "/is_in_guild", self.is_in_guild) self.bot.loop.create_task(self._start()) async def ping(self, _) -> Response: return json_response({"latency": self.bot.latency * 1000}) - async def is_in_server(self, request: Request) -> Response: + async def is_in_guild(self, request: Request) -> Response: data = await request.json() guild = data.get("guild") @@ -27,7 +27,7 @@ async def is_in_server(self, request: Request) -> Response: else: in_server = False - return json_response({"in_server": in_server}) + return json_response({"is_in_guild": in_server, "guild": int(guild)}) async def _start(self): await self.bot.wait_until_ready()