Skip to content

Commit

Permalink
Add try except
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Oct 24, 2024
1 parent c5135fa commit 6d2ee2b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions worldtimezone/extensions/world_clock_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ async def create_embed(
)
embeds.append(embed)
if len(embeds) != 0:
_ = await bot.rest.edit_message(
channel_world_clock, message_world_clock, None, embeds=embeds
)
try:
_ = await bot.rest.edit_message(
channel_world_clock, message_world_clock, None, embeds=embeds
)
except hikari.errors.ForbiddenError:
print(f"Failed update message: {guild.discord_id}")
else:
print(f"Failed update message: {guild.discord_id}")

Expand Down

0 comments on commit 6d2ee2b

Please sign in to comment.