Add channel system with CLI, Telegram, and Web channel implementations
Define channel abstractions (IChannel, IChannelManager) with event-driven message and connection handling. Implement ChannelManager for multi-channel orchestration, CliChannel for terminal I/O, TelegramChannel with adapter pattern for bot API integration, and WebChannel stub. Includes DI registration and channel type enumeration.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Luna.Shared;
|
||||
|
||||
namespace Luna.Channels.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Event arguments for when a message is received from a channel
|
||||
/// </summary>
|
||||
public class ChannelMessageReceivedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The received message
|
||||
/// </summary>
|
||||
public required ChannelMessage Message { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The channel that received the message
|
||||
/// </summary>
|
||||
public required IChannel Channel { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Set to true to indicate the message has been handled and should not be processed further
|
||||
/// </summary>
|
||||
public bool IsHandled { get; set; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user