(goals): Update limits.

This commit is contained in:
2021-12-30 22:39:23 +02:00
parent e0c8993167
commit 7acf7476a4

View File

@@ -14,7 +14,7 @@ from .data import weekly_goals, weekly_tasks, monthly_goals, monthly_tasks
MAX_LENGTH = 200 MAX_LENGTH = 200
MAX_TASKS = 5 MAX_TASKS = 10
class GoalType(Enum): class GoalType(Enum):
@@ -161,6 +161,10 @@ async def goals_command(ctx, flags, goal_type):
f"Please provide the number of tasks you want to complete this {name}!\n" f"Please provide the number of tasks you want to complete this {name}!\n"
f"For example, `{prefix}{ctx.alias} --tasks 300`" f"For example, `{prefix}{ctx.alias} --tasks 300`"
) )
if int(count) > 2048:
return await ctx.error_reply(
"Your task goal is too high!"
)
goal_row.task_goal = int(count) goal_row.task_goal = int(count)
if ctx.args: if ctx.args: