aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-04-20 18:46:30 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2020-04-23 16:15:18 +0200
commit1140e9690644e46196a1c8cad900272ffb3ae09a (patch)
tree805a450e9fbdb4d95431693fc3bcaf20148a8320 /tests/helpers.py
parentMerge pull request #904 from Akarys42/free-tag (diff)
Replace `in_channel` decorator by `in_whitelisted_context`
The `in_channel` decorator that served as a factory for `in_channel` checks was replaced by the broaded `in_whitelisted_context` decorator. This means that we can now whitelist commands using channel IDs, category IDs, and/or role IDs. The whitelists will be applied in an "OR" fashion, meaning that as soon as some part of the context happens to be whitelisted, the `predicate` check the decorator produces will return `True`. To reflect that this is now a broader decorator that checks for a whitelisted *context* (as opposed to just whitelisted channels), the exception the predicate raises has been changed to `InWhitelistedContextCheckFailure` to reflect the broader scope of the decorator. I've updated all the commands that used the previous version, `in_channel`, to use the replacement.
Diffstat (limited to 'tests/helpers.py')
0 files changed, 0 insertions, 0 deletions