Replies: 1 comment
-
amount = 10
async for message in ctx.channel.history(limit=amount):
if message.author.id == self.bot.user.id:
await message.delete()
await asyncio.sleep(0.6) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do i purge an DMchannel? this was my code
async def purge(ctx, limit: int = 100):
await ctx.channel.purge(limit=int(limit) + 1)
await ctx.send(f"Purged {limit} messages.", delete_after=5)
Beta Was this translation helpful? Give feedback.
All reactions