mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Attempt to fix redis limiter nonetype return
This commit is contained in:
parent
13b69d7e2d
commit
8d50f4fa0f
@ -26,7 +26,10 @@ class LimitsRedisLite(Storage): # For Python Limits
|
||||
return int(self.get(key))
|
||||
|
||||
def get(self, key):
|
||||
return int(self.redis_instance.get(key))
|
||||
value = self.redis_instance.get(key)
|
||||
if value:
|
||||
return int(value)
|
||||
return 0
|
||||
|
||||
def reset(self):
|
||||
return self.redis_instance.flushdb()
|
||||
|
Loading…
Reference in New Issue
Block a user