Skip to content

Commit 51f3d6b

Browse files
committed
fix keyword argument typo in 'replace_embed_dict_at' utility function
1 parent 38817fa commit 51f3d6b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

snakecore/utils/embed_utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,11 +1714,12 @@ async def replace_embed_from_dict_at(
17141714

17151715
embed_count = len(embeds)
17161716

1717-
index = embed_count + index if index < 0 else index
1717+
if index is not None:
1718+
index = embed_count + index if index < 0 else index
17181719

1719-
if 0 < index < len(message.embeds):
1720-
embeds[index] = create_embed_from_dict(embed_dict)
1721-
return await message.edit(embeds=embeds)
1720+
if 0 <= index < len(message.embeds):
1721+
embeds[index] = create_embed_from_dict(embed_dict)
1722+
return await message.edit(embeds=embeds)
17221723

17231724
return await message.edit(embed=create_embed_from_dict(embed_dict))
17241725

0 commit comments

Comments
 (0)