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}") I can not explain the reason for this error according to the writing program instruction, but it does not answer
Error is :
`AttributeError: module 'telethon.client' has no attribute 'invoke` https://stackoverflow.com/questions/66095336/enter-a-contact-in-telegram-with-python-telegram-bot-or-telethon February 08, 2021 at 10:52AM
没有评论:
发表评论