# New chat

#### You:
make a discord bot that deletes all messages that contain ""Best minecraft Rats WeedHack" in the channel the command was called in

#### ChatGPT:
I’ve put a complete **discord.py bot** in the canvas that does exactly this:

- Uses a command (`!purgephrase`)
- Scans **only the channel where the command is called**
- Deletes **all messages containing**\
  `Best minecraft Rats WeedHack`
- Requires the **Manage Messages** permission

### How to use it

1. Install dependencies:
   ```bash
   pip install -U discord.py
   ```
2. Replace `YOUR_BOT_TOKEN_HERE` with your bot token.
3. Make sure the bot has:
   - **Read Message History**
   - **Manage Messages**
4. Run the bot:
   ```bash
   python bot.py
   ```
5. In Discord, run:
   ```
   !purgephrase
   ```

If you want:

- Slash command instead of `!`
- Faster bulk deletion
- Auto-deletion without a command
- Multiple phrases or regex matching

tell me and I’ll modify the bot.
