Почему наблюдатель не видит чат_id?Python

Программы на Python
Anonymous
Почему наблюдатель не видит чат_id?

Сообщение Anonymous »

async def watcher(self, message: Message):
if self.config["test"] and message.chat_id == -12346568 and message.sender_id == 7654321 and "test" in message.raw_text:
await self.client.send_message(self.forum_id, "Test", reply_to=self.topic4_id)

в данном случае код не читает сообщения в чат_id, как будто я его неправильно указал
UPD:
if вы не указываете чат_ид, тогда все работает, но это обязательное условие
if self.config["test"] and message.sender is not None and message.sender.id == 87654321 and "test" in message.text:

await self.client.send_message(self.forum_id, "Test", reply_to=self.topic4_id)


Подробнее здесь: https://stackoverflow.com/questions/783 ... he-chat-id

Вернуться в «Python»