2 回答
TA贡献1785条经验 获得超8个赞
尝试使用Embed.set_image
单独的变量,然后将该变量包含在嵌入列表中:
@bot.command()
async def paginate(ctx):
e = Embed(title="test page 1", description="foo", color=0x115599)
e.set_image(url="foo.png")
embeds = [
e,
Embed(title="test page 2", description="bar", color=0x5599ff)
]
paginator = BotEmbedPaginator(ctx, embeds)
await paginator.run()
TA贡献2065条经验 获得超13个赞
您可以做的一件事是描述列表之外的嵌入。它应该工作得很好,就像它对我来说一样。我包含了缩略图和图像选项,因为我不确定“图像”是什么意思。
pip install disputils在尝试将代码放入文件之前,请确保您已在终端中进行了操作。
这是代码:
import discord
from disputils import BotEmbedPaginator, BotConfirmation, BotMultipleChoice
bot = commands.Bot(command_prefix='!')
@bot.command()
async def testing(ctx):
Embed1 = discord.Embed(title="Title", description="Description", color=0x000000)
Embed1.set_image(url="https://external-preview.redd.it/mu4xWSMFJroZUimyZY4vvjloaAnmzXTh1O2QI_TFlzc.jpg?width=960&crop=smart&auto=webp&s=e042f61d74a80c4bf3f170b9628c14ef56bac427")
Embed1.set_thumbnail(url="https://external-preview.redd.it/mu4xWSMFJroZUimyZY4vvjloaAnmzXTh1O2QI_TFlzc.jpg?width=960&crop=smart&auto=webp&s=e042f61d74a80c4bf3f170b9628c14ef56bac427")
Embed2 = discord.Embed(title="Title", description="Description", color=0x000000)
Embed2.set_image(url="https://external-preview.redd.it/mu4xWSMFJroZUimyZY4vvjloaAnmzXTh1O2QI_TFlzc.jpg?width=960&crop=smart&auto=webp&s=e042f61d74a80c4bf3f170b9628c14ef56bac427")
Embed2.set_thumbnail(url="https://external-preview.redd.it/mu4xWSMFJroZUimyZY4vvjloaAnmzXTh1O2QI_TFlzc.jpg?width=960&crop=smart&auto=webp&s=e042f61d74a80c4bf3f170b9628c14ef56bac427")
Embed3 = discord.Embed(title="Title", description="Description", color=0x000000)
Embed3.set_image(url="https://external-preview.redd.it/mu4xWSMFJroZUimyZY4vvjloaAnmzXTh1O2QI_TFlzc.jpg?width=960&crop=smart&auto=webp&s=e042f61d74a80c4bf3f170b9628c14ef56bac427")
Embed3.set_thumbnail(url="https://external-preview.redd.it/mu4xWSMFJroZUimyZY4vvjloaAnmzXTh1O2QI_TFlzc.jpg?width=960&crop=smart&auto=webp&s=e042f61d74a80c4bf3f170b9628c14ef56bac427")
embeds = [Embed1, Embed2, Embed3]
paginator = BotEmbedPaginator(ctx, embeds)
await paginator.run()
添加回答
举报