From 13456f5e0d21272c05565be48427e400b9a36afc Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Wed, 27 Nov 2019 23:33:00 +0300 Subject: [PATCH] generate 3 markov sentences --- bots/modules/cyberlina.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bots/modules/cyberlina.py b/bots/modules/cyberlina.py index 70a8a11..4a9f8b5 100644 --- a/bots/modules/cyberlina.py +++ b/bots/modules/cyberlina.py @@ -94,6 +94,9 @@ class CyberLinaBotModuleConfig(TelegramBotModuleConfig): if not self.inline_reactions: return seed(os.urandom(128)) + markov_msg = '' + for i in range(3): + markov_msg += self.markovify.make_short_sentence(tries=100) + ' ' results = [ InlineQueryResultArticle( id=uuid4(), @@ -103,7 +106,7 @@ class CyberLinaBotModuleConfig(TelegramBotModuleConfig): InlineQueryResultArticle( id=uuid4(), title='ФлаБеПроЛейка', - input_message_content=InputTextMessageContent(self.markovify.make_sentence(tries=100)) + input_message_content=InputTextMessageContent(markov_msg) ), ] update.inline_query.answer(results, cache_time=0)