我试图用一个命令同时创建几个嵌入,但我不知道如何做到这一点。
这是我目前使用的代码:
@bot.command()
async def habbo(ctx, *, habbo):
urlhabbo = requests.get(f"https://www.habbo.es/api/public/users?name={habbo}")
placashabbo = urlhabbo.json()
placas = placashabbo["selectedBadges"]
contar = 0
content = ""
for i in placas:
contar = contar + 1
i = i['code']
content = content + f"\n{i}\n"
embed = discord.Embed(title=f"l", description=f"{content}", color=discord.Colour.random())
await ctx.send(embed=embed)
我需要用同一个命令创建几个独立的嵌入,例如:
https://i.imgur.com/piUQJzf.gif
1条答案
按热度按时间yqlxgs2m1#
你可以使用embeds = []。例如:
embeds = [embed, embed2]
await ctx.send(embeds=embeds)