2024-12-27 23:31:36 +00:00
|
|
|
using HermesSocketServer.Models;
|
2024-08-10 19:36:32 +00:00
|
|
|
using ILogger = Serilog.ILogger;
|
|
|
|
|
|
|
|
namespace HermesSocketServer.Requests
|
|
|
|
{
|
|
|
|
public class GetRedeemableActions : IRequest
|
|
|
|
{
|
|
|
|
public string Name => "get_redeemable_actions";
|
2024-10-20 20:39:13 +00:00
|
|
|
public string[] RequiredKeys => [];
|
2024-08-10 19:36:32 +00:00
|
|
|
private readonly ILogger _logger;
|
|
|
|
|
2024-12-28 17:24:02 +00:00
|
|
|
public GetRedeemableActions(ILogger logger)
|
2024-08-10 19:36:32 +00:00
|
|
|
{
|
|
|
|
_logger = logger;
|
|
|
|
}
|
|
|
|
|
2024-12-28 17:24:02 +00:00
|
|
|
public Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
|
2024-08-10 19:36:32 +00:00
|
|
|
{
|
2024-12-28 17:24:02 +00:00
|
|
|
var redemptions = channel.Actions.Get().Values;
|
2024-12-27 23:31:36 +00:00
|
|
|
_logger.Information($"Fetched all chatters' selected tts voice for channel [channel: {channel.Id}]");
|
2024-12-28 17:24:02 +00:00
|
|
|
return Task.FromResult(RequestResult.Successful(redemptions, notifyClientsOnAccount: false));
|
2024-08-10 19:36:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|