diff --git a/bot.py b/bot.py index 772dd14..41d9c48 100644 --- a/bot.py +++ b/bot.py @@ -208,8 +208,20 @@ async def ssl(ctx, domain: str): if not tlsa_records: message = message + "\n## TLSA Record not found\n" - - await ctx.response.send_message(message) + # If message is too long, send it in 2 messages + if (len(message) > 2000): + # Split on the last line under 2000 characters + message1 = message[:2000] + message1 = message1[:message1.rfind("\n")] + message2 = message[len(message1):] + + + await ctx.response.send_message(message1) + await ctx.send(message2) + + + else: + await ctx.response.send_message(message) else: ctx.response.send_message(f"No certificate found for {domain}") return