. * * @author Daniil Gentili * @copyright 2016-2023 Daniil Gentili * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto\EventHandler\Participant; use danog\MadelineProto\EventHandler\Participant; use danog\MadelineProto\MTProto; /** * Banned/kicked user */ class Banned extends Participant { /** Whether the user has left the group */ public readonly bool $left; /** The banned peer */ public readonly int $peer; /** User was kicked by the specified admin */ public readonly int $kickedBy; /** When did the user join the group */ public readonly ?int $date; /** Banned [rights](https://core.telegram.org/api/rights) */ public readonly bool $bannedRights; //! /** @internal */ public function __construct( MTProto $API, array $rawParticipant ) { $this->left = $rawParticipant['left']; $this->peer = $API->getId($rawParticipant['peer']); $this->kickedBy = $rawParticipant['kicked_by']; $this->date = $rawParticipant['date']; $this->bannedRights = new Rights\Banned($rawParticipant['banned_rights']); } }