mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-04 20:25:25 +02:00
Converted webapp portion to python 3.5. Resolves #32
This commit is contained in:
@ -45,14 +45,14 @@ def user_has_permission(permission, index):
|
||||
return bool((int(permission) >> index) & 1)
|
||||
|
||||
def get_user_guilds():
|
||||
cache = get_keyvalproperty("OAUTH/USERGUILDS/"+make_user_cache_key())
|
||||
cache = get_keyvalproperty("OAUTH/USERGUILDS/"+str(make_user_cache_key()))
|
||||
if cache:
|
||||
return cache
|
||||
req = discordrest_from_user("/users/@me/guilds")
|
||||
if req.status_code != 200:
|
||||
abort(req.status_code)
|
||||
req = json.dumps(req.json())
|
||||
set_keyvalproperty("OAUTH/USERGUILDS/"+make_user_cache_key(), req, 250)
|
||||
set_keyvalproperty("OAUTH/USERGUILDS/"+str(make_user_cache_key()), req, 250)
|
||||
return req
|
||||
|
||||
def get_user_managed_servers():
|
||||
|
Reference in New Issue
Block a user