![](/img/trans.png)
[英]How to send messages to telegram from the StreamListener handler (twitter)? tweepy & telethon
[英]how to send albums as new messages in telethon
我想將每條新消息從一個頻道發送到另一個頻道。 但是當消息中有專輯時,它們會單獨發送到目標頻道。 如何將它們作為專輯(作為一條消息)發送?
@client.on(events.NewMessage('your_channel'))
async def my_event_handler(event):
await client.send_message('my_channel', event.message)
我使用events.album
而不是events.NewMessage
,但它沒有用!
嘗試這個:
@client.on(events.Album(chats = 'your_channel'))
async def main(event):
await client.send_message('my_channel', event.messages)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.