如何解决使用 python-telegram-bot 或 Telethon 在 Telegram 中输入联系人
from telegram import Update
from telegram.ext import Updater,CommandHandler,CallbackContext
import telebot
from telethon import TelegramClient,client
from telethon.tl.functions.contacts import GetContactsRequest,Import ContactsRequest
from telethon.tl.types import InputPeerUser,InputPhoneContact
contact = InputPhoneContact(client_id = 0,phone = "+12345678",first_name="ABC",last_name="abc")
result = client.invoke(ImportContactsRequest([contact],replace=True))
print(f"1: {contact}\n2: {result}")
我无法根据编写程序解释这个错误的原因 指令,但它不回答
错误是:
`AttributeError: module 'telethon.client' has no attribute 'invoke`
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。