<small id='7eAKL'></small><noframes id='7eAKL'>

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

        <bdo id='7eAKL'></bdo><ul id='7eAKL'></ul>
        <tfoot id='7eAKL'></tfoot>

        允许 Discord Rewrite 机器人响应其他机器人

        Allow Discord Rewrite bot to respond to other bots(允许 Discord Rewrite 机器人响应其他机器人)
          <bdo id='1J7NO'></bdo><ul id='1J7NO'></ul>
        • <i id='1J7NO'><tr id='1J7NO'><dt id='1J7NO'><q id='1J7NO'><span id='1J7NO'><b id='1J7NO'><form id='1J7NO'><ins id='1J7NO'></ins><ul id='1J7NO'></ul><sub id='1J7NO'></sub></form><legend id='1J7NO'></legend><bdo id='1J7NO'><pre id='1J7NO'><center id='1J7NO'></center></pre></bdo></b><th id='1J7NO'></th></span></q></dt></tr></i><div id='1J7NO'><tfoot id='1J7NO'></tfoot><dl id='1J7NO'><fieldset id='1J7NO'></fieldset></dl></div>

                  <tbody id='1J7NO'></tbody>
              1. <legend id='1J7NO'><style id='1J7NO'><dir id='1J7NO'><q id='1J7NO'></q></dir></style></legend>
              2. <tfoot id='1J7NO'></tfoot>

                  <small id='1J7NO'></small><noframes id='1J7NO'>

                  本文介绍了允许 Discord Rewrite 机器人响应其他机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个 Discord 机器人和一个用于 Discord 频道的 webhook 设置,以每小时在 dot 上发送一个命令.然而,默认情况下,Discord Rewrite 似乎忽略了从其他机器人发送的命令.我该如何禁用它?

                  I have a Discord bot and a webhook setup for a Discord channel to send a command every hour on the dot. However it seems that Discord Rewrite by default ignores commands sent from other bots. How do I go about disabling this?

                  我需要在 per-command 函数或 on_message 函数上修改某些内容吗?

                  Do I need to modify something on a per-command function or the on_message function?

                  当前消息

                  @bot.event
                  async def on_message(message):
                      await bot.process_commands(message)
                  

                  找到解决方案

                  @bot.event
                  async def on_message(message):
                      ctx = await bot.get_context(message)
                      await bot.invoke(ctx)
                  

                  推荐答案

                  尝试为它添加一个检查,例如:

                  try adding a check for it, example :

                  on_message

                  if message.author.bot == True:
                      #Do something
                  

                  命令

                  if ctx.author.bot == True:
                      #Do something
                  

                  这篇关于允许 Discord Rewrite 机器人响应其他机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  【网站声明】本站部分内容来源于互联网,旨在帮助大家更快的解决问题,如果有图片或者内容侵犯了您的权益,请联系我们删除处理,感谢您的支持!

                  相关文档推荐

                  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)(你能得到“关于我吗?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 - 自动更改角色颜色)

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

                    <tbody id='9jZTF'></tbody>
                • <tfoot id='9jZTF'></tfoot>

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