Compare commits
1 Commits
master
...
8b24d27d67
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b24d27d67 |
@@ -51,10 +51,9 @@ class Daemon(base.Daemon, queues.TasksHandlerMixin):
|
||||
message: Message = Message.de_json(json.dumps(payload))
|
||||
questions = client.get_config('questions')
|
||||
current_question = store.get(message.chat.id)
|
||||
if current_question is not None:
|
||||
if current_question:
|
||||
self.send("Вот ответ на вопрос", message.chat.id)
|
||||
text = questions[current_question]['answer']
|
||||
text_split = [text[i:i+4000] for i in range(0, len(text), 4000)]
|
||||
text_split = [current_question['answer'][i:i+1000] for i in range(0, len(current_question['answer']), 1000)]
|
||||
for elem in text_split:
|
||||
self.send(elem, message.chat.id)
|
||||
selected = randrange(len(questions))
|
||||
|
||||
Reference in New Issue
Block a user