Skip to content

upgradeBasicGroupChatToSupergroupChat

Sahri Riza Umami edited this page Jun 24, 2018 · 1 revision

Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom.
Deactivates the original basic group.

upgradeBasicGroupChatToSupergroupChat(chat_id, callback, data)
Field Type Description
chat_id int53 Identifier of the chat to upgrade.

Example

  • Creates new channel supergroup chat from existing group chat 1234567890.

    migrateGroupChatToChannelChat(-281244848)

    Response:

    {
      ["@type"] = "chat",
      can_be_reported = false,
      client_data = "",
      id = "-1001223535930",
      is_pinned = false,
      last_message = {
        ["@type"] = "message",
        author_signature = "",
        can_be_deleted_for_all_users = false,
        can_be_deleted_only_for_self = false,
        can_be_edited = false,
        can_be_forwarded = false,
        chat_id = "-1001234567890",
        contains_unread_mention = false,
        content = {
          ["@type"] = "messageChatUpgradeFrom",
          basic_group_id = 281244848,
          title = "TEST"
        },
        date = 1529848897,
        edit_date = 0,
        id = 1048576,
        is_channel_post = false,
        is_outgoing = true,
        media_album_id = "0",
        reply_to_message_id = 0,
        sender_user_id = 555555555,
        ttl = 0,
        ttl_expires_in = 0,
        via_bot_user_id = 0,
        views = 0
      },
      last_read_inbox_message_id = 1048576,
      last_read_outbox_message_id = 0,
      notification_settings = {
        ["@type"] = "notificationSettings",
        mute_for = 0,
        show_preview = true,
        sound = "default"
      },
      order = "0",
      reply_markup_message_id = 0,
      title = "TEST",
      type = {
        ["@type"] = "chatTypeSupergroup",
        is_channel = false,
        supergroup_id = 1223535930
      },
      unread_count = 0,
      unread_mention_count = 0
    }

Frequently Asked Questions
The Functions

Clone this wiki locally