NotificationTarget interface
Represent a notification target.
Properties
type | The type of target, could be "Channel" or "Group" or "Person". |
Methods
send |
Send an adaptive card message. |
send |
Send a plain text message. |
Property Details
type
The type of target, could be "Channel" or "Group" or "Person".
type?: NotificationTargetType
Property Value
Method Details
sendAdaptiveCard(unknown, (context: TurnContext, error: Error) => Promise<void>)
Send an adaptive card message.
function sendAdaptiveCard(card: unknown, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>
Parameters
- card
-
unknown
the adaptive card raw JSON.
- onError
-
(context: TurnContext, error: Error) => Promise<void>
an optional error handler that can catch exceptions during adaptive card sending.
If not defined, error will be handled by BotAdapter.onTurnError
.
Returns
Promise<MessageResponse>
the response of sending adaptive card message.
sendMessage(string, (context: TurnContext, error: Error) => Promise<void>)
Send a plain text message.
function sendMessage(text: string, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>
Parameters
- text
-
string
the plain text message.
- onError
-
(context: TurnContext, error: Error) => Promise<void>
an optional error handler that can catch exceptions during message sending.
If not defined, error will be handled by BotAdapter.onTurnError
.
Returns
Promise<MessageResponse>
the response of sending message.