这是错误:https://i.stack.imgur.com/Y7TNL.png
我尝试导入 os import os
但它不会停止给出此错误
这是代码
import os
from discord.ext import commands
intents = discord.Intents.default()
intents.members = True
bot = commands.bot(command_prefix="!")
@bot.event
async def on_ready():
print('We have logged in as {0.user}'.format(bot))
#say command
@bot.command()
async def say(ctx, say: str):
await ctx.send(say)
bot.run('no peeks')```
答案 0 :(得分:0)
替换
bot = commands.bot(command_prefix="!")
与
bot = commands.Bot(command_prefix="!")