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

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

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

      1. 传递了不正确的令牌

        时间:2023-10-11

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

            <tbody id='eSWV3'></tbody>

              <tfoot id='eSWV3'></tfoot>

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

                • <i id='eSWV3'><tr id='eSWV3'><dt id='eSWV3'><q id='eSWV3'><span id='eSWV3'><b id='eSWV3'><form id='eSWV3'><ins id='eSWV3'></ins><ul id='eSWV3'></ul><sub id='eSWV3'></sub></form><legend id='eSWV3'></legend><bdo id='eSWV3'><pre id='eSWV3'><center id='eSWV3'></center></pre></bdo></b><th id='eSWV3'></th></span></q></dt></tr></i><div id='eSWV3'><tfoot id='eSWV3'></tfoot><dl id='eSWV3'><fieldset id='eSWV3'></fieldset></dl></div>
                • 本文介绍了传递了不正确的令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在 YouTube 上关注 Python Discord 机器人的基本教程,我的代码在下面.它说:

                  I'm following a basic tutorial for a Python Discord bot on YouTube and my code is underneath. It says:

                  discord.errors.LoginFailure:通过了不正确的令牌.

                  discord.errors.LoginFailure: Improper token has been passed.

                  在任何人问之前,是的,我已经输入了机器人令牌,而不是 id 或秘密.

                  Before anyone asks, yes I have put in the bot token, not the id or secret.

                  import discord
                  from discord.ext.commands import Bot
                  from discord.ext import commands
                  import asyncio
                  import time
                  
                  Client = discord.Client()
                  client = commands.Bot(command_prefix = "!")
                  
                  @client.event
                  async def on_ready():
                      print("Bot is ready!")
                  
                  @client.event
                  async def on_message(message):
                      if message.content == "cookie":
                          await client.send_message(message.channel, ":cookie:")
                  
                  client.run("token is here")
                  

                  推荐答案

                  确保你拿到了Token"来自机器人"Discord 开发站点中的页面,而不是秘密"页面.来自一般信息";页面.

                  Make sure you grab the "Token" from the "Bot" page in the Discord development site, rather than the "Secret" from the "General Information" page.

                  我遇到了同样的问题.通过使用 Discord 应用页面中的正确令牌解决了我的问题.我使用的是秘密".从一般信息"页面(它为我在原始帖子中生成错误)而不是令牌"页面来自机器人"页面.

                  I was having the same problem. My issue was solved by using the correct token from the Discord app page. I was using the "Secret" from the 'General Information' page (which generated the error in the original post for me) instead of the "Token" from the "Bot" page.

                  正如 sheneb 在对此的评论中所说,这个答案(可能)不会帮助 OP(因为现在的问题是在有人问之前,是的,我已经输入了 bot 令牌,而不是 id 或秘密".).但是,我在搜索答案时发现了这个问题/页面,我的问题通过这些信息得到了解决.

                  As sheneb said in the comment to this, this answer (probably) won't help the OP (since the question now says "Before anyone asks, yes I have put in the bot token, not the id or secret"). However, I found this question/page when searching for the answer, and my issue was solved with this information.

                  这篇关于传递了不正确的令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:我需要帮助在 discord py 中创建 discord py temp 静音命 下一篇:Discord Bot - “属性错误:‘NoneType’对象没有属性‘

                  相关文章

                  最新文章

                  <legend id='WakFq'><style id='WakFq'><dir id='WakFq'><q id='WakFq'></q></dir></style></legend>
                • <small id='WakFq'></small><noframes id='WakFq'>

                    <bdo id='WakFq'></bdo><ul id='WakFq'></ul>

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