A client for Slack’s Incoming Webhooks
Constructs a new instance of the IncomingWebhook
class
Parameters:
Name | Type | Required | |
---|---|---|---|
url | string |
✓ | |
defaults | IncomingWebhookDefaultArguments |
✗ |
Send a notification to a conversation
Parameters:
Name | Type | Required | Description |
---|---|---|---|
message | string | IncomingWebhookSendArguments |
✓ | the message (a simple string, or an object describing the message) |
Returns Promise<IncomingWebhookResult>
A dictionary of codes for errors produced by this package
All errors produced by this package adhere to this interface
Name | Type | |
---|---|---|
code | ErrorCode |
Name | Type | |
---|---|---|
agent | Agent |
|
channel | string |
|
icon_emoji | string |
|
icon_url | string |
|
link_names | boolean |
|
text | string |
|
username | string |
Name | Type | |
---|---|---|
code | ErrorCode.HTTPError |
|
original | Error |
Name | Type | |
---|---|---|
code | ErrorCode.RequestError |
|
original | Error |
Name | Type | |
---|---|---|
text | string |
Name | Type | |
---|---|---|
attachments | MessageAttachment[] |
|
blocks | (KnownBlock | Block)[] |
|
unfurl_links | boolean |
|
unfurl_media | boolean |
IncomingWebhookHTTPError
One of: