Skip to content

Channel (API Reference)

ts
class Channel<TContext extends Context = Context>

Properties

PropertyTypeDescription
idnumberNegative channel ID
type'channel'Chat type discriminant
titlestringChannel title
messagesMessagesLog<TContext>Bot messages in this channel
membersMap<number, Membership<TContext>>Membership state

Methods

MethodSignatureDescription
postMessageTo(chat: Group | Supergroup | Channel, text: string, options?) => Promise<Message>Post as channel into a linked group
editPost(messageId: number, newText: string, options?: EditPostOptions) => Promise<void>Dispatch edited_channel_post
changeMemberStatus(user: User<TContext>, transition: MemberStatusTransition) => voidDispatch my_chat_member for channel
dispatchReactionCount(messageId, reactions, options?) => Promise<void>Dispatch message_reaction_count
sendSystemMessage(text: string, options?: SendSystemMessageOptions) => Promise<Message>System message

EditPostOptions

ts
interface EditPostOptions {
  parse_mode?: ParseMode;
  entities?: MessageEntity[];
  reply_markup?: InlineKeyboardMarkup;
}

See also

Released under the MIT License.