Make history messages per channel configurable
This commit is contained in:
parent
2db983c462
commit
77fe7a69d6
@ -207,7 +207,7 @@ class AIResponder(object):
|
||||
else:
|
||||
current = self.history[index]
|
||||
count = sum(1 for item in self.history[index:] if item.get('channel') == current.get('channel'))
|
||||
if count > 3:
|
||||
if count > self.config.get('history-per-channel', 3):
|
||||
del self.history[index]
|
||||
else:
|
||||
self.shrink_history_by_one(index + 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user