LabCleaningBot: improve verbosity for users

This commit is contained in:
lemoer 2024-12-28 14:13:15 +01:00
parent 8292edb3b6
commit e6b8a0445c

View File

@ -458,8 +458,11 @@ If due to any reason you can not participate, please just change your "👍" rea
reqs = task.create_additional_requests(now(), session)
if is_err(reqs):
if task not in unfulfillable_tasks:
if task not in unfulfillable_tasks and len(task.accepted_requests()) > 0:
print("Could not fulfill task: " + task.name)
additional_requested_users = [r.user.name for r in task.requested_requests()]
self.api.send_message(SendMessageSimple(message=f"It was planned to do this task with {task.required_number_of_participants} participants. There are currently {len(additional_requested_users)} unanswered requests. However, currently, no additional users are left to request for this task. Please try to fulfill the tasks as good as you are able to within your group or ask other people directly if they can join your group.", recipients=[task.chatgroup]))
unfulfillable_tasks.append(task)
@ -471,7 +474,7 @@ If due to any reason you can not participate, please just change your "👍" rea
seconds_to_due = (task.due - request.requested_at).total_seconds()
text = f"""Hi!
You have been requested to participate in the task: {task.name} (starts in {format_seconds(seconds_to_due)}).
You have been requested to participate in the task: {task.name} ({task.required_number_of_participants} participants desired, starts in {format_seconds(seconds_to_due)}).
To accept the request, react with 👍. To reject, react with any other emoji.