#purge() does not work

1 messages · Page 1 of 1 (latest)

abstract bough
#
@bot.command()
async def clear(ctx, amount: int):
    await ctx.channel.purge(limit=amount+1)
    await ctx.send(f"{amount}")

It does not work..

Sometimes it works, lol. On the version of pycord from github, the same issue
Yesterday everything seemed to be working fine

last relic
#

Do you have intents?

abstract bough
last relic
#

Which one?

abstract bough
#
import discord
from discord.ext import commands

intents = discord.Intents.all()
bot = commands.Bot(command_prefix='.', intents=intents)

@bot.command()
async def clear(ctx, amount: int):
    await ctx.channel.purge(limit=amount+1)
    await ctx.send(f"{amount}")

bot.run('-----')
last relic
#

Can you show the pip list?

abstract bough
last relic
#

Any error?

abstract bough
#

on two different bots with different code such a problem

#

Hmm, it seems like after 5 minutes the messages were deleted, but why such a delay? It's like problems from Discord

#

idk

last relic
#

Or your connection?

#

Try a ping command

abstract bough
#

this has never happened before.. for so long..

merry hornet
#

It will execute quickly but sometimes your client can't process all the message deletes fast enough and it'll take a while

abstract bough
#

for me

merry hornet
#

If you try to search for the messages or you refresh, they won't be there