async def demod_command(self, ctx): if not bot_tools.is_superadmin(ctx.author.name): utils.log_body('[Bot#demod_command] Access denied to ' + ctx.author.name) return try: command = bot_tools.parse_command(ctx.message.content, 1) except ValueError: return await ctx.send('Usage: demod <name>') [_, user_name] = command utils.log_kv('Demodding', user_name) if bot_db.is_mod(user_name): bot_db.remove_mod(user_name) await ctx.send(f'Demodded {user_name}.') else: await ctx.send(f'{user_name} is not a mod.')
async def mod_command(self, ctx): if not bot_tools.is_superadmin(ctx.author.name): utils.log_body('[Bot#mod_command] Access denied to ' + ctx.author.name) return try: command = bot_tools.parse_command(ctx.message.content, 1) except ValueError: return await ctx.send('Usage: mod <name>') [_, mod_name] = command utils.log_kv('Modding', mod_name) if bot_db.is_mod(mod_name): await ctx.send(f'{mod_name} is already a mod.') else: bot_db.add_mod(mod_name) await ctx.send(f'Modded {mod_name}.')