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:
parent
0f960b902f
commit
a9fc8bc846
@ -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
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user