getting frequency on-insert should be execute_fetchone
This commit is contained in:
parent
fa405df36a
commit
0e9a8d66a7
1 changed files with 2 additions and 2 deletions
|
@ -27,8 +27,8 @@ class Module(ModuleManager.BaseModule):
|
|||
inserts.append([words[-1], None, None])
|
||||
|
||||
for insert in inserts:
|
||||
frequency = self.bot.database.execute("""SELECT frequency
|
||||
FROM markov WHERE channel_id=? AND first_word=?
|
||||
frequency = self.bot.database.execute_fetchone("""SELECT
|
||||
frequency FROM markov WHERE channel_id=? AND first_word=?
|
||||
AND second_word=? AND third_word=?""",
|
||||
[event["channel"].id]+insert)
|
||||
frequency = (frequency or [0])[0]+1
|
||||
|
|
Loading…
Reference in a new issue