'How to fix this? (Discord Python Bot)
@bot.command(pass_context=True)
async def admin(ctx):
await ctx.message.delete()
for role in list(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
Solution 1:[1]
Your indentation is not correct. For python to function, you must maintain a constant indentation. See this for more information.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | kidney bean |