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

  • <legend id='G3r7z'><style id='G3r7z'><dir id='G3r7z'><q id='G3r7z'></q></dir></style></legend>
  • <tfoot id='G3r7z'></tfoot>

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

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

        Client = discord.client() TypeError: 'module' object

        时间:2023-09-10

            <tbody id='K7ZdD'></tbody>

        1. <legend id='K7ZdD'><style id='K7ZdD'><dir id='K7ZdD'><q id='K7ZdD'></q></dir></style></legend>

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

                  本文介绍了Client = discord.client() TypeError: 'module' object is not callable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  为什么我的代码会出现 TypeError: 'module' object is not callable?

                  Why I am I getting TypeError: 'module' object is not callable with my code?

                  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 online and connected to Discord")
                  @client.event
                  async def on_message(message):
                   if message.content == "cookie":
                   await client.send_message(message.channel, ":cookie:")
                  client.run("...") 
                  

                  完全错误:

                  错误:Client = discord.client() TypeError:模块"对象不可调用

                  Error: Client = discord.client() TypeError: 'module' object is not callable

                  推荐答案

                  Client = discord.Client() 
                  

                  完全删除此行.您没有在任何地方使用 Client,而 discord.ext.commands.Botdiscord.Client 的子类,因此您可以访问所有Client 属性通过 Bot.

                  Remove this line entirely. You aren't using Client anywhere, and discord.ext.commands.Bot is a subclass of discord.Client, so you can access all of the Client attributes through Bot.

                  这篇关于Client = discord.client() TypeError: 'module' object is not callable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:引发自定义错误消息 下一篇:如何检查消息内容中的超链接(最好通过 Discord.

                  相关文章

                  最新文章

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

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