Summary
Add two environment variables: MAX_ORDERS_TAKE (max orders a user can take before being temporarily restricted) and ORDER_TAKE_COOLDOWN_HOURS (hours they must wait after hitting the limit). Each time a user takes an order the counter increments; once it reaches the threshold the bot temporarily prevents them from taking new orders and starts the cooldown timer.
Behavior
If the user successfully completes any order (reaching SUCCESS status, as maker or taker) at any point, the counter resets to 0 and any active cooldown is cancelled immediately. If no order is completed, the user must wait out the cooldown before taking new orders again.
Implementation Notes
The counter and cooldown timestamp should be stored on the User model. The bot should notify the user when they are restricted and show how much time is left in the cooldown.
Summary
Behavior
If the user successfully completes any order (reaching SUCCESS status, as maker or taker) at any point, the counter resets to 0 and any active cooldown is cancelled immediately. If no order is completed, the user must wait out the cooldown before taking new orders again.
Implementation Notes
The counter and cooldown timestamp should be stored on the User model. The bot should notify the user when they are restricted and show how much time is left in the cooldown.