import discord
# Create a Discord client (bot)
client = discord.Client()
@client.event
async def on_ready():
print(f'Logged in as {client.user.name}')
@client.event
async def on_message(message):
if message.content.startswith('!embed'):
# Create an Embed object
embed = discord.Embed(
title='Example Embed',
description='This is an example embed!',
color=discord.Color.blue()
)
embed.add_field(name='Field 1', value='Value 1', inline=False)
embed.add_field(name='Field 2', value='Value 2', inline=True)
embed.set_footer(text='This is a footer.')
# Send the embed message to the same text channel
await message.channel.send(embed=embed)
# Replace 'TOKEN' with your bot token
client.run('TOKEN')