Я хочу перехватывать сообщения из каналов Telegram, но ни один из методов Telehon мне не подходит...
Я использую Telethon, но не важно, как. Мне просто нужно записать эти сообщения.
Код: Выделить всё
from telethon import TelegramClient, events,utils
from telethon.tl.functions.messages import GetFullChatRequest
from telethon.tl.functions.messages import GetHistoryRequest
from telethon.tl.functions.channels import GetChannelsRequest
from telethon.tl.functions.contacts import ResolveUsernameRequest
from telethon.tl.types import PeerUser, PeerChat, PeerChannel , sync
import re
client = TelegramClient('session_name', api id, api hash )
client.start()
my_self=client.get_me()
print(myself)
Код: Выделить всё
C:/Users/Riccardo/Desktop/yobitpumpR.py:15: RuntimeWarning: coroutine
'AuthMethods._start' was never awaited
C:/Users/Riccardo/Desktop/yobitpumpR.py:19: RuntimeWarning: coroutine
'get_me' was never awaited
Подробнее здесь: https://stackoverflow.com/questions/570 ... m-channels
Мобильная версия