bot
This commit is contained in:
@@ -32,6 +32,7 @@ def handle_urls(handler, cmd):
|
|||||||
curls=CrawlUrl.query.all()
|
curls=CrawlUrl.query.all()
|
||||||
#sent=handler.sender.sendMessage(json.dumps(curls))
|
#sent=handler.sender.sendMessage(json.dumps(curls))
|
||||||
kb= IKM2(map(query_que_url,curls))
|
kb= IKM2(map(query_que_url,curls))
|
||||||
|
lg.debug(json.dumps(cmd))
|
||||||
print json.dumps(cmd)
|
print json.dumps(cmd)
|
||||||
if len(cmd) >= 4 and cmd[3]=="que":
|
if len(cmd) >= 4 and cmd[3]=="que":
|
||||||
sent=handler.sender.sendMessage("I qued url "+str(cmd[2]), reply_markup=None)
|
sent=handler.sender.sendMessage("I qued url "+str(cmd[2]), reply_markup=None)
|
||||||
@@ -63,7 +64,7 @@ class InlineHandler(telepot.helper.InlineUserHandler, telepot.helper.AnswererMix
|
|||||||
def compute_answer():
|
def compute_answer():
|
||||||
query_id, from_id, query_string = telepot.glance(msg, flavor='inline_query')
|
query_id, from_id, query_string = telepot.glance(msg, flavor='inline_query')
|
||||||
print(self.id, ':', 'Inline Query:', query_id, from_id, query_string)
|
print(self.id, ':', 'Inline Query:', query_id, from_id, query_string)
|
||||||
|
|
||||||
articles = [{'type': 'article',
|
articles = [{'type': 'article',
|
||||||
'id': 'abc', 'title': query_string, 'message_text': query_string}]
|
'id': 'abc', 'title': query_string, 'message_text': query_string}]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user