Updated BotCommandScopes
This commit is contained in:
parent
418cdf8497
commit
d4b7924358
6 changed files with 98 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
namespace TgBotLib\Objects\BotCommandScope;
|
||||
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\BotCommandScope;
|
||||
|
||||
class BotCommandScopeAllGroupChats implements ObjectTypeInterface
|
||||
{
|
||||
|
@ -49,4 +50,19 @@
|
|||
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs object from BotCommandScope
|
||||
*
|
||||
* @param BotCommandScope $botCommandScope
|
||||
* @return BotCommandScopeAllGroupChats
|
||||
*/
|
||||
public static function fromBotCommandScope(BotCommandScope $botCommandScope): BotCommandScopeAllGroupChats
|
||||
{
|
||||
$object = new self();
|
||||
|
||||
$object->type = $botCommandScope->getType();
|
||||
|
||||
return $object;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue