I all,
i want use patter for exclude words with pattern, can you help me?
list_words_to_exclude = [word1, word2, word3]
@client.on(events.NewMessage(incoming=True, from_users=lista_canali, pattern=list_words_to_exclude ))
async def gestione_eventi(evento):
Thanks
2
Answers
You can use a manual filter
According to the telethon docs you can simply pass in a filter callback to
func
parameter ofevents.NewMessage
:So in your case that could be: