mirror of
https://github.com/NovaOSS/nova-cord.git
synced 2024-11-25 18:23:58 +01:00
Compare commits
2 commits
bd332e516f
...
6bf0c7ab5b
Author | SHA1 | Date | |
---|---|---|---|
6bf0c7ab5b | |||
47af56283b |
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue