📜  bot delete embed py (1)

📅  最后修改于: 2023-12-03 14:59:33.965000             🧑  作者: Mango

Bot Delete Embed Py

Bot Delete Embed Py is a Python script that allows you to easily delete embeds from your Discord server using a bot.

Overview

The purpose of this script is to provide an easy way for server administrators to delete embeds that have been posted by users. The script can be run by a bot user that has been authorized to manage messages in the server.

How it Works

The script uses the Discord.py library to connect to your Discord server and retrieve a list of messages that match a particular criteria. The criteria used in this script is the presence of an embed in the message. The script then iterates through the list of messages and deletes them using the bot user.

Simple to Use

Using Bot Delete Embed Py is simple. First, install the Discord.py library using pip. Then, copy the script and fill in the necessary fields. Finally, run the script and watch as it deletes all embed messages in the designated channel.

Code

Here is an example code snippet that you can use to delete all embed messages in a particular channel.

import discord

TOKEN = "YOUR_BOT_TOKEN"
CHANNEL_ID = "123456789"

client = discord.Client()

@client.event
async def on_ready():
    print('Logged in as {0.user}'.format(client))

@client.event
async def on_message(message):
    if message.channel.id == CHANNEL_ID:
        if message.embeds:
            await message.delete()

client.run(TOKEN)
Conclusion

Bot Delete Embed Py provides an easy way for server administrators to remove embed messages from their Discord server. It is quick, efficient, and easy to use. Give it a try today and see how it can improve your server moderation.