From a240c3d3d52248a42a951569ca0393ea1deddba5 Mon Sep 17 00:00:00 2001 From: StephanAkkerman Date: Wed, 4 Sep 2024 09:29:01 +0200 Subject: [PATCH] Added debug info for too large embed --- src/cogs/loops/timeline.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cogs/loops/timeline.py b/src/cogs/loops/timeline.py index 905eed4..6124361 100644 --- a/src/cogs/loops/timeline.py +++ b/src/cogs/loops/timeline.py @@ -335,8 +335,13 @@ async def post_tweet( else: # Use the normal send function - msg = await channel.send(content=get_tagged_users(tickers), embed=e) - msgs.append(msg) + try: + msg = await channel.send(content=get_tagged_users(tickers), embed=e) + msgs.append(msg) + except discord.HTTPException: + logger.error( + f"Could not post tweet on timeline, with the following info. Embed: {e.to_dict()}. Media: {media}, Tickers: {tickers}" + ) if user_channel: msg = await user_channel.send(