From b9fba234150c096c32ff1a1781cfe4231e50ab04 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 1 Feb 2024 18:30:57 -0500 Subject: [PATCH] fix(bible): added error message if a passage is too long --- bible/bible.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bible/bible.py b/bible/bible.py index 8bd290a..91f888a 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -95,6 +95,10 @@ class Bible(commands.Cog): else: passage = await self._get_passage(bible_id, f"{book_id}.{passage.replace(':', '.')}") + if len(passage["content"]) > 4096: + await ctx.send("The passage is too long to send.") + return + embed = Embed(title=f"{passage['reference']}", description=passage["content"].replace('ΒΆ ', ''), color=await self.bot.get_embed_color(ctx.channel)) embed.set_footer(text=f"{ctx.prefix}bible passage - Powered by API.bible") await ctx.send(embed=embed)