【发布时间】:2020-10-07 10:19:07
【问题描述】:
我试过了,但没有成功(我标记了错误行),希望你能帮助我
@bot.event
async def on_message(message):
if 'https://' in message.content.lower():
if(message.channel.name.startswith("ticket")):
print("")
else:
>>>>>>if(has_permissions(manage_messages = True))
print("")
else:
await message.delete()
embed = discord.Embed(title=f'Message Deleted',description=f'**User** : ``{str(message.author)}``\n**Reason** : ``Url/Link detected in the Message``', color=0xFF0000 )
await message.channel.send(embed=embed)
【问题讨论】:
-
什么是错误,你能提供更多关于你的代码的信息吗?而且您的代码有几个语法问题。首先,你应该看看如何用 Python 编写代码。
-
确定错误符合 >>>>>> 等待我可以将错误发送给您
-
文件“C:\Users\lequi\Desktop\Bots\ClipoxMain\main.py”,第 39 行 if(has_permissions(manage_messages = True)) ^ IndentationError: 预期有缩进块
标签: python discord.py discord.py-rewrite