Compare commits
12 Commits
b5536a985a
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 20b8e35709 | |||
|
|
f55e1ada23 | ||
| a6cf5123ff | |||
|
|
660ae18f11 | ||
| 68f5366a2a | |||
|
|
29d399c92a | ||
|
|
7ad5e1a453 | ||
|
|
8761d8ff65 | ||
| 8b52a56a7f | |||
|
|
80fca6d0c7 | ||
| 8b24d27d67 | |||
|
|
6f6de3bf37 |
@@ -47,12 +47,14 @@ class Daemon(base.Daemon, queues.TasksHandlerMixin):
|
||||
)
|
||||
|
||||
def process(self, payload):
|
||||
global store
|
||||
message: Message = Message.de_json(json.dumps(payload))
|
||||
questions = client.get_config('questions')
|
||||
current_question = store.get(message.chat.id)
|
||||
if current_question:
|
||||
if current_question is not None:
|
||||
self.send("Вот ответ на вопрос", message.chat.id)
|
||||
text_split = [current_question['answer'][i:i+1000] for i in range(0, len(current_question['answer']), 1000)]
|
||||
text = questions[current_question]['answer']
|
||||
text_split = [text[i:i+4000] for i in range(0, len(text), 4000)]
|
||||
for elem in text_split:
|
||||
self.send(elem, message.chat.id)
|
||||
selected = randrange(len(questions))
|
||||
|
||||
Reference in New Issue
Block a user