def on_inline_query(self, query):
query_id, from_id, query_string = telepot.glance(query, flavor='inline_query')
LOGGER.debug('Inline query from %d: \"%s\"', self._stranger.id, query_string)
response = [{
'type': 'article',
'id': 'invitation_link',
'title': _('Rand Talk Invitation Link'),
'description': _('The more friends\'ll use your link -- the faster the search will be'),
'thumb_url': 'http://randtalk.ml/static/img/logo-500x500.png',
'message_text': (
_('Do you want to talk with somebody, practice in foreign languages or you just want '
'to have some fun? Rand Talk will help you! It\'s a bot matching you with '
'a random stranger of desired sex speaking on your language. {0}'),
self._stranger.get_invitation_link(),
),
'parse_mode': 'Markdown',
}]
await self._sender.answer_inline_query(query_id, response)
评论列表
文章目录