1
0
Fork 0
mirror of synced 2024-05-19 20:12:30 +12:00

Add the abilty to change whether or not the import command can be used

This commit is contained in:
Phxntxm 2017-07-02 22:18:00 -05:00
parent a752d3a3f7
commit 08a31d284b

View file

@ -13,6 +13,27 @@ class Administration:
def __init__(self, bot):
self.bot = bot
@commands.command()
@commands.guild_only()
@utils.custom_perms(manage_guild=True)
@utils.check_restricted()
async def allowplaylists(self, ctx, setting):
"""Turns on/off the ability to playlists
EXAMPLE: !allowplaylists on
RESULT: Playlists can now be used"""
if setting.lower() in ['on', 'yes', 'true']:
allowed = True
else:
allowed = False
entry = {
'server_id': str(ctx.message.guild.id),
'playlists_allowed': allowed
}
self.bot.db.save('server_settings', entry)
fmt = "The ability to use playlists has just been turned {}".format("on" if allowed else "off")
await ctx.send(fmt)
@commands.command()
@commands.guild_only()
@utils.custom_perms(kick_members=True)