We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38817fa commit 51f3d6bCopy full SHA for 51f3d6b
snakecore/utils/embed_utils.py
@@ -1714,11 +1714,12 @@ async def replace_embed_from_dict_at(
1714
1715
embed_count = len(embeds)
1716
1717
- index = embed_count + index if index < 0 else index
+ if index is not None:
1718
+ index = embed_count + index if index < 0 else index
1719
- if 0 < index < len(message.embeds):
1720
- embeds[index] = create_embed_from_dict(embed_dict)
1721
- return await message.edit(embeds=embeds)
+ if 0 <= index < len(message.embeds):
+ embeds[index] = create_embed_from_dict(embed_dict)
1722
+ return await message.edit(embeds=embeds)
1723
1724
return await message.edit(embed=create_embed_from_dict(embed_dict))
1725
0 commit comments