From b401c72b1b5d840ec022e58be26654e776495177 Mon Sep 17 00:00:00 2001 From: Netkas Date: Mon, 13 Feb 2023 20:29:16 -0500 Subject: [PATCH] Added \TgBotLib\Objects\BotCommandScope > BotCommandScopeAllChatAdministrators --- .../BotCommandScopeAllChatAdministrators.php | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/TgBotLib/Objects/BotCommandScope/BotCommandScopeAllChatAdministrators.php diff --git a/src/TgBotLib/Objects/BotCommandScope/BotCommandScopeAllChatAdministrators.php b/src/TgBotLib/Objects/BotCommandScope/BotCommandScopeAllChatAdministrators.php new file mode 100644 index 0000000..5e4ad27 --- /dev/null +++ b/src/TgBotLib/Objects/BotCommandScope/BotCommandScopeAllChatAdministrators.php @@ -0,0 +1,67 @@ +type; + } + + /** + * Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) + * + * @return int|string + */ + public function getChatId(): int|string + { + return $this->chat_id; + } + + /** + * Returns an array representation of the object + * + * @return array + */ + public function toArray(): array + { + return [ + 'type' => $this->type, + 'chat_id' => $this->chat_id + ]; + } + + /** + * Constructs object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + $object->type = $data['type']; + $object->chat_id = $data['chat_id']; + return $object; + } + } \ No newline at end of file