1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

Removed the ability to execute some commands via PM

This commit is contained in:
Phxntxm 2016-08-04 07:10:17 -05:00
parent 721fe198fc
commit 7d1890ab59
3 changed files with 6 additions and 6 deletions

View file

@ -18,7 +18,7 @@ class Roles:
server_roles = [role.name for role in ctx.message.server.roles if not role.is_everyone] 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))) 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) @checks.customPermsOrRole(manage_server=True)
async def remove_role(self, ctx): async def remove_role(self, ctx):
"""Use this to remove roles from a number of members""" """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:" 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]))) "```\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) @checks.customPermsOrRole(manage_server=True)
async def add_role(self, ctx): async def add_role(self, ctx):
"""Use this to add a role to multiple members. """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:" 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]))) "```\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) @checks.customPermsOrRole(manage_server=True)
async def delete_role(self, ctx, *, role: discord.Role = None): async def delete_role(self, ctx, *, role: discord.Role = None):
"""This command can be used to delete one of the roles from the server""" """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.delete_role(ctx.message.server, role)
await self.bot.say("I have just removed the role {} from this server".format(role.name)) 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) @checks.customPermsOrRole(manage_server=True)
async def create_role(self, ctx): async def create_role(self, ctx):
"""This command can be used to create a new role for this server """This command can be used to create a new role for this server

View file

@ -67,7 +67,7 @@ class Stats:
count += 1 count += 1
await self.bot.say("Battling leaderboard for this server:```\n{}```".format(fmt)) 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) @checks.customPermsOrRole(send_messages=True)
async def stats(self, ctx, member: discord.Member=None): async def stats(self, ctx, member: discord.Member=None):
"""Prints the battling stats for you, or the user provided""" """Prints the battling stats for you, or the user provided"""

View file

@ -9,7 +9,7 @@ class Tags:
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
@commands.command(pass_context=True) @commands.command(pass_context=True, no_pm=True)
@checks.customPermsOrRole(send_messages=True) @checks.customPermsOrRole(send_messages=True)
async def tags(self, ctx): async def tags(self, ctx):
"""Prints all the custom tags that this server currently has""" """Prints all the custom tags that this server currently has"""