Skip to content

Commit e000f58

Browse files
committed
🐛 Hopefully fix publish update bug
1 parent f9549a1 commit e000f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

killua/cogs/dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ async def publish_update(self, ctx: commands.Context):
254254
await modal.wait()
255255

256256
old = DB.const.find_one({"_id": "updates"})["updates"]
257-
old_version = old[-1:]["version"] if "version" in old else "No version"
257+
old_version = old[-1]["version"] if len(old) > 0 and "version" in old[-1] else "No version"
258258

259259
if version.value in [x["version"] for x in old if "version" in x]:
260260
return await ctx.send("This is an already existing version", ephemeral=True)

0 commit comments

Comments
 (0)