remove useless sutff, and change dj check order to ensure bot doesnt join VC for non DJ's

This commit is contained in:
Drapersniper
2020-09-30 11:37:54 +01:00
parent ce94689461
commit 0a94b4c796
2 changed files with 30 additions and 31 deletions

View File

@@ -34,7 +34,6 @@ class GlobalCacheWrapper:
self.session = session
self.api_key = None
self._handshake_token = ""
self._handshake_token = ""
self.has_api_key = None
self._token: Mapping[str, str] = {}
self.cog = cog
@@ -175,6 +174,8 @@ class GlobalCacheWrapper:
) as resp:
if resp.status == 200:
search_response = await resp.json(loads=json.loads)
global_api_user.update(search_response)
global_api_user["fetched"] = True
global_api_user["can_read"] = search_response.get("can_read", False)
global_api_user["can_post"] = search_response.get("can_post", False)
global_api_user["can_delete"] = search_response.get("can_delete", False)
return global_api_user