diff --git a/webapp/titanembeds/discordrest.py b/webapp/titanembeds/discordrest.py index 4630c2e..48fbe1f 100644 --- a/webapp/titanembeds/discordrest.py +++ b/webapp/titanembeds/discordrest.py @@ -22,7 +22,7 @@ class DiscordREST: def init_discordrest(self): if not self._bucket_contains("global_limited"): - self._set_bucket("global_limited", False) + self._set_bucket("global_limited", "False") self._set_bucket("global_limit_expire", 0) def _get_bucket(self, key): @@ -76,7 +76,7 @@ class DiscordREST: self._set_bucket(url, int(req.headers['X-RateLimit-Reset'])) if 300 > req.status_code >= 200: - self._set_bucket("global_limited", False) + self._set_bucket("global_limited", "False") return { 'success': True, 'content': json_or_text(req), @@ -87,7 +87,7 @@ class DiscordREST: if 'X-RateLimit-Global' not in req.headers: self._set_bucket(url, int(req.headers['X-RateLimit-Reset'])) else: - self._set_bucket("global_limited", True) + self._set_bucket("global_limited", "True") self._set_bucket("global_limit_expire", time.time() + int(req.headers['Retry-After'])) if req.status_code == 502 and tries <= 5: @@ -189,4 +189,4 @@ class DiscordREST: def delete_webhook(self, webhook_id, webhook_token): _endpoint = "/webhooks/{id}/{token}".format(id=webhook_id, token=webhook_token) r = self.request("DELETE", _endpoint) - return r \ No newline at end of file + return r