Skip to content

migrateGroupChatToChannelChat

Sahri Riza Umami edited this page Jun 9, 2017 · 5 revisions

Creates new channel supergroup chat from existing group chat and send corresponding messageChatMigrateTo and messageChatMigrateFrom. Deactivates group.

migrateGroupChatToChannelChat(chat_id)
Option Description
chat_id Group chat identifier.

Example

  • Migrate group 240919302 to channel supergroup.

    migrateGroupChatToChannelChat(240919302)

    Response:

    {
      ID = "Chat",
      draft_message_ = false,
      id_ = "-1001120734798",
      last_read_inbox_message_id_ = 1048576,
      last_read_outbox_message_id_ = 0,
      notification_settings_ = {
        ID = "NotificationSettings",
        mute_for_ = 0,
        show_preview_ = true,
        sound_ = "default"
      },
      order_ = "6429539701077573632",
      photo_ = false,
      reply_markup_message_id_ = 0,
      title_ = "Test Group",
      top_message_ = false,
      type_ = {
        ID = "ChannelChatInfo",
        channel_ = {
          ID = "Channel",
          anyone_can_invite_ = true,
          date_ = 1496993867,
          id_ = 1120734798,
          is_supergroup_ = true,
          is_verified_ = false,
          restriction_reason_ = false,
          sign_messages_ = true,
          status_ = {
            ID = "ChatMemberStatusCreator"
          },
          username_ = false
        }
      },
      unread_count_ = 0
    }

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally