. * * @author Amir Hossein Jafari * @copyright 2016-2023 Amir Hossein Jafari * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto\EventHandler\Channel; use danog\MadelineProto\MTProto; use danog\MadelineProto\EventHandler\Update; use danog\MadelineProto\MTProtoTools\DialogId; /** * A new channel is available. */ final class NewChannel extends Update { /** Channel ID */ public readonly int $chatId; /** @internal */ public function __construct(MTProto $API, array $rawMessageViews) { parent::__construct($API); $this->chatId = DialogId::fromSupergroupOrChannel($rawMessageViews['channel_id']); } }