Skip to content

createNewBasicGroupChat

Sahri Riza Umami edited this page Jul 2, 2018 · 1 revision

Creates a new basic group and sends a corresponding messageBasicGroupChatCreate.
Returns the newly created chat.

createNewBasicGroupChat(user_ids, title, callback, data)
Field Type Description
user_ids vector<int32> Identifiers of users to be added to the basic group.
title string Title of the new basic group; 1-255 characters.

Example

  • Creates a new basic group "Test Basic Group".

    createNewBasicGroupChat({[0]=431516051, 441878927}, 'Test Basic Group')

    Response:

    {
      ["@type"] = "chat",
      client_data = "",
      id = -288208192,
      is_pinned = false,
      last_message = {
        ["@type"] = "message",
        author_signature = "",
        can_be_deleted_for_all_users = true,
        can_be_deleted_only_for_self = true,
        can_be_edited = false,
        can_be_forwarded = false,
        chat_id = -288208192,
        contains_unread_mention = false,
        content = {
          ["@type"] = "messageBasicGroupChatCreate",
          member_user_ids = {
            441878927,
            [0] = 431516051
          },
          title = "Test Basic Group"
        },
        date = 1518001798,
        edit_date = 0,
        id = 185597952,
        is_channel_post = false,
        is_outgoing = true,
        media_album_id = "0",
        reply_to_message_id = 0,
        sender_user_id = 431516051,
        ttl = 0,
        ttl_expires_in = 0,
        via_bot_user_id = 0,
        views = 0
      },
      last_read_inbox_message_id = 0,
      last_read_outbox_message_id = 185597952,
      notification_settings = {
        ["@type"] = "notificationSettings",
        mute_for = 0,
        show_preview = true,
        sound = "default"
      },
      order = "0",
      reply_markup_message_id = 0,
      title = "Test Basic Group",
      type = {
        ["@type"] = "chatTypeBasicGroup",
        basic_group_id = 288208192
      },
      unread_count = 0,
      unread_mention_count = 0
    }

Frequently Asked Questions
The Functions

Clone this wiki locally