diff options
| author | 2021-04-06 10:29:46 +0200 | |
|---|---|---|
| committer | 2021-04-06 10:29:46 +0200 | |
| commit | 6241e9db8a2489c1bbdd0079cabd9dbd7b5b9b61 (patch) | |
| tree | ceb61a295c6a4456d6e077e35e9c56a55df06475 /bot/exts/evergreen/wolfram.py | |
| parent | Issues: ignore bots (diff) | |
| parent | Merge pull request #658 from python-discord/ks123/ghcr-token-to-github (diff) | |
Merge remote-tracking branch 'origin/main' into akarys/630/automatic-linking-everywhere
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/evergreen/wolfram.py | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/bot/exts/evergreen/wolfram.py b/bot/exts/evergreen/wolfram.py index 437d9e1a..14ec1041 100644 --- a/bot/exts/evergreen/wolfram.py +++ b/bot/exts/evergreen/wolfram.py @@ -62,7 +62,8 @@ def custom_cooldown(*ignore: List[int]) -> Callable:              # if the invoked command is help we don't want to increase the ratelimits since it's not actually              # invoking the command/making a request, so instead just check if the user/guild are on cooldown.              guild_cooldown = not guildcd.get_bucket(ctx.message).get_tokens() == 0  # if guild is on cooldown -            if not any(r.id in ignore for r in ctx.author.roles):  # check user bucket if user is not ignored +            # check the message is in a guild, and check user bucket if user is not ignored +            if ctx.guild and not any(r.id in ignore for r in ctx.author.roles):                  return guild_cooldown and not usercd.get_bucket(ctx.message).get_tokens() == 0              return guild_cooldown | 
