Member class
A NotificationTarget that represents a team member.
Remarks
It's recommended to get members from ().
Constructors
Member(Teams |
Constructor. |
Properties
account | Detailed member account information. |
parent | The parent TeamsBotInstallation where this member is created from. |
type | Notification target type. For member it's always "Person". |
Methods
send |
Send an adaptive card message. |
send |
Send a plain text message. |
Constructor Details
Member(TeamsBotInstallation, TeamsChannelAccount)
Constructor.
new Member(parent: TeamsBotInstallation, account: TeamsChannelAccount)
Parameters
- parent
- TeamsBotInstallation
The parent TeamsBotInstallation where this member is created from.
- account
-
TeamsChannelAccount
Detailed member account information.
Remarks
It's recommended to get members from (), instead of using this constructor.
Property Details
account
Detailed member account information.
account: TeamsChannelAccount
Property Value
TeamsChannelAccount
parent
The parent TeamsBotInstallation where this member is created from.
parent: TeamsBotInstallation
Property Value
type
Notification target type. For member it's always "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.
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour