<small id='vchil'></small><noframes id='vchil'>

  1. <tfoot id='vchil'></tfoot>
    <legend id='vchil'><style id='vchil'><dir id='vchil'><q id='vchil'></q></dir></style></legend>
    <i id='vchil'><tr id='vchil'><dt id='vchil'><q id='vchil'><span id='vchil'><b id='vchil'><form id='vchil'><ins id='vchil'></ins><ul id='vchil'></ul><sub id='vchil'></sub></form><legend id='vchil'></legend><bdo id='vchil'><pre id='vchil'><center id='vchil'></center></pre></bdo></b><th id='vchil'></th></span></q></dt></tr></i><div id='vchil'><tfoot id='vchil'></tfoot><dl id='vchil'><fieldset id='vchil'></fieldset></dl></div>

      <bdo id='vchil'></bdo><ul id='vchil'></ul>

      (Discord.py) 如何获取整个嵌入内容?

      时间:2023-10-10
      <i id='WTMbp'><tr id='WTMbp'><dt id='WTMbp'><q id='WTMbp'><span id='WTMbp'><b id='WTMbp'><form id='WTMbp'><ins id='WTMbp'></ins><ul id='WTMbp'></ul><sub id='WTMbp'></sub></form><legend id='WTMbp'></legend><bdo id='WTMbp'><pre id='WTMbp'><center id='WTMbp'></center></pre></bdo></b><th id='WTMbp'></th></span></q></dt></tr></i><div id='WTMbp'><tfoot id='WTMbp'></tfoot><dl id='WTMbp'><fieldset id='WTMbp'></fieldset></dl></div>

        <small id='WTMbp'></small><noframes id='WTMbp'>

          <tbody id='WTMbp'></tbody>

        <tfoot id='WTMbp'></tfoot>

              • <bdo id='WTMbp'></bdo><ul id='WTMbp'></ul>
              • <legend id='WTMbp'><style id='WTMbp'><dir id='WTMbp'><q id='WTMbp'></q></dir></style></legend>

                本文介绍了(Discord.py) 如何获取整个嵌入内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我想获取所有嵌入内容(包括图片链接),我试过这个:

                I wanna get all the embed content(including the image link), I tried this:

                print(msg.embeds)
                

                这又回来了:

                [<discord.embeds.Embed object at 0x000002E48768CD30>]
                [<discord.embeds.Embed object at 0x000002E48768CAF0>]
                [<discord.embeds.Embed object at 0x000002E487F04040>]
                [<discord.embeds.Embed object at 0x000002E48768CA60>]
                [<discord.embeds.Embed object at 0x000002E48768C9D0>]
                [<discord.embeds.Embed object at 0x000002E487F043A0>]
                

                我在文档中找不到任何关于此的内容,只有关于发送嵌入的内容.

                I cant find anything about that on the documentation, only about sending embeds.

                推荐答案

                你只是得到嵌入.根据 API References,您无法使用 message.content 之类的一个函数来获取整个嵌入内容.您必须像 Embed 那样逐部分获取它.标题嵌入.descriptionEmbed.fields.

                You're just getting embeds. According to API References, you can't get the whole embed content with one function like message.content. You have to get it part by part like Embed.title, Embed.description and Embed.fields.

                Embed.fields 返回表示字段内容的 EmbedProxy 列表.有关您可以访问的可能值,请参阅 add_field().如果属性没有值,则返回 Empty.

                Embed.fields Returns a list of EmbedProxy denoting the field contents. See add_field() for possible values you can access. If the attribute has no value then Empty is returned.

                也就是说,您可以获得嵌入标题、描述以及字段的名称和值.这是一个简单的例子:

                So that means, you can get embed title, description, and fields' name and value. Here's a simple example for this:

                embed = discord.Embed(title='Example', description='Embed')
                embed.add_field(name='field 1 name', value='field 1 value')
                embed.add_field(name='field 2 name', value='field 2 value')
                

                embed.title # returns 'Example'
                embed.description # returns 'Embed'
                embed.fields # returns a list of fields
                embed.fields[0].name # returns 'field 1 name'
                embed.fields[0].value # returns 'field 1 value'
                embed.fields[1].name # returns 'field 2 name'
                embed.fields[1].value # returns 'field 2 value'
                

                这篇关于(Discord.py) 如何获取整个嵌入内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Discord bot 尽管获得了许可,但不能提及所有人 下一篇:如何使 discord.py 机器人私人/直接消息不是作者的

                相关文章

                最新文章

                • <bdo id='o579Z'></bdo><ul id='o579Z'></ul>
                <tfoot id='o579Z'></tfoot>

                1. <small id='o579Z'></small><noframes id='o579Z'>

                  <legend id='o579Z'><style id='o579Z'><dir id='o579Z'><q id='o579Z'></q></dir></style></legend>
                  1. <i id='o579Z'><tr id='o579Z'><dt id='o579Z'><q id='o579Z'><span id='o579Z'><b id='o579Z'><form id='o579Z'><ins id='o579Z'></ins><ul id='o579Z'></ul><sub id='o579Z'></sub></form><legend id='o579Z'></legend><bdo id='o579Z'><pre id='o579Z'><center id='o579Z'></center></pre></bdo></b><th id='o579Z'></th></span></q></dt></tr></i><div id='o579Z'><tfoot id='o579Z'></tfoot><dl id='o579Z'><fieldset id='o579Z'></fieldset></dl></div>