generate 3 markov sentences
This commit is contained in:
parent
d62f4986d2
commit
13456f5e0d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user