mtcute/packages/client/src/methods/auth/send-recovery-code.ts
2021-04-08 12:19:38 +03:00

13 lines
389 B
TypeScript

import { TelegramClient } from '../../client'
/**
* Send a code to email needed to recover your password
*
* @returns String containing email pattern to which the recovery code was sent
* @internal
*/
export function sendRecoveryCode(this: TelegramClient): Promise<string> {
return this.call({
_: 'auth.requestPasswordRecovery',
}).then((res) => res.emailPattern)
}