I've been trying to make the bot send embeds but it's just not working, the code is executed with no errors but the embed doesn't get sent in the channel
@client.command()
async def embed(ctx):
embed=discord.Embed(
title='Title',
description='Description',
color=0x774dea
)
await ctx.send(embed=embed)
I already had the Privileged Gateway Intents enabled, but i added the intents to the code, same problem. Here is the full code:
import discord
from discord.ext import commands
from discord import Intents
_intents = Intents.default()
_intents.message_content = True
TOKEN = 'MYTOKENISHERE'
client = commands.Bot(command_prefix='$', intents=_intents)
@client.event
async def on_ready():
print('We Have logged in as {0.user}'.format(client))
@client.command()
async def embed(ctx):
embed=discord.Embed(
title='Title',
description='Description',
color=0x774dea
)
await ctx.send(embed=embed)
client.run(TOKEN)