Python 3.x 当我尝试运行discord bot时,它告诉我一个模块错误

Python 3.x 当我尝试运行discord bot时,它告诉我一个模块错误,python-3.x,discord.py,Python 3.x,Discord.py,每当我运行它时,它都会给我TypeError:“module”对象是不可调用的。 这是我为scp主题的discord服务器制作的discord机器人 这一切都是通过使用Python 3.9.4的Visual Studio代码完成的。您试图调用的是模块discord.ext.commands.bot。您可能正在寻找: 来自discord.ext导入命令 client=commands.Bot(command_prefix=“%”) 请粘贴您的代码,而不是给我们图片。这将帮助我们复制你的代码。好的,

每当我运行它时,它都会给我
TypeError:“module”对象是不可调用的
。 这是我为scp主题的discord服务器制作的discord机器人
这一切都是通过使用Python 3.9.4的Visual Studio代码完成的。

您试图调用的是模块discord.ext.commands.bot。您可能正在寻找:

来自discord.ext导入命令
client=commands.Bot(command_prefix=“%”)

请粘贴您的代码,而不是给我们图片。这将帮助我们复制你的代码。好的,明白了。我有新的帖子吗?没有?您可以编辑您的帖子。@12944qwerty我添加了实际的完整代码。你能帮忙吗?看来你已经得到了答案:)
    import discord 
from discord.ext import commands


client = commands.bot(command_prefix = '%')

@client.command(name='scp')
async def scp(context):
    mods_channel = client.get_channel(806352117442543616)
    
    scp = discord.embed(title="scp wiki", description="http://www.scpwiki.com/scp-series", color=0xCC0000)

    await context.message.channel.send(embed=scp)

@client.event
async def on_ready():
    #do stuff

    mods_channel = client.get_channel(806352117442543616)
    await mods_channel.send('i work! ')

@client.event
async def on_typing():
    mods_channel = client.get_channel(806352117442543616)
    await mods_channel.send('i wonder what you are going to say :thinking:')

@client.event
async def on_message(message):
    if message.content == 'hello Irantu' or message.content == 'hello irantu':
        mods_channel = client.get_channel(806352117442543616)
        await mods_channel.send('HI! :smile:')
#run client