Python discord.ext.commands.errors.ExtensionFailed:Extension';cogs.fun';引发错误:缩进错误:应为缩进块(fun.py,第7行)

Python discord.ext.commands.errors.ExtensionFailed:Extension';cogs.fun';引发错误:缩进错误:应为缩进块(fun.py,第7行),python,python-3.x,discord,discord.py,discord.py-rewrite,Python,Python 3.x,Discord,Discord.py,Discord.py Rewrite,当我试图制造齿轮时(请记住,我是制造齿轮的新手),我得到了错误 discord.ext.commands.errors.Extension失败:扩展“cogs.fun”引发错误:缩进错误:应为缩进块(fun.py,第7行) cog的代码为 导入不一致 导入操作系统 从discord.ext导入命令 课堂乐趣(commands.Cog): def设置(机器人): bot.add_cog(示例(bot)) def uuu init uuuu(自我,机器人): self.bot=bot @comma

当我试图制造齿轮时(请记住,我是制造齿轮的新手),我得到了错误

discord.ext.commands.errors.Extension失败:扩展“cogs.fun”引发错误:缩进错误:应为缩进块(fun.py,第7行)
cog的代码为

导入不一致
导入操作系统
从discord.ext导入命令
课堂乐趣(commands.Cog):
def设置(机器人):
bot.add_cog(示例(bot))
def uuu init uuuu(自我,机器人):
self.bot=bot
@commands.Cog.listener()
异步def on_就绪(自):
打印('齿轮向上!')
@命令
异步定义ping(ctx):
等待ctx.send(f'Pong!{round(bot.latency*1000)}ms')

好的,我找到了答案,你需要在所有齿轮中安装一个设置模块。如果您不这样做,如果您想在bot启动时加载所有内容,则会出现错误。

什么是设置模块?