turing (chan_id,count) in to a dict loses different days
This commit is contained in:
parent
4dc44720e8
commit
158e936ad2
1 changed files with 7 additions and 4 deletions
|
@ -115,11 +115,14 @@ class Module(ModuleManager.BaseModule):
|
||||||
else:
|
else:
|
||||||
target_user = event["user"]
|
target_user = event["user"]
|
||||||
|
|
||||||
words = dict(self._user_all(target_user))
|
word_items = self._user_all(target_user)
|
||||||
|
|
||||||
total = 0
|
words = {}
|
||||||
for channel_id in words:
|
for channel_id, count in word_items:
|
||||||
total += words[channel_id]
|
if not channel_id in words:
|
||||||
|
words[channel_id] = 0
|
||||||
|
words[channel_id] += count
|
||||||
|
total = sum(words.values())
|
||||||
|
|
||||||
since = ""
|
since = ""
|
||||||
first_words = target_user.get_setting("first-words", None)
|
first_words = target_user.get_setting("first-words", None)
|
||||||
|
|
Loading…
Reference in a new issue