aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/decorators.py (follow)
Commit message (Collapse)AuthorAgeLines
* Always use the get_logger func from bot-coreGravatar Chris Lovering2023-11-25-4/+4
|
* Apply fixes for ruff lintingGravatar Chris Lovering2023-05-09-17/+11
| | | | | Co-authored-by: wookie184 <[email protected]> Co-authored-by: Amrou Bellalouna <[email protected]>
* Merge branch 'main' into fix-whitelist-inheritanceGravatar ChrisJL2022-09-18-2/+2
|\
| * Allow `.src` in dev-contrib and community-meta (#1033)Gravatar TizzySaurus2022-02-20-2/+2
| |
* | Remove unnecessary hasattr checkGravatar wookie1842022-09-17-1/+1
| |
* | Split comment over lines evenlyGravatar wookie1842022-09-17-2/+2
| |
* | Apply suggestions from code reviewGravatar arl2022-07-09-1/+1
| |
* | minor: remove print debugging statementGravatar onerandomusername2022-01-12-1/+0
| |
* | fix: subcommands inherit their parent's whitelistGravatar onerandomusername2022-01-12-6/+22
|/ | | | | solves issue with adding decorator to the parent which wouldn't apply to the children
* Add Better Support For Whitelisting DM CommandsGravatar Hassan Abouelela2021-11-21-10/+17
| | | | | | | | | Adds a toggle to the whitelist override, to allow explicit enabling of a command in DMs, and sets the default to False. Removes redundant `guild_only` decorators. Signed-off-by: Hassan Abouelela <[email protected]>
* Union item with None to Optional with item.Gravatar Xithrius2021-09-01-4/+4
|
* Fix type annotationsGravatar decorator-factory2021-08-31-18/+19
|
* chore: Prefer double quotes over single quotesGravatar ToxicKidz2021-05-04-1/+1
|
* Replace list comp with a set update + sequenceGravatar Chris2021-03-21-1/+1
|
* Only output override channels & bot commands channel on whitelist errorGravatar Chris2021-03-20-1/+7
| | | | | | | | Previously this would output all channels, and could result in an error. This change ensures only the main bot channel & and any overridden channels are shown in the embed. We do this before the categories block as the categories kwarg itself is an override, so we want to include those in any output.
* Adds Category Channels To Error MessageGravatar Hassan Abouelela2021-02-07-1/+12
| | | | | | | Adds the channels within categories to the failure message of the command whitelist check. Signed-off-by: Hassan Abouelela <[email protected]>
* Overhauls In Channel CheckGravatar Hassan Abouelela2021-02-07-49/+61
| | | | | | | Upgrades in channel check to support categories, and in the case of overrides, roles too. Signed-off-by: Hassan Abouelela <[email protected]>
* Get rid from branding management stuffGravatar ks1292020-11-17-21/+1
|
* Remove redundant f-stringsGravatar MarkKoz2020-07-14-1/+1
| | | | This fixes a new lint error (F541) introduced by flake8 3.8.
* Deseasonify: implement __str__ for Month enumGravatar kwzrd2020-04-01-10/+9
| | | | | | | | This way, we can standardize the way Months are shown to both the user and the developer. Note that if passing a Month member to an f-string, the `!s` format code must be specified to ensure our __str__ is used. Co-authored-by: MarkKoz <[email protected]>
* Deseasonify: move current month resolver to utilsGravatar kwzrd2020-03-30-18/+4
| | | | | The function is useful to other modules as well - not only decorators. This declares it as public and moves it to a more accessible place.
* Deseasonify: add helper func to resolve current monthGravatar kwzrd2020-03-29-3/+17
| | | | See docstring for details.
* Deseasonify: move decorators module under utilsGravatar kwzrd2020-03-28-0/+321