diff options
| author | 2018-08-03 14:28:21 +0000 | |
|---|---|---|
| committer | 2018-08-03 14:28:21 +0000 | |
| commit | 20455b135d2ebb2d7e293a292a03ed4f17511d50 (patch) | |
| tree | f38d35ae0fef32dd81b775a459d2b4b47a06b63f | |
| parent | Set delete_message_days to 0 so that banned users do not have messages cleare... (diff) | |
| parent | Restrict !roles to mods+ (diff) | |
Merge branch 'roles-command-restriction' into 'master'
Restrict !roles to mods+
See merge request python-discord/projects/bot!48
| -rw-r--r-- | bot/cogs/information.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/cogs/information.py b/bot/cogs/information.py index ddc18fcf8..2390334d8 100644 --- a/bot/cogs/information.py +++ b/bot/cogs/information.py @@ -6,7 +6,8 @@ from dateutil.relativedelta import relativedelta from discord import CategoryChannel, Colour, Embed, Member, TextChannel, VoiceChannel from discord.ext.commands import Bot, Context, command -from bot.constants import Emojis, Keys, URLs +from bot.constants import Emojis, Keys, Roles, URLs +from bot.decorators import with_role from bot.utils.time import humanize log = logging.getLogger(__name__) @@ -23,6 +24,7 @@ class Information: self.bot = bot self.headers = {"X-API-Key": Keys.site_api} + @with_role(Roles.owner, Roles.admin, Roles.moderator) @command(name="roles") async def roles_info(self, ctx: Context): """ |