-
Notifications
You must be signed in to change notification settings - Fork 30
createNewChannelChat
Sahri Riza Umami edited this page Jun 9, 2017
·
4 revisions
Creates new channel chat and send corresponding messageChannelChatCreate
, returns created chat.
createNewChannelChat(title, is_supergroup, about)
Option | Description |
---|---|
title |
Title of new channel chat, 0-255 characters. |
is_supergroup |
true , if supergroup chat should be created. |
about |
Information about the channel, 0-255 characters. |
-
Create super group
createNewChannelChat('My SuperGroup', 1, 'My Supergroup, my rules')
Response:
{ ID = "Chat", draft_message_ = false, id_ = "-1001138736494", 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_ = "6429544069059313665", photo_ = false, reply_markup_message_id_ = 0, title_ = "My SuperGroup", top_message_ = { ID = "Message", can_be_deleted_ = false, can_be_edited_ = false, chat_id_ = "-1001138736494", content_ = { ID = "MessageChannelChatCreate", title_ = "My SuperGroup" }, date_ = 1496994884, edit_date_ = 0, forward_info_ = false, id_ = 1048576, is_post_ = false, reply_markup_ = false, reply_to_message_id_ = 0, send_state_ = { ID = "MessageIsSuccessfullySent" }, sender_user_id_ = 194211431, ttl_ = 0, ttl_expires_in_ = 0, via_bot_user_id_ = 0, views_ = 0 }, type_ = { ID = "ChannelChatInfo", channel_ = { ID = "Channel", anyone_can_invite_ = false, date_ = 1496994884, id_ = 1138736494, is_supergroup_ = true, is_verified_ = false, restriction_reason_ = false, sign_messages_ = true, status_ = { ID = "ChatMemberStatusCreator" }, username_ = false } }, unread_count_ = 0 }
-
Create a channel
createNewChannelChat('My Channel', 0, 'My Channel, my rules')
Response:
{ ID = "Chat", draft_message_ = false, id_ = "-1001139119329", last_read_inbox_message_id_ = 1048576, last_read_outbox_message_id_ = "2251799812636672", notification_settings_ = { ID = "NotificationSettings", mute_for_ = 0, show_preview_ = true, sound_ = "default" }, order_ = "6429542986727555073", photo_ = false, reply_markup_message_id_ = 0, title_ = "My Channel", top_message_ = { ID = "Message", can_be_deleted_ = false, can_be_edited_ = false, chat_id_ = "-1001139119329", content_ = { ID = "MessageChannelChatCreate", title_ = "My Channel" }, date_ = 1496994632, edit_date_ = 0, forward_info_ = false, id_ = 1048576, is_post_ = true, reply_markup_ = false, reply_to_message_id_ = 0, send_state_ = { ID = "MessageIsSuccessfullySent" }, sender_user_id_ = 0, ttl_ = 0, ttl_expires_in_ = 0, via_bot_user_id_ = 0, views_ = 0 }, type_ = { ID = "ChannelChatInfo", channel_ = { ID = "Channel", anyone_can_invite_ = false, date_ = 1496994632, id_ = 1139119329, is_supergroup_ = false, is_verified_ = false, restriction_reason_ = false, sign_messages_ = false, status_ = { ID = "ChatMemberStatusCreator" }, username_ = false } }, unread_count_ = 0 }
Test script
Frequently Asked Questions
The Functions
- getAuthState
- setAuthPhoneNumber
- resendAuthCode
- checkAuthCode
- checkAuthPassword
- requestAuthPasswordRecovery
- recoverAuthPassword
- resetAuth
- checkAuthBotToken
- getPasswordState
- setPassword
- getRecoveryEmail
- setRecoveryEmail
- requestPasswordRecovery
- recoverPassword
- getMe
- getUser
- getUserFull
- getGroup
- getGroupFull
- getChannel
- getChannelFull
- getSecretChat
- getChat
- getMessage
- getMessages
- getFile
- getFilePersistent
- getChats
- searchPublicChat
- searchPublicChats
- searchChats
- addRecentlyFoundChat
- deleteRecentlyFoundChat
- deleteRecentlyFoundChats
- getCommonChats
- getChatHistory
- deleteChatHistory
- searchChatMessages
- searchMessages
- sendBotStartMessage
- sendInlineQueryResultMessage
- forwardMessages
- sendChatSetTtlMessage
- deleteMessages
- deleteMessagesFromUser
- editMessageText
- editMessageCaption
- editMessageReplyMarkup
- editInlineMessageText
- editInlineMessageCaption
- editInlineMessageReplyMarkup
- getInlineQueryResults
- answerInlineQuery
- getCallbackQueryAnswer
- answerCallbackQuery
- setGameScore
- setInlineGameScore
- getGameHighScores
- getInlineGameHighScores
- deleteChatReplyMarkup
- sendChatAction
- sendChatScreenshotTakenNotification
- openChat
- closeChat
- viewMessages
- openMessageContent
- createPrivateChat
- createGroupChat
- createChannelChat
- createSecretChat
- createNewGroupChat
- createNewChannelChat
- createNewSecretChat
- migrateGroupChatToChannelChat
- changeChatTitle
- changeChatPhoto
- changeChatDraftMessage
- addChatMember
- addChatMembers
- changeChatMemberStatus
- getChatMember
- downloadFile
- cancelDownloadFile
- setFileGenerationProgress
- finishFileGeneration
- exportChatInviteLink
- checkChatInviteLink
- importChatInviteLink
- blockUser
- unblockUser
- getBlockedUsers
- importContacts
- searchContacts
- deleteContacts
- getUserProfilePhotos
- getStickers
- getStickerSets
- getArchivedStickerSets
- getTrendingStickerSets
- getAttachedStickerSets
- getStickerSet
- searchStickerSet
- updateStickerSet
- viewTrendingStickerSets
- reorderStickerSets
- getRecentStickers
- addRecentSticker
- deleteRecentSticker
- clearRecentStickers
- getStickerEmojis
- getSavedAnimations
- addSavedAnimation
- deleteSavedAnimation
- getRecentInlineBots
- getWebPagePreview
- getNotificationSettings
- setNotificationSettings
- resetAllNotificationSettings
- setProfilePhoto
- deleteProfilePhoto
- changeName
- changeAbout
- changeUsername
- changePhoneNumber
- resendChangePhoneNumberCode
- checkChangePhoneNumberCode
- getActiveSessions
- terminateSession
- terminateAllOtherSessions
- toggleGroupEditors
- changeChannelUsername
- toggleChannelInvites
- toggleChannelSignMessages
- changeChannelAbout
- pinChannelMessage
- unpinChannelMessage
- reportChannelSpam
- getChannelMembers
- deleteChannel
- getCreatedPublicChannels
- closeSecretChat
- getSupportUser
- getWallpapers
- registerDevice
- getDeviceTokens
- setPrivacy
- getPrivacy
- getOption
- setOption
- changeAccountTtl
- getAccountTtl
- deleteAccount
- getChatReportSpamState
- changeChatReportSpamState
- setBotUpdatesStatus
- setAlarm
- sendText
- sendAnimation
- sendAudio
- sendDocument
- sendPhoto
- sendSticker
- sendVideo
- sendVoice
- sendLocation
- sendVenue
- sendContact
- sendGame
- sendForwarded