From 447ea7b956221a3ed2465fd9613c8dd58b730206 Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Wed, 31 May 2023 23:27:34 +0100 Subject: [PATCH] Default owners_exmpt to False --- CHANGELOG.md | 3 +++ tanjun/dependencies/limiters.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc116e27e..d53378e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- `owners_exempt` now defaults to [False][] for cooldowns. + ## [2.15.0] - 2023-05-31 ### Added - [dependencies.add_cooldown][tanjun.dependencies.limiters.add_cooldown] and diff --git a/tanjun/dependencies/limiters.py b/tanjun/dependencies/limiters.py index 27f92be8e..a0f3b8a97 100644 --- a/tanjun/dependencies/limiters.py +++ b/tanjun/dependencies/limiters.py @@ -1034,7 +1034,7 @@ def __init__( str, collections.Mapping[str, str] ] = "This command is currently in cooldown. Try again {cooldown}.", unknown_message: typing.Union[str, collections.Mapping[str, str], None] = None, - owners_exempt: bool = True, + owners_exempt: bool = False, ) -> None: """Initialise a pre-execution cooldown command hook. @@ -1177,7 +1177,7 @@ def with_cooldown( ] = "This command is currently in cooldown. Try again {cooldown}.", unknown_message: typing.Union[str, collections.Mapping[str, str], None] = None, follow_wrapped: bool = False, - owners_exempt: bool = True, + owners_exempt: bool = False, ) -> collections.Callable[[_CommandT], _CommandT]: """Add a pre-execution hook used to manage a command's cooldown through a decorator call. @@ -1247,7 +1247,7 @@ def add_cooldown( str, collections.Mapping[str, str] ] = "This command is currently in cooldown. Try again {cooldown}.", unknown_message: typing.Union[str, collections.Mapping[str, str], None] = None, - owners_exempt: bool = True, + owners_exempt: bool = False, ) -> None: """Add a pre-execution hook used to manage a command's cooldown.