import { Snake } from '../../client' ; import { Api } from 'telegram' ; import { ResultAffectedMessages } from './DeleteMessages' ; export async function DeleteUserHistory ( snakeClient , chatId , userId ) { try { return new ResultAffectedMessages ( await snakeClient . client . invoke ( new Api . channels . DeleteUserHistory ( { channel : chatId , userId : userId , } ) ) ) ; } catch ( error ) { return snakeClient . _handleError ( error , `telegram.deleteUserHistory(${ chatId }${ userId })` ) ; } }