diff options
| author | 2021-04-15 19:21:14 +0530 | |
|---|---|---|
| committer | 2021-04-15 19:21:14 +0530 | |
| commit | 45fd8b69826e5c39e87177a3113c486ccc51fcdf (patch) | |
| tree | 0b8352a3ad1601ba188bb0eb1ecd0bca5978064e /bot/exts/evergreen/cheatsheet.py | |
| parent | Update emojis (diff) | |
| parent | Update branch (diff) | |
Update branch
Diffstat (limited to 'bot/exts/evergreen/cheatsheet.py')
| -rw-r--r-- | bot/exts/evergreen/cheatsheet.py | 12 | 
1 files changed, 3 insertions, 9 deletions
| diff --git a/bot/exts/evergreen/cheatsheet.py b/bot/exts/evergreen/cheatsheet.py index a64ddd69..3fe709d5 100644 --- a/bot/exts/evergreen/cheatsheet.py +++ b/bot/exts/evergreen/cheatsheet.py @@ -8,8 +8,8 @@ from discord.ext import commands  from discord.ext.commands import BucketType, Context  from bot import constants -from bot.constants import Categories, Channels, Colours, ERROR_REPLIES, Roles, WHITELISTED_CHANNELS -from bot.utils.decorators import with_role +from bot.constants import Categories, Channels, Colours, ERROR_REPLIES +from bot.utils.decorators import whitelist_override  ERROR_MESSAGE = f"""  Unknown cheat sheet. Please try to reformulate your query. @@ -75,7 +75,7 @@ class CheatSheet(commands.Cog):          aliases=("cht.sh", "cheatsheet", "cheat-sheet", "cht"),      )      @commands.cooldown(1, 10, BucketType.user) -    @with_role(Roles.everyone_role) +    @whitelist_override(categories=[Categories.help_in_use])      async def cheat_sheet(self, ctx: Context, *search_terms: str) -> None:          """          Search cheat.sh. @@ -84,12 +84,6 @@ class CheatSheet(commands.Cog):          Usage:          --> .cht read json          """ -        if not ( -                ctx.channel.category.id == Categories.help_in_use -                or ctx.channel.id in WHITELISTED_CHANNELS -        ): -            return -          async with ctx.typing():              search_string = quote_plus(" ".join(search_terms)) | 
