Answer the question
In order to leave comments, you need to log in
Removing sms telegrams aiogram from the list?
Hello!!!!
I want to remove words from the list
Here is the code
Delet = ["мат", "мат2"]
@dp.message_handler()
async def pro(message: types.Message):
if Delet in message.text:
await message.delete()
Answer the question
In order to leave comments, you need to log in
If we do not talk about any optimization, performance and false positives, for example, on the phrase "belt plaque", then this option will do:
@dp.message_handler()
async def pro(message: types.Message):
for word in Delet:
if word in message.text:
await message.delete()
break
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question