sum
- встроенная функция, чтобы не переопределять ее и избежать дальнейших проблем добавляется _ from telethon import TelegramClient, types, functions
import asyncio
async def main():
client = TelegramClient('session_name', api_id, api_hash)
await client.start()
result = await client(functions.account.ReportPeerRequest(peer='durov', reason=types.InputReportReasonOther(), message='text'))
print(result)
asyncio.run(main())
from telethon import TelegramClient, types, functions
async with TelegramClient(session_name, api_id, api_hash) as client:
result = await client(functions.account.ReportPeerRequest(peer='durov', reason=types.InputReportReasonOther("text")))
print(result)
from telethon import types, functions
result = client(functions.account.ReportPeerRequest(peer='durov', reason=types.InputReportReasonOther("text")))