1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:38:59 +01:00

add/reomve methods

This commit is contained in:
َAhJ 2023-08-30 00:29:24 +03:30
parent 0f960b902f
commit a9fc8bc846

View File

@ -43,4 +43,36 @@ final class Gif extends AbstractVideo
}
$this->hasStickers = $hasStickers;
}
/**
* Add GIF to saved gifs list
*
* @return bool
*/
public function add(): bool
{
return $this->getClient()->methodCallAsyncRead(
'messages.saveGif',
[
'id' => $this->botApiFileId,
'unsave' => false
]
);
}
/**
* Remove GIF from saved gifs list
*
* @return bool
*/
public function remove(): bool
{
return $this->getClient()->methodCallAsyncRead(
'messages.saveGif',
[
'id' => $this->botApiFileId,
'unsave' => true
]
);
}
}