diff --git a/bot.py b/bot.py index 0a27e7d..386bd6f 100644 --- a/bot.py +++ b/bot.py @@ -140,22 +140,29 @@ class Bot(commands.Bot): @commands.command(name='config') async def modify_config(self, ctx): - # TODO: Check if user is the streamer or mod + # Check if user is the streamer or mod # Get the values from the message if ctx.author.name.lower() == ctx.channel.name.lower() or ctx.author.badges == 'moderator': print('[OK] Correct credentials to modify the config.') - print('{}'.format(ctx.message.content)) - config_message = ctx.message.content.replace('\U000e0000', '').split() - print(config_message) + config_message = ctx.message.content.replace('\U000e0000', '').split() if len(config_message) == 3: if config_message[1] == 'water': self.default_values['water_limit'] = int(config_message[2]) save_config_file(self.default_values) + print(' - Water limit message modified to: {}'.format(config_message[2])) elif config_message[1] == 'prime': self.default_values['prime_spam_limit'] = int(config_message[2]) save_config_file(self.default_values) + print(' - Prime limit message modified to: {}'.format(config_message[2])) + + await ctx.channel.send('Veeenga, modifico el número de mensajes que me pides.') else: await ctx.channel.send('@{} Jefe, faltan parámetros para la configuración.'.format(ctx.author.display_name)) + else: + await ctx.channel.send('@{} Lo siento, pero tú no tienes poder aquí. Pídeselo a algún moderador o @jkuijperm'.format(ctx.author.display_name)) + + +