Trouble with Embeds on slash commands discord.py

I want an embed with a picture on the link to come out of command, but it gives an error, what can I do about it?

import discord, asyncio, json, requests, time, datetime, files, random,os
from discord.ext import commands, tasks
from discord_components import Button, ButtonStyle, DiscordComponents, SelectOption, Select
import interactions


bot = interactions.Client("")


@bot.event
async def on_ready():
    print("Ready!")

@bot.command(name="example",description="example description",)
async def example(ctx: interactions.CommandContext):
    response = requests.get('some url')
    json_data = response.json()
    url = json_data['url']
    embed = discord.Embed(color = 0xff9900, title = '')
    embed.set_image(url='url')
    await ctx.send(embed = embed)


bot.start()

Error:

payload = await super().send(content, **kwargs)
TypeError: _Context.send() got an unexpected keyword argument 'embed'

how i can fix that?



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations