forked from HonusBot/HonusBot
sks
This commit is contained in:
parent
824a8dfa81
commit
0f4d62f3c0
14
inline.py
14
inline.py
@ -161,11 +161,11 @@ class InlineBot:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
resp = None
|
resp = None
|
||||||
#try:
|
try:
|
||||||
resp = json.loads(r.text, object_hook = jsonasResponse)
|
resp = json.loads(r.text, object_hook = jsonasResponse)
|
||||||
#except:
|
except:
|
||||||
# self.logger.warning('JSON deserialization failed')
|
self.logger.warning('JSON deserialization failed')
|
||||||
# return None ## Invalid json
|
return None ## Invalid json
|
||||||
|
|
||||||
if not resp.isAuthorized() or not resp.succeeded():
|
if not resp.isAuthorized() or not resp.succeeded():
|
||||||
self.logger.warning('Unathorized/Unsuccessfull')
|
self.logger.warning('Unathorized/Unsuccessfull')
|
||||||
@ -212,10 +212,10 @@ class InlineBot:
|
|||||||
description=self.errorText
|
description=self.errorText
|
||||||
)
|
)
|
||||||
|
|
||||||
qValue = self.callRequest(command, senderid, querySearch)
|
resp = self.callRequest(command, senderid, querySearch)
|
||||||
contentText = ""
|
contentText = ""
|
||||||
|
|
||||||
if qValue == None:
|
if resp == None:
|
||||||
return InlineQueryResultArticle(
|
return InlineQueryResultArticle(
|
||||||
id=uuid.uuid4().hex,
|
id=uuid.uuid4().hex,
|
||||||
type="article",
|
type="article",
|
||||||
|
Loading…
Reference in New Issue
Block a user