From 7d1890ab59d843802388c794e838586891c67ed1 Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Thu, 4 Aug 2016 07:10:17 -0500 Subject: [PATCH] Removed the ability to execute some commands via PM --- cogs/roles.py | 8 ++++---- cogs/stats.py | 2 +- cogs/tags.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cogs/roles.py b/cogs/roles.py index 714b726..29ecc4c 100644 --- a/cogs/roles.py +++ b/cogs/roles.py @@ -18,7 +18,7 @@ class Roles: server_roles = [role.name for role in ctx.message.server.roles if not role.is_everyone] await self.bot.say("Your server's roles are: ```\n{}```".format("\n".join(server_roles))) - @role.command(name='remove', pass_context=True) + @role.command(name='remove', pass_context=True, no_pm=True) @checks.customPermsOrRole(manage_server=True) async def remove_role(self, ctx): """Use this to remove roles from a number of members""" @@ -59,7 +59,7 @@ class Roles: await self.bot.say("I have just removed the following roles:```\n{}``` from the following members:" "```\n{}```".format("\n".join(role_names), "\n".join([m.display_name for m in members]))) - @role.command(name='add', pass_context=True) + @role.command(name='add', pass_context=True, no_pm=True) @checks.customPermsOrRole(manage_server=True) async def add_role(self, ctx): """Use this to add a role to multiple members. @@ -103,7 +103,7 @@ class Roles: await self.bot.say("I have just added the following roles:```\n{}``` to the following members:" "```\n{}```".format("\n".join(role_names), "\n".join([m.display_name for m in members]))) - @role.command(name='delete', pass_context=True) + @role.command(name='delete', pass_context=True, no_pm=True) @checks.customPermsOrRole(manage_server=True) async def delete_role(self, ctx, *, role: discord.Role = None): """This command can be used to delete one of the roles from the server""" @@ -123,7 +123,7 @@ class Roles: await self.bot.delete_role(ctx.message.server, role) await self.bot.say("I have just removed the role {} from this server".format(role.name)) - @role.command(name='create', pass_context=True) + @role.command(name='create', pass_context=True, no_pm=True) @checks.customPermsOrRole(manage_server=True) async def create_role(self, ctx): """This command can be used to create a new role for this server diff --git a/cogs/stats.py b/cogs/stats.py index 6ea2acf..a142b30 100644 --- a/cogs/stats.py +++ b/cogs/stats.py @@ -67,7 +67,7 @@ class Stats: count += 1 await self.bot.say("Battling leaderboard for this server:```\n{}```".format(fmt)) - @commands.command(pass_context=True) + @commands.command(pass_context=True, no_pm=True) @checks.customPermsOrRole(send_messages=True) async def stats(self, ctx, member: discord.Member=None): """Prints the battling stats for you, or the user provided""" diff --git a/cogs/tags.py b/cogs/tags.py index a02cb6c..ee9c0d5 100644 --- a/cogs/tags.py +++ b/cogs/tags.py @@ -9,7 +9,7 @@ class Tags: def __init__(self, bot): self.bot = bot - @commands.command(pass_context=True) + @commands.command(pass_context=True, no_pm=True) @checks.customPermsOrRole(send_messages=True) async def tags(self, ctx): """Prints all the custom tags that this server currently has"""