if message.content.lower() == 'pls rob':
await message.delete()
await message.author.send('Oof you got banned.')
await message.author.ban(reason="Robbing")
是我当前的代码,当其他人提到“pls rob”/“pls rob @Someone”之外的人时,我不确定如何使其工作
答案 0 :(得分:0)
试试这个:
if message.content.lower().startswith('pls rob'): <--
await message.delete()
await message.author.send('Oof you got banned.')
await message.author.ban(reason="Robbing")