again, there may be more than one (nick,count)
This commit is contained in:
parent
158e936ad2
commit
2ff3a7bb6e
1 changed files with 3 additions and 1 deletions
|
@ -203,7 +203,9 @@ class Module(ModuleManager.BaseModule):
|
|||
user_words = {}
|
||||
for user_id, word_count in words:
|
||||
_, nickname = self.bot.database.users.by_id(user_id)
|
||||
user_words[nickname] = word_count
|
||||
if not nickname in user_words:
|
||||
user_words[nickname] = 0
|
||||
user_words[nickname] += word_count
|
||||
|
||||
top_10 = utils.top_10(user_words,
|
||||
convert_key=lambda nickname: self._get_nickname(
|
||||
|
|
Loading…
Reference in a new issue