aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Objectivitix <[email protected]>2021-09-26 18:24:30 -0300
committerGravatar GitHub <[email protected]>2021-09-26 21:24:30 +0000
commitb0e9ffb94f05e6ef7619b7440e00363e10928932 (patch)
treed7873fcf936398bf6d1513e23b7cee78361c02d1
parentMerge pull request #867 from Kronifer/gitpod (diff)
Allow everyone to use the `.bm` command everywhere (#885)
* Allow everyone to use the bm command * Add everyone role in Roles constants * Use envvars and re-order Roles section to be more organized * Fix trailing whitespace We might need to squash merge, four commits for a single small fix is too much
-rw-r--r--bot/constants.py3
-rw-r--r--bot/exts/utilities/bookmark.py5
2 files changed, 4 insertions, 4 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 2313bfdb..6e45632f 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -280,11 +280,12 @@ if Client.month_override is not None:
class Roles(NamedTuple):
+ owner = 267627879762755584
admin = int(environ.get("BOT_ADMIN_ROLE_ID", 267628507062992896))
moderator = 267629731250176001
- owner = 267627879762755584
helpers = int(environ.get("ROLE_HELPERS", 267630620367257601))
core_developers = 587606783669829632
+ everyone = int(environ.get("BOT_GUILD", 267624335836053506))
class Tokens(NamedTuple):
diff --git a/bot/exts/utilities/bookmark.py b/bot/exts/utilities/bookmark.py
index a91ef1c0..39d65168 100644
--- a/bot/exts/utilities/bookmark.py
+++ b/bot/exts/utilities/bookmark.py
@@ -7,7 +7,7 @@ import discord
from discord.ext import commands
from bot.bot import Bot
-from bot.constants import Categories, Colours, ERROR_REPLIES, Icons, WHITELISTED_CHANNELS
+from bot.constants import Colours, ERROR_REPLIES, Icons, Roles
from bot.utils.converters import WrappedMessageConverter
from bot.utils.decorators import whitelist_override
@@ -16,7 +16,6 @@ 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):
@@ -87,8 +86,8 @@ 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"))
+ @whitelist_override(roles=(Roles.everyone,))
async def bookmark(
self,
ctx: commands.Context,