mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
sid is a string
This commit is contained in:
parent
5df39e4043
commit
1cf80a4712
@ -11,7 +11,7 @@ avatar_base_url = "https://cdn.discordapp.com/avatars/"
|
|||||||
guild_icon_url = "https://cdn.discordapp.com/icons/"
|
guild_icon_url = "https://cdn.discordapp.com/icons/"
|
||||||
|
|
||||||
def update_user_token(discord_token):
|
def update_user_token(discord_token):
|
||||||
session['user_keys'] = discord_token
|
session['user_keys'] = discord_tokeidn
|
||||||
|
|
||||||
def make_authenticated_session(token=None, state=None, scope=None):
|
def make_authenticated_session(token=None, state=None, scope=None):
|
||||||
return OAuth2Session(
|
return OAuth2Session(
|
||||||
@ -50,7 +50,7 @@ def get_user_guilds():
|
|||||||
return cache.decode("utf-8")
|
return cache.decode("utf-8")
|
||||||
req = discordrest_from_user("/users/@me/guilds")
|
req = discordrest_from_user("/users/@me/guilds")
|
||||||
if req.status_code != 200:
|
if req.status_code != 200:
|
||||||
if getattr(request, sid):
|
if getattr(request, "sid"):
|
||||||
disconnect()
|
disconnect()
|
||||||
return
|
return
|
||||||
abort(req.status_code)
|
abort(req.status_code)
|
||||||
|
Loading…
Reference in New Issue
Block a user