<tfoot id='ltJ87'></tfoot>

    • <bdo id='ltJ87'></bdo><ul id='ltJ87'></ul>

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

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

        FORBIDDEN(状态码:403)无法向该用户发送消息

        时间:2023-09-09
          <bdo id='8TkT2'></bdo><ul id='8TkT2'></ul>
            <tbody id='8TkT2'></tbody>

            <tfoot id='8TkT2'></tfoot>
          • <small id='8TkT2'></small><noframes id='8TkT2'>

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

                <legend id='8TkT2'><style id='8TkT2'><dir id='8TkT2'><q id='8TkT2'></q></dir></style></legend>
                • 本文介绍了FORBIDDEN(状态码:403)无法向该用户发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想做一个命令,将 DM 发送到整个服务器,但我收到以下错误:

                  I want to make a command that will send a DM to the entire server, but I am getting the following error:

                  Forbidden: FORBIDDEN (status code: 403) Can't send messages to this user
                  

                  这可能是什么原因?

                  这是我当前的代码:

                  @bot.command(pass_context=True)
                  async def massdm(ctx, words*):
                      output = " "
                      for word in words:
                          output += word
                          output += "" 
                      server = ctx.message.server
                      for member in server.members:
                          await bot.send_message(member, output)
                  

                  推荐答案

                  用户可能已经阻止了你的机器人或为你的服务器禁用了 DM,无论哪种方式,你都无法挽救这种情况,所以只需放弃异常会的.

                  The user might have blocked your bot or disabled DMs for your server, either way, you won’t be able to salvage the situation, so simply dropping the exception will do.

                  try:
                    /* send message */
                  except Exception: 
                    pass
                  

                  这篇关于FORBIDDEN(状态码:403)无法向该用户发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Discord.py:使用变量作为 Discord 嵌入颜色 下一篇:guild.members 无法正常工作 discord.py

                  相关文章

                  最新文章

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

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

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