久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

        <i id='ywlo9'><tr id='ywlo9'><dt id='ywlo9'><q id='ywlo9'><span id='ywlo9'><b id='ywlo9'><form id='ywlo9'><ins id='ywlo9'></ins><ul id='ywlo9'></ul><sub id='ywlo9'></sub></form><legend id='ywlo9'></legend><bdo id='ywlo9'><pre id='ywlo9'><center id='ywlo9'></center></pre></bdo></b><th id='ywlo9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ywlo9'><tfoot id='ywlo9'></tfoot><dl id='ywlo9'><fieldset id='ywlo9'></fieldset></dl></div>
          <bdo id='ywlo9'></bdo><ul id='ywlo9'></ul>
      2. <small id='ywlo9'></small><noframes id='ywlo9'>

        使用 Discord.py 在一條消息中發(fā)送多個嵌入

        Send multiple embeds in one message with Discord.py(使用 Discord.py 在一條消息中發(fā)送多個嵌入)

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

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

              • <tfoot id='wBbuB'></tfoot>
                  <tbody id='wBbuB'></tbody>

                1. <i id='wBbuB'><tr id='wBbuB'><dt id='wBbuB'><q id='wBbuB'><span id='wBbuB'><b id='wBbuB'><form id='wBbuB'><ins id='wBbuB'></ins><ul id='wBbuB'></ul><sub id='wBbuB'></sub></form><legend id='wBbuB'></legend><bdo id='wBbuB'><pre id='wBbuB'><center id='wBbuB'></center></pre></bdo></b><th id='wBbuB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wBbuB'><tfoot id='wBbuB'></tfoot><dl id='wBbuB'><fieldset id='wBbuB'></fieldset></dl></div>
                2. 本文介紹了使用 Discord.py 在一條消息中發(fā)送多個嵌入的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我一直在嘗試使用 discord.py 在單個消息中發(fā)送嵌入列表.

                  I've been trying to send a list of embeds in a single message using discord.py.

                  我在 discord.py 的文檔中看到它是可能的:https://discordpy.readthedocs.io/en/latest/api.html

                  I've seen it was possible in discord.py's documentation: https://discordpy.readthedocs.io/en/latest/api.html

                  send(content=None, *, wait=False, username=None, avatar_url=None, tts=False, file=None, files=None, embed=None, embeds=None)

                  send(content=None, *, wait=False, username=None, avatar_url=None, tts=False, file=None, files=None, embed=None, embeds=None)

                  embeds (List[Embed]) – 與內(nèi)容一起發(fā)送的嵌入列表.最多 10 個.這不能與 embed 參數(shù)混合.

                  embeds (List[Embed]) – A list of embeds to send with the content. Maximum of 10. This cannot be mixed with the embed parameter.

                  但是,當我嘗試通過嵌入"時收到一條錯誤消息.send() 函數(shù)的參數(shù):

                  However, I get an error message when I try to pass the "embeds" parameter to the send() function:

                  TypeError: send() 得到了一個意外的關(guān)鍵字參數(shù) 'embeds'

                  TypeError: send() got an unexpected keyword argument 'embeds'

                  我需要有幾個嵌入,因為我想使用作者字段的圖標功能,并且我需要它們在同一條消息中,因為如果用戶添加反應,我想用嵌入上的另一個列表替換這些嵌入.

                  I need to have several embeds because I'd like to use the author field's icon feature, and I need them in the same message because I want to replace these embeds by another list on embeds if the user adds a reaction.

                  這是我的代碼:

                  embedList = []
                  for monster in monsters:
                      embed = discord.Embed(color= 0x202225)
                      embed.set_author(name=monster['name'], icon_url="https://ochabot.co/sprites/16/" + str(monster["family"]) + "_" + str(monster["species"]) + "_discord.png")
                      embedList.append(embed)
                      if(len(embedList) == 10):
                          print(embedList)
                          await message.channel.send(embeds=embedList)
                          embedList = []
                  

                  這應該每十個怪物發(fā)送一條包含 10 個嵌入的消息.

                  This is supposed to send a single message containing 10 embeds every ten monsters.

                  我是 Python 新手,所以我可能只是犯了一個愚蠢的錯誤.感謝您的幫助!

                  I'm new to Python so I might have just made a stupid mistake. Thank you for your help!

                  這是print(embedList)"的內(nèi)容.顯示:

                  EDIT : Here is what "print(embedList)" displays :

                  [<discord.embeds.Embed object at 0x7fd3552d9dc8>, <discord.embeds.Embed object at 0x7fd3552d9e58>, <discord.embeds.Embed object at 0x7fd3552d9ee8>, <discord.embeds.Embed object at 0x7fd3552d9f78>, <discord.embeds.Embed object at 0x7fd354274048>, <discord.embeds.Embed object at 0x7fd3542740d8>, <discord.embeds.Embed object at 0x7fd354274168>, <discord.embeds.Embed object at 0x7fd3542741f8>, <discord.embeds.Embed object at 0x7fd354274288>, <discord.embeds.Embed object at 0x7fd354274318>]
                  

                  推薦答案

                  這個答案只是為了完成:Discord Bot API 不允許在一條消息中發(fā)送多個嵌入.正如 在這里看到的 (并且已經(jīng)在評論中提到由明)

                  This answer is only for the sake of completion: The Discord Bot API allows for no way of sending multiple embeds in one message. As seen here (and already mentioned in the comments by Minn)

                  embed (Embed) – 內(nèi)容的豐富嵌入.

                  意味著該函數(shù)只接受一個嵌入對象,而不是它們的列表.

                  Meaning the function only accepts an embed object, not a list of them.

                  這篇關(guān)于使用 Discord.py 在一條消息中發(fā)送多個嵌入的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                  • <bdo id='9AJWS'></bdo><ul id='9AJWS'></ul>

                      <legend id='9AJWS'><style id='9AJWS'><dir id='9AJWS'><q id='9AJWS'></q></dir></style></legend>
                            <i id='9AJWS'><tr id='9AJWS'><dt id='9AJWS'><q id='9AJWS'><span id='9AJWS'><b id='9AJWS'><form id='9AJWS'><ins id='9AJWS'></ins><ul id='9AJWS'></ul><sub id='9AJWS'></sub></form><legend id='9AJWS'></legend><bdo id='9AJWS'><pre id='9AJWS'><center id='9AJWS'></center></pre></bdo></b><th id='9AJWS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9AJWS'><tfoot id='9AJWS'></tfoot><dl id='9AJWS'><fieldset id='9AJWS'></fieldset></dl></div>
                              <tbody id='9AJWS'></tbody>

                            <small id='9AJWS'></small><noframes id='9AJWS'>

                          • <tfoot id='9AJWS'></tfoot>

                          • 主站蜘蛛池模板: 一区二区三区四区av | 国产一区二区三区免费 | 四虎影院在线免费观看 | www国产成人免费观看视频,深夜成人网 | www.久久| 久久久久99 | 毛片在线免费 | 伊人精品国产 | 伊人爽| 国内久久 | 成av人电影在线 | 久久久久久久国产 | 国产成人一区二区 | 久久九精品 | 国产精品日韩欧美一区二区三区 | 欧美精品二区 | 日韩一区二区三区视频 | 国产一区在线免费 | 色噜噜亚洲男人的天堂 | 久久国产精品99久久久久久丝袜 | 久久精品手机视频 | 精品综合久久 | 亚洲麻豆 | 欧美极品在线观看 | 国产在线一区二区三区 | 成人依人 | 最新91在线 | 久草资源在线 | 午夜在线免费观看 | 欧美综合一区二区 | 中文字幕影院 | www.中文字幕.com| 欧美激情在线精品一区二区三区 | 人人九九精 | 国产精品久久久一区二区三区 | 国产综合久久久久久鬼色 | 日日操视频| 中文字幕成人 | 国产99久久精品一区二区永久免费 | 日韩手机在线看片 | 国产精品一区二区三区99 |