//
//  SayResponder.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.
using NosSmooth.Core.Client;
using NosSmooth.Core.Packets;
using NosSmooth.Packets.Enums;
using NosSmooth.Packets.Enums.Chat;
using NosSmooth.Packets.Server.Chat;
using Remora.Results;
namespace SimpleChat;
/// 
/// Responds to .
/// 
public class SayResponder : IPacketResponder, IPacketResponder
{
    private readonly INostaleClient _client;
    /// 
    /// Initializes a new instance of the  class.
    /// 
    /// The nostale client.
    public SayResponder(INostaleClient client)
    {
        _client = client;
    }
    /// 
    public Task Respond(PacketEventArgs packet, CancellationToken ct = default)
    {
        return _client.ReceivePacketAsync
        (
            new SayPacket(EntityType.Map, 1, SayColor.Red, "Hello world from NosSmooth!"),
            ct
        );
    }
    /// 
    public Task Respond(PacketEventArgs packet, CancellationToken ct = default)
    {
        return _client.ReceivePacketAsync
        (
            new SayPacket(EntityType.Map, 1, SayColor.Red, "Hello world from NosSmooth!"),
            ct
        );
    }
}