Fixed exporting weights for users that left the server
and reduced debug output
This commit is contained in:
1 parent
ae77a1f860
commit
891b79d0df
2 files changed
+6
-2
No files matched your search
@@ -1,5 +1,8 @@
|
||||
import logging
|
||||
import discord
|
||||
|
||||
logger = logging.getLogger('bot')
|
||||
|
||||
|
||||
class MessageCache:
|
||||
def __init__(self, _bot):
|
||||
@@ -8,7 +11,8 @@ class MessageCache:
|
||||
|
||||
def put(self, key, value: discord.Message):
|
||||
self._cache_dict[key] = value
|
||||
print("cache size:", self._cache_dict.__len__())
|
||||
if self._cache_dict.__len__() % 5 == 0:
|
||||
logger.info("cache size:", self._cache_dict.__len__())
|
||||
|
||||
def get(self, key):
|
||||
# Try to find it in this cache, then see if it is cached in the bots own message cache
|
||||
|
||||
Reference in new issue
Block a user