I want my bot to delete all messages that are not starting with the prefix .
. I wrote this code so far in discord.py but it keeps deleting all messages.
@Client.event
async def on_message(message):
if message.author.has_role("Bot"):
return
elif message.content.startswith('.'):
return
else:
await message.delete()
Thanks in advance
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…