fix weird behavior of purge command
from discord.ext import commands
from typing import Union
+import asyncio
import discord
@@ -33,6 +34,8 @@ class Mod(commands.Cog):
await ctx.channel.purge(limit=to_purge+1)
except asyncio.queues.QueueEmpty:
await self.bot.send(ctx, ctx.l.mod.purge.oop)
+ except discord.errors.NotFound:
+ await self.bot.send(ctx, ctx.l.mod.purge.oop)
@commands.command(name='kick', aliases=['yeet'])
@commands.guild_only()
