Exemple #1
0
    async def res_bruh(self, ctx):
        if not bot_db.exists_admin(ctx.author.name):
            utils.log_body('[Bot#mod_command] Access denied to ' +
                           ctx.author.name)
            return

        if bot_db.exists_data('bruhs'):
            bot_db.resetbruh()
            await ctx.send('Reset Bruh Coutner to 0')
        else:
            await ctx.send('No Bruh-coutner initialized')
Exemple #2
0
    async def add_data(self, ctx):
        if not bot_db.exists_admin(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, 2)
        except ValueError:
            return await ctx.send('Usage: add_data <name> <entry>')

        [_, name, entry] = command
        if entry.isdigit():
            entry = int(entry)
        bot_db.add_data(name, entry)
Exemple #3
0
    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.exists_admin(mod_name):
            await ctx.send(f'{mod_name} is already a mod.')
        else:
            bot_db.add_admin(mod_name)
            await ctx.send(f'Modded {mod_name}.')
Exemple #4
0
    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.exists_admin(user_name):
            bot_db.remove_admin(user_name)
            await ctx.send(f'Demodded {user_name}.')
        else:
            await ctx.send(f'{user_name} is not a mod.')