(sessions): Add UI for daily_study_cap.
This commit is contained in:
@@ -119,6 +119,23 @@ class daily_study_cap(settings.Duration, settings.GuildSetting):
|
||||
_data_column = "daily_study_cap"
|
||||
|
||||
display_name = "daily_study_cap"
|
||||
desc = "Maximum amount of study time ..."
|
||||
desc = "Maximum amount of recorded study time per member per day."
|
||||
|
||||
_default = 16 * 60 * 60
|
||||
_default_multiplier = 60 * 60
|
||||
|
||||
_max = 25 * 60 * 60
|
||||
|
||||
long_desc = (
|
||||
"The maximum amount of study time that can be recorded for a member per day, "
|
||||
"intended to remove system encouragement for unhealthy or obsessive behaviour.\n"
|
||||
"The member may study for longer, but their sessions will not be tracked. "
|
||||
"The start and end of the day are determined by the member's configured timezone."
|
||||
)
|
||||
|
||||
@property
|
||||
def success_response(self):
|
||||
# Refresh expiry for all sessions in the guild
|
||||
[session.schedule_expiry() for session in self.client.objects['sessions'][self.id].values()]
|
||||
|
||||
return "The maximum tracked daily study time is now {}.".format(self.formatted)
|
||||
|
||||
Reference in New Issue
Block a user