我已经在Replit上上传了一个示例图像,我正试图使用bot将其嵌入到一条不和谐的消息中。我可以很好地创建嵌入,但图像似乎从未加载,如下所示:
如果我点击失败的图像并打开原稿,它会将我带到正确显示图像的页面。我认为问题可能是我没有正确链接图像,或者Discord没有认识到链接是图像。代码:
if message.content.startswith('$img'):
e = discord.Embed(title="Title", description="Desc", color=0x00ff00)
e.set_image(url='https://replit.com/@Shazamin/Mythic-Tamer#images/species/slime.png')
await message.channel.send(embed=e)
找到了解决方案,如果将来有人需要:
在这里找到答案:https://discordpy.readthedocs.io/en/latest/faq.html#how-do-i-use-a-local-image-file-for-an-embed-image
相关问题 更多 >
编程相关推荐