diff --git a/tesla-raffle/tesla-raffle.py b/tesla-raffle/tesla-raffle.py index 597709e..0f7ba35 100644 --- a/tesla-raffle/tesla-raffle.py +++ b/tesla-raffle/tesla-raffle.py @@ -61,7 +61,11 @@ async def sorteo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: return logging.info("Empezando sorteo") - frase = update.message.text.split("/sorteo ")[1] + try: + frase = update.message.text.split("/sorteo ")[1] + except: + await context.bot.send_message(chat_id=update.effective_chat.id, text="Error al arrancar el sorteo, asegúrate de poner la frase.") + return global SORTEO_ACTIVO # Empezamos a leer mensajes SORTEO_ACTIVO = True