MediatR Guide + sample (#2218)
* Add guide for MediatR * Add sample for MediatR * Fix exposed token in program.cs * Fix review points * Remove newline in MediatrDiscordEventListener.cs
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// MessageReceivedNotification.cs
|
||||
|
||||
using Discord.WebSocket;
|
||||
using MediatR;
|
||||
|
||||
namespace MediatRSample.Notifications;
|
||||
|
||||
public class MessageReceivedNotification : INotification
|
||||
{
|
||||
public MessageReceivedNotification(SocketMessage message)
|
||||
{
|
||||
Message = message ?? throw new ArgumentNullException(nameof(message));
|
||||
}
|
||||
|
||||
public SocketMessage Message { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user