瀏覽代碼

Fixing errors.

BaumSplitter41 3 月之前
父節點
當前提交
0cef829b1c
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      VPD_BOT/cogs/delete_msg.py

+ 1 - 2
VPD_BOT/cogs/delete_msg.py

@@ -16,8 +16,7 @@ class delete(commands.Cog):
             ctx,
             amount: int = Option(int, "Select Number of the message to delete"),
         ):
-        amount = int(amount)
-        if amount < 1:
+        if amount is None or amount < 1:
             await ctx.respond("Please provide a valid number greater than 0.", ephemeral=True)
             return
         if not ctx.author.guild_permissions.manage_messages: