Table of Contents

Class ReactionModule

Namespace
Signal.Application.Reactions
Assembly
Signal.Application.dll

Base class for reaction handlers: public methods with OnReactionAttribute. A new instance is created per reaction from the message's DI scope, so constructor injection works. Methods may take ReactionContext, Reaction and CancellationToken parameters and return Task, ValueTask or void.

public abstract class ReactionModule
Inheritance
ReactionModule
Inherited Members

Properties

Context

The reaction being handled. Set by the framework before the method is invoked.

public ReactionContext Context { get; }

Property Value

ReactionContext

Methods

ReplyAsync(string)

Replies into the conversation of the reaction.

protected Task<SendResult> ReplyAsync(string text)

Parameters

text string

The text.

Returns

Task<SendResult>

The send result.