如何检查电报机器人中的管理员状态?

How do I check what the admin status is in my telegram bot?

我需要在我的机器人中编写一些逻辑来检查用户是否 admin/owner/creator/member 等等

当我查看用户数据结构时,我可以看到它有一个 status 属性,在下面的例子中,值为 'member'。如何查看管理员、所有者和创建者?

Array
(
    [user] => Array
        (
            [id] => 123456789
            [is_bot] => 
            [first_name] => John
            [username] => Doe
            [language_code] => en
        )

    [status] => member
)

根据 Botman 用户扩展class:

 The member's status in the chat.
 Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”.