Skip to content

Chat & Member Management

When added to groups or channels (especially as administrators), CodeMeet bots can inspect chat info, list administrators, check membership status, and pin or unpin messages.


1. Get Chat Information (getChat)

Retrieves detailed metadata about a direct chat, group, or channel:

POST https://botapi.codemeet.chat/bot<TOKEN>/getChat
{
  "chat_id": "e9b2a1c0-4411-4fa3-9f88-d4508671b122"
}

Response Example

{
  "ok": true,
  "result": {
    "id": "e9b2a1c0-4411-4fa3-9f88-d4508671b122",
    "type": "group",
    "title": "CodeMeet Developers",
    "description": "Official community for developers building on CodeMeet",
    "members_count": 142
  }
}

2. Get Chat Member Info (getChatMember)

Inspects the status of a specific user within a chat:

POST https://botapi.codemeet.chat/bot<TOKEN>/getChatMember
{
  "chat_id": "e9b2a1c0-4411-4fa3-9f88-d4508671b122",
  "user_id": "c1f72b9a-1122-3344-5566-778899aabbcc"
}

Response Example

{
  "ok": true,
  "result": {
    "user": {
      "id": "c1f72b9a-1122-3344-5566-778899aabbcc",
      "is_bot": false,
      "first_name": "Sara",
      "username": "sara_dev"
    },
    "status": "administrator",
    "is_anonymous": false
  }
}

3. List Chat Administrators (getChatAdministrators)

Returns an array of creator and administrator objects:

POST https://botapi.codemeet.chat/bot<TOKEN>/getChatAdministrators
{
  "chat_id": "e9b2a1c0-4411-4fa3-9f88-d4508671b122"
}

4. Get Member Count (getChatMemberCount)

{
  "chat_id": "e9b2a1c0-4411-4fa3-9f88-d4508671b122"
}

Response:

{
  "ok": true,
  "result": 142
}


5. Pinning & Unpinning Messages (pinChatMessage / unpinChatMessage / unpinAllChatMessages)

pinChatMessage

Pins a message at the top of the chat:

{
  "chat_id": "chat-id",
  "message_id": 45,
  "disable_notification": false
}

unpinChatMessage

Unpins a specific message:

{
  "chat_id": "chat-id",
  "message_id": 45
}

unpinAllChatMessages

Unpins all pinned messages in the chat:

{
  "chat_id": "chat-id"
}