hermes-server/Requests/GetRedeemableActions.cs
2024-12-28 17:24:02 +00:00

24 lines
807 B
C#

using HermesSocketServer.Models;
using ILogger = Serilog.ILogger;
namespace HermesSocketServer.Requests
{
public class GetRedeemableActions : IRequest
{
public string Name => "get_redeemable_actions";
public string[] RequiredKeys => [];
private readonly ILogger _logger;
public GetRedeemableActions(ILogger logger)
{
_logger = logger;
}
public Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
{
var redemptions = channel.Actions.Get().Values;
_logger.Information($"Fetched all chatters' selected tts voice for channel [channel: {channel.Id}]");
return Task.FromResult(RequestResult.Successful(redemptions, notifyClientsOnAccount: false));
}
}
}