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

      2. <small id='a2fPC'></small><noframes id='a2fPC'>

      3. 如何让我的 discord.py 机器人使用自定义表情符号

        时间:2023-09-09
          <bdo id='sttjm'></bdo><ul id='sttjm'></ul>
            • <legend id='sttjm'><style id='sttjm'><dir id='sttjm'><q id='sttjm'></q></dir></style></legend>

                <tbody id='sttjm'></tbody>

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

                <tfoot id='sttjm'></tfoot>
                • <small id='sttjm'></small><noframes id='sttjm'>

                  本文介绍了如何让我的 discord.py 机器人使用自定义表情符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  如何让我的机器人在任何不和谐服务器中使用我的自定义表情符号?

                  How can I make my bot use my custom emoji in any discord server?

                  @bot.command(pass_context=True)
                  async def ping(ctx):
                      msg = "Pong :CustomEmoji: {0.author.mention}".format(ctx.message)
                      await bot.say(msg)
                  

                  示例:如果我在服务器 1 上上传了一些自定义表情符号,并且当我们在服务器 2 或服务器 3 或机器人可以访问的任何服务器中使用 !ping 命令(如上所述)时,它应该使用自定义表情符号.

                  Example: If I upload some custom emojis on Server 1 and when we use the !ping command (mentioned above) in Server 2 or Server 3 or any server where the bot has access to, it should use the custom emoji.

                  结果:Pong with :CustomEmoji:

                  推荐答案

                  来自 https:///github.com/Rapptz/discord.py/issues/390:

                  自定义表情符号是 <:emoji_name:emoji_id>.

                  您还可以通过 Server.emojis 找到 discord.Emoji 实例和然后将其转换为 str.

                  You can also find the discord.Emoji instance through Server.emojis and then cast it to str.

                  这篇关于如何让我的 discord.py 机器人使用自定义表情符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何使用 discord.py 获取不和谐用户的用户 ID 下一篇:discord.py - 命令引发异常:OpusNotLoaded

                  相关文章

                  最新文章

                  <tfoot id='ySSQr'></tfoot>
                    <legend id='ySSQr'><style id='ySSQr'><dir id='ySSQr'><q id='ySSQr'></q></dir></style></legend>

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

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