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 f9549a1 commit e000f58Copy full SHA for e000f58
killua/cogs/dev.py
@@ -254,7 +254,7 @@ async def publish_update(self, ctx: commands.Context):
254
await modal.wait()
255
256
old = DB.const.find_one({"_id": "updates"})["updates"]
257
- old_version = old[-1:]["version"] if "version" in old else "No version"
+ old_version = old[-1]["version"] if len(old) > 0 and "version" in old[-1] else "No version"
258
259
if version.value in [x["version"] for x in old if "version" in x]:
260
return await ctx.send("This is an already existing version", ephemeral=True)
0 commit comments