• <i id='R945E'><tr id='R945E'><dt id='R945E'><q id='R945E'><span id='R945E'><b id='R945E'><form id='R945E'><ins id='R945E'></ins><ul id='R945E'></ul><sub id='R945E'></sub></form><legend id='R945E'></legend><bdo id='R945E'><pre id='R945E'><center id='R945E'></center></pre></bdo></b><th id='R945E'></th></span></q></dt></tr></i><div id='R945E'><tfoot id='R945E'></tfoot><dl id='R945E'><fieldset id='R945E'></fieldset></dl></div>
      <bdo id='R945E'></bdo><ul id='R945E'></ul>

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

    <legend id='R945E'><style id='R945E'><dir id='R945E'><q id='R945E'></q></dir></style></legend>

      1. <tfoot id='R945E'></tfoot>

        Discord.py discord.Embed.from_dict未正确创建嵌入

        Discord.py discord.Embed.from_dict not creating an embed properly(Discord.py discord.Embed.from_dict未正确创建嵌入)
        <legend id='4MKxr'><style id='4MKxr'><dir id='4MKxr'><q id='4MKxr'></q></dir></style></legend>
          <tbody id='4MKxr'></tbody>

              • <i id='4MKxr'><tr id='4MKxr'><dt id='4MKxr'><q id='4MKxr'><span id='4MKxr'><b id='4MKxr'><form id='4MKxr'><ins id='4MKxr'></ins><ul id='4MKxr'></ul><sub id='4MKxr'></sub></form><legend id='4MKxr'></legend><bdo id='4MKxr'><pre id='4MKxr'><center id='4MKxr'></center></pre></bdo></b><th id='4MKxr'></th></span></q></dt></tr></i><div id='4MKxr'><tfoot id='4MKxr'></tfoot><dl id='4MKxr'><fieldset id='4MKxr'></fieldset></dl></div>

                <small id='4MKxr'></small><noframes id='4MKxr'>

                  <bdo id='4MKxr'></bdo><ul id='4MKxr'></ul>
                • <tfoot id='4MKxr'></tfoot>

                  本文介绍了Discord.py discord.Embed.from_dict未正确创建嵌入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  with open("C:/Users/leola/Desktop/Leo/Coding/Python/DISCORD_BOT/help_alt.json", 'r') as help_file:
                          help_commands = json.load(help_file)
                      # help_commands["embed"]["author"]["name"] = bot.user.display_name
                      # help_commands["embed"]["footer"]["text"] = f'{curr_page}/{num_pages}'
                      print(help_commands)
                      help_embed = discord.Embed.from_dict(help_commands)
                      await ctx.channel.send(embed=help_embed)
                  

                  My json

                  我向不一致的人寻求帮助,他们说json为他们工作,他们可以从中获得嵌入,由于某种原因,它对我来说损坏了,并给了我一个Can't send empty message错误代码,当我打印出来时,字典是正常的

                  推荐答案

                  您的代码适合我:

                  @bot.command()
                  async def gojson(ctx):
                      with open('example.json', 'r') as help_file:
                          help_commands = json.load(help_file)
                          help_embed = discord.Embed.from_dict(help_commands)
                          await ctx.channel.send(embed=help_embed)
                  

                  发送完整错误。

                  这篇关于Discord.py discord.Embed.from_dict未正确创建嵌入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)
                  <i id='mN8g0'><tr id='mN8g0'><dt id='mN8g0'><q id='mN8g0'><span id='mN8g0'><b id='mN8g0'><form id='mN8g0'><ins id='mN8g0'></ins><ul id='mN8g0'></ul><sub id='mN8g0'></sub></form><legend id='mN8g0'></legend><bdo id='mN8g0'><pre id='mN8g0'><center id='mN8g0'></center></pre></bdo></b><th id='mN8g0'></th></span></q></dt></tr></i><div id='mN8g0'><tfoot id='mN8g0'></tfoot><dl id='mN8g0'><fieldset id='mN8g0'></fieldset></dl></div>

                        1. <tfoot id='mN8g0'></tfoot>
                            <bdo id='mN8g0'></bdo><ul id='mN8g0'></ul>
                              <tbody id='mN8g0'></tbody>
                          • <small id='mN8g0'></small><noframes id='mN8g0'>

                          • <legend id='mN8g0'><style id='mN8g0'><dir id='mN8g0'><q id='mN8g0'></q></dir></style></legend>