export Class
ChannelChat ​
extends ​
Constructor ​
ts
new ChannelChat( client, packet )
Parameter | Type | Description |
---|---|---|
client | Client | |
packet | ChatPacket |
Properties ​
get partial : boolean
​
readonly client : Client
​
id : number
​
invites : ChatInviteLinksManager
​
last_message_id? : number
​
members : MembersManager
​
message_thread_id? : number
​
messages : MessagesManager
​
photo? : ChatPhoto
​
requests : ChatRequestsManager
​
type : "channel"
| "group"
| "supergroup"
​
Methods ​
asyncadministrators( ) ​
Returns: Promise
<Member[]
>
createMessageCollector( options ) ​
Creates a message collector to the current chat.
Parameter | Type | Description |
---|---|---|
options | MessageCollectorOptions | The options for the collector. |
Returns: MessageCollector
asyncdeletePhoto( ) ​
Returns: Promise
<boolean
>
asyncdeleteStickerSet( ) ​
Returns: Promise
<boolean
>
asyncfetch( ) ​
Returns: Promise
<boolean
| BaseChat
>
asyncleave( ) ​
Returns: Promise
<boolean
>
asyncsend( method, packet, form_data ) ​
Sends a message to the current channel.
Parameter | Type | Description |
---|---|---|
method | MessagePayloadMethod | The method of the message. |
packet | MessagePayload | The packet of what the message will contain. |
form_data? | FormDataBuilder | The form data for uploading media, see also File |
Returns: Promise
<Message
>
asyncsendInvoice( id ) ​
Sends the stored invoice with the id to the current chat.
Parameter | Type | Description |
---|---|---|
id | string | The id of the invoice. |
Returns: Promise
<void
| Message
>
asyncsendText( text ) ​
Sends a text message to the current chat.
Parameter | Type | Description |
---|---|---|
text | string | The text content of the message. |
Returns: Promise
<Message
>
asyncsetDescription( description ) ​
Parameter | Type | Description |
---|---|---|
description | string |
Returns: Promise
<boolean
>
asyncsetPhoto( photo, form ) ​
Parameter | Type | Description |
---|---|---|
photo | InputFile | |
form? | FormData |
Returns: Promise
<boolean
>
asyncsetStrickerSet( sticker_set_name ) ​
Parameter | Type | Description |
---|---|---|
sticker_set_name | string |
Returns: Promise
<boolean
>
asyncsetTitle( title ) ​
Parameter | Type | Description |
---|---|---|
title | string |
Returns: Promise
<boolean
>