forked from HonusBot/HonusBot
Aggiornare 'inline.py'
This commit is contained in:
parent
aa1c165117
commit
33d2609a6c
44
inline.py
44
inline.py
@ -68,28 +68,28 @@ class InlineBot:
|
|||||||
|
|
||||||
def makeResult(self, qTitle, qMode, qDesc, qValue):
|
def makeResult(self, qTitle, qMode, qDesc, qValue):
|
||||||
if qMode == "text":
|
if qMode == "text":
|
||||||
return InlineQueryResultArticle(
|
return InlineQueryResultArticle(
|
||||||
id=uuid.uuid4().hex,
|
id=uuid.uuid4().hex,
|
||||||
type="article",
|
type="article",
|
||||||
title=qTitle,
|
title=qTitle,
|
||||||
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">HonusBot</a>", "HTML"),
|
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">HonusBot</a>", "HTML"),
|
||||||
description=qDesc
|
description=qDesc
|
||||||
)
|
)
|
||||||
if qMode == "image":
|
if qMode == "image":
|
||||||
return InlineQueryResultArticle(
|
return InlineQueryResultArticle(
|
||||||
id=uuid.uuid4().hex,
|
id=uuid.uuid4().hex,
|
||||||
type="article",
|
type="article",
|
||||||
title=qTitle,
|
title=qTitle,
|
||||||
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">Scherzo del rasoio</a>", "HTML"),
|
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">Scherzo del rasoio</a>", "HTML"),
|
||||||
description=qDesc
|
description=qDesc
|
||||||
)
|
)
|
||||||
return InlineQueryResultArticle(
|
return InlineQueryResultArticle(
|
||||||
id=uuid.uuid4().hex,
|
id=uuid.uuid4().hex,
|
||||||
type="article",
|
type="article",
|
||||||
title=qTitle,
|
title=qTitle,
|
||||||
input_message_content=InputTextMessageContent("Unknown result type!", "HTML"),
|
input_message_content=InputTextMessageContent("Unknown result type!", "HTML"),
|
||||||
description=qDesc
|
description=qDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
def inlineQuery(self, update, context):
|
def inlineQuery(self, update, context):
|
||||||
senderid = str(update.inline_query.from_user.id)
|
senderid = str(update.inline_query.from_user.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user