Client = discord.client() TypeError: 'module' object is not callable
为什么我要用我的代码来获取
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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("...") |
完全错误:
Error: Client = discord.client() TypeError: 'module' object is not callable
号
1 | Client = discord.Client() |
完全拆下此管路。您没有在任何地方使用