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')
async def event_message(self, message): utils.log_kv('[Bot#event_message] New message', message.content) if 'bruh' in message.content.lower( ) and not message.author.name == config.bot_nick and not 'reset_bruh' in message.content: print('bruh found') if bot_db.exists_data('bruhs'): bot_db.increment_bruhs() bruhs = bot_db.get_data('bruhs') await message.channel.send(f'Bruh Counter: {bruhs[0]["bruhs"]}' ) else: print('No data') await self.handle_commands(message)
async def bruhcount(self, ctx): if not bot_db.exists_data("bruhs"): bot_db.add_data("bruhs", 0) bruhs = bot_db.get_data("bruhs")[0]["bruhs"] await ctx.send(f'Current bruh count: {bruhs}')