python - 为什么 repl.it 说“unindent 不匹配任何其他缩进级别”?我正在尝试制作一个不和谐的机器人
问题描述
if x == 10:
if message.content.startswith('$train'):
await message.channel.send('You pack your opponent a menacing punch and he falls to the ground! come back later for round 2!')
@commands.cooldown(1, 5000, commands.BucketType.user)
解决方案
因为我们没有关于您的项目的足够信息。所以我只能修复你的代码的缩进。第二个if
语句之后的行仅缩进两个空格,而不是 4 个空格。
if x == 10:
if message.content.startswith('$train'):
await message.channel.send('You pack your opponent a menacing punch and he falls to the ground! come back later for round 2!')
@commands.cooldown(1, 5000, commands.BucketType.user)
推荐阅读
- css - 从另一个图像后面出现时,如何在悬停时使按钮“活动”?
- amazon-web-services - Cloudformation ECS Fargate 自动缩放目标跟踪:1 分钟内 1 个自定义警报:执行操作失败
- maven - maven build 从资源目录生成空文件
- angular - Angular 制作子垫扩展面板
- c++ - 获取指向数组的指针的大小
- svelte-3 - svelteJS 中的动态组件导入
- java - xml 文档和签名中的命名空间
- java - Eclipse - Gradle sourceSets,如何管理我的 yaml 属性文件
- javascript - Vscode 扩展 API:找不到模块 '@babel/preset-react'
- asp.net-mvc - 将“连接:关闭”添加到 ASP.NET MVC 中的响应标头