首页 > 解决方案 > 我收到“AttributeError:模块'discord.ext.commands'没有属性'bot”错误

问题描述

client = commands.bot(command_prefix = '>', help_command=None)

这是我从中得到错误的代码。即使我在 discord.ext.commands 中有一个 bot.py 并且我确实从 discord.ext 导入命令

from discord.ext import commands
import discord

标签: pythondiscord.py

解决方案


Bot带有大写B

commands.Bot(...)

推荐阅读