summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmaan Bhojwani <me@armaanb.net>2021-01-26 00:03:44 -0500
committerArmaan Bhojwani <me@armaanb.net>2021-01-26 00:04:23 -0500
commit05c656c6e3e521d3866932d73963c0dc914068aa (patch)
tree97a3d85ffcded4bcb9c27c923da9c5c2c70a2e3f
parentb4a25c9ba64baa5d53546333dcf5ba89afffc48c (diff)
downloadtall.bot-05c656c6e3e521d3866932d73963c0dc914068aa.tar.gz
Fix "tell me more" returning a tuple
-rwxr-xr-xtallbot.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tallbot.py b/tallbot.py
index f17e04e..4e25e32 100755
--- a/tallbot.py
+++ b/tallbot.py
@@ -48,7 +48,9 @@ def tell_more(inp, pid):
old = int(time.time()) - 150
c.execute("SELECT query FROM queries WHERE pid = (?) AND time > (?)",
(str(pid), old))
- return c.fetchone()
+
+ (query, *_) = c.fetchone()
+ return str(query)
if find_query(inp):
return query_lookup(pid)