aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/cheatsheet.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/evergreen/cheatsheet.py')
-rw-r--r--bot/exts/evergreen/cheatsheet.py12
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))