我试图编写一个在另一个机器人上发送消息的机器人代码,我试着读取文档,但它无法工作:/这是当我与用户配对时得到的消息:
Sei stato inserito在聊天!
达蒂·戴尔大学
Scrivigli subito un messaggio
按钮1
按钮2
我需要用我输入的信息和一两秒钟后再输入一条消息来响应这个文本,但是代码只是停止了,甚至没有响应。下面是代码:
import asyncio
from telethon.sync import TelegramClient
from telethon import TelegramClient, events, sync
from t
如何查看我的所有联系人并向他们发送消息?我使用Telethon (API电报python)。
from telethon.tl.functions.contacts import ResolveUsernameRequest
from telethon.tl.types import InputChannelEmpty
from telethon import TelegramClient
from telethon.tl.types.messages import Messages
from telethon.tl.types.contacts import Contacts
api_id
我需要编辑与python一起发送的最后一条消息。我该怎么做呢?
from telethon import TelegramClient, events, sync
from telethon.tl.functions.messages import EditMessageRequest
# Remember to use your own values from my.telegram.org!
api_id = api_id
api_hash = api_hash
client = TelegramClient('anon', api_id, api_hash)
@cli