-

checks#

+

checks¶

-exception ContextCheckFailure(redirect_channel)[source]#
+exception ContextCheckFailure(redirect_channel)[source]¶

Bases: CheckFailure

Raised when a context-specific check fails.

-__init__(redirect_channel)[source]#
+__init__(redirect_channel)[source]¶
-exception InWhitelistCheckFailure(redirect_channel)[source]#
+exception InWhitelistCheckFailure(redirect_channel)[source]¶

Bases: ContextCheckFailure

Raised when the in_whitelist check fails.

-cooldown_with_role_bypass(rate, per, type=('default', 0), *, bypass_roles)[source]#
+cooldown_with_role_bypass(rate, per, type=('default', 0), *, bypass_roles)[source]¶

Decorate a command to have a cooldown, which can be bypassed by users with specified roles.

Note: This replaces the Command.before_invoke callback, which might introduce problems in the future.

@@ -430,7 +430,7 @@
-async has_any_role_check(ctx, *roles)[source]#
+async has_any_role_check(ctx, *roles)[source]¶

Verify if the context’s author has any of the specified roles.

This check will always fail if the context is a DM, since DMs don’t have roles.

@@ -451,7 +451,7 @@
-async has_no_roles_check(ctx, *roles)[source]#
+async has_no_roles_check(ctx, *roles)[source]¶

Verify if the context’s author doesn’t have any of the specified roles.

This check will always fail if the context is a DM, since DMs don’t have roles.

@@ -472,7 +472,7 @@
-in_whitelist_check(ctx, redirect, channels=(), categories=(), roles=(), fail_silently=False)[source]#
+in_whitelist_check(ctx, redirect, channels=(), categories=(), roles=(), fail_silently=False)[source]¶

Check if a command was issued in a context that is whitelisted by channel, category, or roles.

Parameters:
@@ -576,7 +576,7 @@ - + -- cgit v1.2.3