switch allowed roles for add/remove
This commit is contained in:
parent
ae1455c4b8
commit
485aae06c9
4
bot.py
4
bot.py
@ -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}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user