Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

discord bot python delete messages like mee6

  async def on_message(self,message):
    	channel = bot.get_channel(channel_id)
        if message.content.startswith("!clear",):
            messages = await channel.history(limit=anynumber).flatten()
            for m in messages:
                msg = await channel.fetch_message(m.id)
                await msg.delete()
            print("done!")
 
PREVIOUS NEXT
Tagged: #discord #bot #python #delete #messages
ADD COMMENT
Topic
Name
7+8 =