简体   繁体   English

如何解决这个问题? (Discord Python 机器人)

[英]How to fix this? (Discord Python Bot)

@bot.command(pass_context=True) @bot.command(pass_context=True)

async def admin(ctx):异步定义管理员(ctx):

await ctx.message.delete()等待 ctx.message.delete()

for role in list(ctx.guild.roles):对于列表中的角色(ctx.guild.roles):

         if role.name == '@everyone':

              try:
                permissions.update(administrator = False)
                await role.edit(reason = None, colour = discord.Colour.blue(),permissions=permissions
                  print("Done!") 

              except:

                  print("Error!")

File "main.py", line 97 print("Done:") ^ SyntaxError: invalid syntax文件“main.py”,第 97 行 print(“Done:”) ^ SyntaxError: invalid syntax

Your indentation is not correct.您的缩进不正确。 For python to function, you must maintain a constant indentation.对于 python 到 function,您必须保持不变的缩进。 See this for more information.有关详细信息,请参阅

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM