mirror of
https://github.com/MrSedan/neuro-reply-bot-reworked.git
synced 2026-01-14 21:49:42 +03:00
Started migrating to backend work
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from aiohttp import ClientSession
|
||||
|
||||
from .api_method import ApiMethod
|
||||
|
||||
|
||||
@@ -11,7 +12,7 @@ class Admin(ApiMethod):
|
||||
|
||||
async def is_admin(self, id: str):
|
||||
async with ClientSession() as session:
|
||||
response = await session.get(self.api_url+f'admin/is-admin/{id}')
|
||||
response = await session.get(self.api_url+f'/admin/is-admin/{id}')
|
||||
if await response.text() == 'false':
|
||||
return False
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user