Constructors
constructor
- new TelegramClient(tgId, token, baseUrl?, debug?): TelegramClient
Parameters
- tgId: string
- token: string
Optional baseUrl: string- debug: boolean = true
Properties
axios
axios: AxiosInstance
Methods
checkNick
- checkNick(nick): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>
checkPhone
- checkPhone(phone): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>
contacts
- contacts(): Promise<unknown[]>
Returns Promise<unknown[]>
contactsDeleteDuplicates
- contactsDeleteDuplicates(): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>
contactsReconciliation
- contactsReconciliation(): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>
getContactById
- getContactById(userId): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>
getDialogs
- getDialogs(): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>
getLastMessageStatus
- getLastMessageStatus(phone, offset?): Promise<LastMessageStatusResult>
Parameters
- phone: string
Optional offset: number
getMessage
- getMessage(messageId, chatId): Promise<Record<string, unknown>>
Parameters
- messageId: string
- chatId: string
Returns Promise<Record<string, unknown>>
lastImportContact
- lastImportContact(to): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>
resolvePhone
- resolvePhone(phone): Promise<Record<string, unknown>>
Returns Promise<Record<string, unknown>>