. * * @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\EventHandler\Participant\Rights\Banned as BannedRights; use danog\MadelineProto\Ipc\Client; use danog\MadelineProto\MTProto; /** * Banned/kicked user. */ final 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 BannedRights $bannedRights; /** @internal */ public function __construct( MTProto|Client $API, array $rawParticipant ) { $this->left = $rawParticipant['left']; $this->peer = $API->getIdInternal($rawParticipant['peer']); $this->kickedBy = $rawParticipant['kicked_by']; $this->date = $rawParticipant['date']; $this->bannedRights = new BannedRights($rawParticipant['banned_rights']); } }