Answer the question
In order to leave comments, you need to log in
How to insert an image into an embed?
I have code:
@bot.command(aliases = ['магазин', 'SHOP', 'МАГАЗИН'])
async def shop(ctx):
await ctx.channel.purge(limit = 1)
with open('economy.json', 'r') as f:
money = json.load(f)
for role in money['shop']:
msg = await ctx.send(
embed=discord.Embed(title='Магазин',timestamp=ctx.message.created_at, description=f'**Роль:** <@&{role}> \n **Цена:** {money["shop"][role]["Cost"]}'),
components=[
Button(style=ButtonStyle.red, label='Удалить', emoji='⛔')
])
responce = await bot.wait_for('button_click', check=lambda message: message.author == ctx.author)
if responce.component.label == 'Удалить':
await msg.delete()
Answer the question
In order to leave comments, you need to log in
There are two ways to pin an image for Embed:
emb.set_thumbnail - изображение будет в правом верхнем углу
и
emb.set_image - изображение будет большим под самим Embed
If you want through set_thumbnail , then there is a site for generating Embed Discord
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question