Answer the question
In order to leave comments, you need to log in
Why is discord.py complaining that the int attribute is missing?
The code runs smoothly, but when I enter the command, it gives an error in the console:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'int' object has no attribute 'set_image'
@client.command(aliases = ['fox'])
async def embed(ctx):
response = requests.get('https://some-random-api.ml/img/fox')
json_data = json.loads(response.text)
embed = discord.Embed(
title='тест', description='***???***', color=0xff9900, set_image(json_data['link'])
)
await ctx.send(embed=embed)
Answer the question
In order to leave comments, you need to log in
It is necessary to write instead of the set_image attribute embed.set_image
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question