Prune thingy

This commit is contained in:
nsde 2023-09-04 13:24:28 +02:00
parent 2007b966d4
commit 47af56283b

View file

@ -15,10 +15,8 @@ async def start(client):
user_roles = {member.id: [role.name for role in member.roles] for member in members} user_roles = {member.id: [role.name for role in member.roles] for member in members}
return user_roles return user_roles
async def get_roles(request): app.router.add_get('/get_roles', lambda request: aiohttp.web.json_response(get_userinfo()))
return aiohttp.web.json_response(await get_userinfo()) app.router.add_get('/user_ids', lambda request: aiohttp.web.json_response([member.id for member in client.get_guild(int(os.getenv('DISCORD_GUILD'))).members]))
app.router.add_get('/get_roles', get_roles)
app.router.add_get('/ping', lambda request: aiohttp.web.Response(text='pong')) app.router.add_get('/ping', lambda request: aiohttp.web.Response(text='pong'))
runner = aiohttp.web.AppRunner(app) runner = aiohttp.web.AppRunner(app)