Fix tweet ID finder

This commit is contained in:
Klaus-Uwe Mitterer 2017-03-20 14:42:09 +01:00
parent a6b8cefaa1
commit 6f5b4e4f6d

View file

@ -89,9 +89,9 @@ def fish(bot, update):
def getTweetID(tlid, cid):
try:
db = dbtools.dbHelper()
db.executeQuery("SELECT tid FROM timelines WHERE nr = %i AND cid = %i;" % (tlid, int(cid)))
db.executeQuery("SELECT tid FROM timelines WHERE nr = %i AND cid = %i;" % (int(tlid), int(cid)))
return db.getNext()[0]
except:
except Exception:
raise ValueError("No such tweet in timeline")
def explicitTweet(bot, update, args, reply = None):