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

      <tfoot id='2NFis'></tfoot>
    3. <legend id='2NFis'><style id='2NFis'><dir id='2NFis'><q id='2NFis'></q></dir></style></legend>

      Discord.py Self Bot 使用重写

      时间:2023-10-10
        <tbody id='vVDVM'></tbody>

    4. <legend id='vVDVM'><style id='vVDVM'><dir id='vVDVM'><q id='vVDVM'></q></dir></style></legend>
      • <tfoot id='vVDVM'></tfoot>

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

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

                <bdo id='vVDVM'></bdo><ul id='vVDVM'></ul>
                本文介绍了Discord.py Self Bot 使用重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在尝试使用 discord.py rewrite 制作一个 selfbot.

                I'm trying to make a selfbot using discord.py rewrite.

                我在尝试创建简单命令时遇到问题.

                I'm encountering issues when attempting to create a simple command.

                我希望我的 selfbot 以oof"响应.当>>>测试"时已发送.

                I'd like my selfbot to respond with "oof" when ">>>test" is sent.

                这是我的代码:

                import asyncio
                import discord
                from discord.ext import commands
                
                bot = commands.Bot(command_prefix=(">>>"), self_bot=True)
                
                
                @bot.event
                async def on_ready():
                    print("Bot presence t u r n e d on ( ͡° ͜ʖ ͡°)")
                
                
                @bot.command()
                async def test(self, ctx):
                    await self.bot.say("oof")
                
                
                
                
                
                bot.run("my token", bot=False)
                

                推荐答案

                self-bot 不是使用 self 的机器人,它是使用您的凭据而不是机器人登录的机器人帐户.自我机器人违反了 Discord TOS(而且您不需要做任何事情),因此您应该通过他们的网站设置机器人帐户并为您的机器人使用机器人帐户.

                A self-bot isn't a bot that uses self, it's a bot that logs in using your credentials instead of a bot account. Self bots are against the Discord TOS (and you're not doing anything that requires one), so you should set up a bot account through their website and use a bot account for your bot.

                也就是说,bot.say 在重写中已被 ctx.send 取代,并且您不在 cog 中,因此您不应该使用 自我.

                That said, bot.say has been replaced by ctx.send in rewrite, and you're not in a cog so you shouldn't use self as all.

                from discord.ext import commands
                
                bot = commands.Bot(">>>", self_bot=True)
                
                @bot.event
                async def on_ready():
                    print("Bot presence t u r n e d on ( ͡° ͜ʖ ͡°)")
                
                @bot.command()
                async def test(ctx):
                    await ctx.send("oof")
                
                bot.run("my token", bot=False)
                

                这篇关于Discord.py Self Bot 使用重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何将用户名转换为不和谐的 ID? 下一篇:如何让不和谐的机器人加你为朋友

                相关文章

                最新文章

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

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