【发布时间】:2020-07-06 19:50:16
【问题描述】:
我非常不擅长 python(和编程)。我正在尝试创建简单的“转发客户端”。
我希望我的电报客户端将消息转发到saved messages,所以我这样做了:
api_id = ****
api_hash = '****'
with TelegramClient('name', api_id, api_hash) as client:
@client.on(events.NewMessage(outgoing='true', incoming='true'))
async def handler(event):
await event.message.forward_to('me')
client.run_until_disconnected()
一切正常,但我只想转发我的消息和来自用户的消息。不是来自群组或公共频道。
我该怎么做?在文档中找不到任何内容
谢谢
【问题讨论】: