aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-08-30 09:52:46 +0100
committerGravatar GitHub <[email protected]>2021-08-30 09:52:46 +0100
commit82ef5cc3b148af1a11a82d87b5f162d84b12ce87 (patch)
tree27f9d5752fb93d5e3355fae0ca4d61e7ccb520d3
parentAdd baby anaconda to snake hatch (#822) (diff)
parentMerge branch 'main' into patch-1 (diff)
Merge pull request #816 from Objectivitix/patch-1
Whitelist `.bm` command in occupied help channels
-rw-r--r--bot/exts/evergreen/bookmark.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/evergreen/bookmark.py b/bot/exts/evergreen/bookmark.py
index 85c9b46f..f93371a6 100644
--- a/bot/exts/evergreen/bookmark.py
+++ b/bot/exts/evergreen/bookmark.py
@@ -7,14 +7,16 @@ import discord
from discord.ext import commands
from bot.bot import Bot
-from bot.constants import Colours, ERROR_REPLIES, Icons
+from bot.constants import Categories, Colours, ERROR_REPLIES, Icons, WHITELISTED_CHANNELS
from bot.utils.converters import WrappedMessageConverter
+from bot.utils.decorators import whitelist_override
log = logging.getLogger(__name__)
# Number of seconds to wait for other users to bookmark the same message
TIMEOUT = 120
BOOKMARK_EMOJI = "📌"
+WHITELISTED_CATEGORIES = (Categories.help_in_use,)
class Bookmark(commands.Cog):
@@ -85,6 +87,7 @@ class Bookmark(commands.Cog):
await message.add_reaction(BOOKMARK_EMOJI)
return message
+ @whitelist_override(channels=WHITELISTED_CHANNELS, categories=WHITELISTED_CATEGORIES)
@commands.command(name="bookmark", aliases=("bm", "pin"))
async def bookmark(
self,