mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-08-23 10:13:18 +00:00
Added addAdmins & addMembers & editMessage & answerOnCallback
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace BushlanovDev\MaxMessengerBot\Models;
|
||||
|
||||
use BushlanovDev\MaxMessengerBot\Attributes\ArrayOf;
|
||||
use BushlanovDev\MaxMessengerBot\Enums\ChatAdminPermission;
|
||||
|
||||
/**
|
||||
* Represents an administrator to be set in a chat, linking a user ID with their permissions.
|
||||
*/
|
||||
final readonly class ChatAdmin extends AbstractModel
|
||||
{
|
||||
/**
|
||||
* @param int $userId The identifier of the user to be made an admin.
|
||||
* @param ChatAdminPermission[] $permissions The list of permissions to grant to the user.
|
||||
*/
|
||||
public function __construct(
|
||||
public int $userId,
|
||||
#[ArrayOf(ChatAdminPermission::class)]
|
||||
public array $permissions,
|
||||
) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user