generate() takes a channel id, not a channel

This commit is contained in:
jesopo 2019-09-20 17:07:48 +01:00
parent 72fca2eacb
commit ecf48aa33e

View file

@ -37,7 +37,7 @@ class Module(ModuleManager.BaseModule):
"INSERT OR REPLACE INTO markov VALUES (?, ?, ?, ?, ?)", "INSERT OR REPLACE INTO markov VALUES (?, ?, ?, ?, ?)",
[event["channel"].id]+insert+[frequency]) [event["channel"].id]+insert+[frequency])
print(self.generate(event["channel"])) print(self.generate(event["channel"].id))
def _choose(self, words): def _choose(self, words):
words, frequencies = list(zip(*words)) words, frequencies = list(zip(*words))