switch allowed roles for add/remove

This commit is contained in:
Joseph Montanaro 2020-05-08 23:32:30 -07:00
parent ae1455c4b8
commit 485aae06c9

4
bot.py
View File

@ -36,7 +36,7 @@ bot.add_cleanup_async(hn.shutdown)
@bot.command() @bot.command()
@commands.has_role('Server admin') @commands.has_any_role('Admin', 'Mod')
async def add(ctx, player): async def add(ctx, player):
"""Add a player to the server whitelist. Must use exact Minecraft name.""" """Add a player to the server whitelist. Must use exact Minecraft name."""
await hn.send_command(server_id, f'whitelist add {player}') await hn.send_command(server_id, f'whitelist add {player}')
@ -44,7 +44,7 @@ async def add(ctx, player):
@bot.command() @bot.command()
@commands.has_role('Server admin') @commands.has_any_role('Admin', 'Mod')
async def remove(ctx, player): async def remove(ctx, player):
"""Remove a player from the server whitelist. Must use exact Minecraft name.""" """Remove a player from the server whitelist. Must use exact Minecraft name."""
await hn.send_command(server_id, f'whitelist remove {player}') await hn.send_command(server_id, f'whitelist remove {player}')