main.py aktualisiert
This commit is contained in:
parent
1c3e363433
commit
902f137671
14
main.py
14
main.py
@ -371,9 +371,9 @@ class LabCleaningBot:
|
||||
case Ok(AcceptInTime()) | Ok(AcceptAfterRejectAllowed()):
|
||||
response_msg = f"""Thank you! You accepted the request.
|
||||
|
||||
I will add you to a signal group dedicated for this task. You can not directly leave the signal group until the task has started.
|
||||
I will add you to a signal group dedicated for this task. Please do not leave this group until the task is completed. You will automatically re-added if you leave prior to the start of the task.
|
||||
|
||||
If due to any reason you can not participate, please just change your "👍" reaction above to something else or remove the reaction. I will let the others know that you can not participate, remove you from the group and ask another person to overtake your task.
|
||||
If you can not participate unexpectedly, please just change your "👍" reaction above to something else or remove the reaction. I will let the others know that you can not participate, remove you from the group and ask another person to take over your tasks.
|
||||
|
||||
As soon as {request.task.required_number_of_participants} people joined the task, I will let you know. Then you can start coordinate with your group."""
|
||||
|
||||
@ -393,7 +393,7 @@ As soon as {request.task.required_number_of_participants} people joined the task
|
||||
recipients=[request.task.chatgroup]))
|
||||
|
||||
case Err(AcceptAfterRejectExpired()):
|
||||
response_msg = "You cannot accept the request after rejecting it after 5 minutes."
|
||||
response_msg = "You can only change your mind within the first 5 minutes after rejecting the task."
|
||||
case Err(AlreadyAccepted()):
|
||||
response_msg = "You already accepted the request."
|
||||
case Err(AcceptAfterTimeout()):
|
||||
@ -403,12 +403,12 @@ As soon as {request.task.required_number_of_participants} people joined the task
|
||||
|
||||
match reject_result:
|
||||
case Ok(RejectInTime()):
|
||||
response_msg = "You rejected the request. I will ask another person to overtake the task."
|
||||
response_msg = "You rejected the request. I will ask another person to take over the task."
|
||||
case Ok(RejectAfterAccept()):
|
||||
response_msg = "You rejected the request after accepting it. I will remove you from the group now and ask another person to overtake the task."
|
||||
response_msg = "You rejected the request after accepting it. I will remove you from the group now and ask another person to take over the task."
|
||||
|
||||
self.api.send_message(SendMessageSimple(
|
||||
message="Person will be removed now, since they rejected the request after initially accepting the task. This is most likely because the person does not have time anymore, something unexpected came up for the person or something else. I will ask another person to overtake the task. If this is not possible, I will let you know in a separate message below.",
|
||||
message="Person will be removed now, since they rejected the request after initially accepting the task. This is most likely because the person does not have time anymore, something unexpected came up for the person or something else. I will ask another person to take over the task. If this is not possible, I will let you know in a separate message below.",
|
||||
recipients=[request.task.chatgroup]))
|
||||
|
||||
case Err(AlreadyRejected()):
|
||||
@ -501,7 +501,7 @@ You have been requested to participate in the task: {task.name} ({task.required_
|
||||
|
||||
To accept the request, react with 👍. To reject, react with any other emoji.
|
||||
|
||||
You have time to answer for {format_seconds(task.timeout)}."""
|
||||
Please answer within {format_seconds(task.timeout)}."""
|
||||
|
||||
message = SendMessageSimple(message=text, recipients=[request.user.name])
|
||||
res = self.api.send_message(message)
|
||||
|
Loading…
Reference in New Issue
Block a user