new Channel(Client, RootConversationID, ConversationID, isDM)
Create a channel object
Parameters:
Name | Type | Description |
---|---|---|
Client |
Client | Parent Client |
RootConversationID |
string | Group Id |
ConversationID |
string | Channel Id |
isDM |
bool | Whether the channel is a DM |
- Source:
Methods
send(data) → {Promise.<void>}
Send a message to the channel
Parameters:
Name | Type | Description |
---|---|---|
data |
string | message data |
- Source:
Returns:
- Type
- Promise.<void>
sendFile(file) → {Promise.<void>}
Send a file
Parameters:
Name | Type | Description |
---|---|---|
file |
Buffer | string | file to send |
- Source:
Returns:
- Type
- Promise.<void>
sendImage(image) → {Promise.<void>}
Send an image
Parameters:
Name | Type | Description |
---|---|---|
image |
Buffer | string | image to send |
- Source:
Returns:
- Type
- Promise.<void>
sync(callback) → {void}
N/A
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Source:
Returns:
- Type
- void