-
{
"ok": true,
"result": {
"user": {
"id": 1816677960,
"is_bot": false,
"first_name": "pooria",
"language_code": "en"
},
"status": "creator",
"is_anonymous": false
}
} The same is true for |
Beta Was this translation helpful? Give feedback.
Answered by
Lukasss93
Mar 5, 2023
Replies: 1 comment 2 replies
-
The IDE will not autocomplete that fields because Anyway, to fix this, you can check the specific type of $chatMember = $bot->getChatMember($chatID, $userID);
if($chatMember instanceof ChatMemberMember ||
$chatMember instanceof ChatMemberAdministrator ||
$chatMember instanceof ChatMemberOwner) {
// your code
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The IDE will not autocomplete that fields because
ChatMember
is not a real type (it's an abstract type)...Anyway, to fix this, you can check the specific type of
ChatMember
, like this: