Aggiornare 'inline.py'

This commit is contained in:
HonusBot 2020-03-09 00:20:40 +01:00
parent aa1c165117
commit 33d2609a6c

View File

@ -68,28 +68,28 @@ class InlineBot:
def makeResult(self, qTitle, qMode, qDesc, qValue):
if qMode == "text":
return InlineQueryResultArticle(
id=uuid.uuid4().hex,
type="article",
title=qTitle,
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">HonusBot</a>", "HTML"),
description=qDesc
)
if qMode == "image":
return InlineQueryResultArticle(
id=uuid.uuid4().hex,
type="article",
title=qTitle,
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">Scherzo del rasoio</a>", "HTML"),
description=qDesc
)
return InlineQueryResultArticle(
id=uuid.uuid4().hex,
type="article",
title=qTitle,
input_message_content=InputTextMessageContent("Unknown result type!", "HTML"),
description=qDesc
)
return InlineQueryResultArticle(
id=uuid.uuid4().hex,
type="article",
title=qTitle,
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">HonusBot</a>", "HTML"),
description=qDesc
)
if qMode == "image":
return InlineQueryResultArticle(
id=uuid.uuid4().hex,
type="article",
title=qTitle,
input_message_content=InputTextMessageContent("<a href=\"" + qValue + "\">Scherzo del rasoio</a>", "HTML"),
description=qDesc
)
return InlineQueryResultArticle(
id=uuid.uuid4().hex,
type="article",
title=qTitle,
input_message_content=InputTextMessageContent("Unknown result type!", "HTML"),
description=qDesc
)
def inlineQuery(self, update, context):
senderid = str(update.inline_query.from_user.id)