Похожие чаты

Hello! I have a userbot that get all new messages

from channels and forward it to another channel, The problem is it is started to forward comments from one of the channel's discussion, but I never joined it! How to filter this?

12 ответов

23 просмотра

code it properly and check chat_id of the messages before forwarding or show the code and print of objects

Никита- Автор вопроса

It worked fine all the time. I only added filter for ads @client.on(events.NewMessage(incoming=True)) async def message_handler(event): if event.message.sender_id in filter_ids: if any(word in event.message.text for word in words_filter): await client.forward_messages('@lentatsur', event.message) await asyncio.sleep(2) else: if not any(word in event.message.text for word in ads_filter): print(event.message.text, 'Местный паблик прошел фильтр рекламы') await client.forward_messages('@lentatsur', event.message) await asyncio.sleep(2) else: print(event.message.text, "Сработал рекламный фильтр") await asyncio.sleep(1)

Никита
It worked fine all the time. I only added filter f...

just ignore groups. async def message_handler(event): if event.is_group: return

⎞ .·. ⎝ ⎝
just ignore groups. async def message_handler(ev...

messages = client(GetHistoryRequest( peer=channel_id, offset_id=message_id, offset_date=None, add_offset=0, limit=1, max_id=0, min_id=0, hash=0 )) if messages.messages: client.click(messages.messages[0], 0)

Похожие вопросы

Обсуждают сегодня

30 BCH videos in Hausa Language successfully delivered. In December 2023, I created a Flipstarter to produce Bitcoin Cash videos in the Hausa language for greater outreach an...
Munnir
5
читать файл максимально быстро? странный вопрос))
zamtmn
53
братва! где куличи брать?
Alöscha
25
тоесть, указав return eax, сгенерируется никому ненужная инструкция mov eax,eax ?
Aiwan \ (•◡•) / _bot
24
Посоветуйте пожалуйста аудио плеер для библиотеки mp3- FLAC на компьютере. На Винде пользовался Aimp, в том числе для конвертации. Много нужных команд было прямо в контекст...
Виктор Кузнецов
31
📢Join the FUNToken X Pamtoken Zealy Campaign - Let the Quest Begin!🔥 📢Attention, FUNToken Community! We're excited to announce the launch of our Zealy Campaign in collaborat...
OJohnny
7
Добрый день. Созданию отношения таблиц для учёта кораблей, их движения между точками (портами) согласно расписания. Терзают сомнения в правильном ли направлении двигаюсь 😅 1...
Aleksey
1
Is FXTL another frax ecosystem token? Why need fxtl when there is already fxs? Why cant I find a straight answer for this? Maybe thats why people think its all so complicated
MBD Tan
12
Компания Elif ищет менеджера проектов, который будет заниматься поиском и ведением новых проектов. Прежде чем приступить к работе, вам нужно пройти наш недельный курс, где вы ...
Elif
1
Hi guys , do we have update on voting?
HB
16
Карта сайта