using Microsoft.Extensions.Configuration;

namespace Managing.Infrastructure.Messengers.Discord
{
    public class DiscordSettings
    {
        public DiscordSettings(IConfiguration config)
        {
            Token = config.GetValue<string>("Discord:TokenId");
            SignalChannelId = config.GetValue<ulong>("Discord:SignalChannelId");
            CopyTradingChannelId = config.GetValue<ulong>("Discord:CopyTradingChannelId");
            TradesChannelId = config.GetValue<ulong>("Discord:TradesChannelId");
            TroublesChannelId = config.GetValue<ulong>("Discord:TroublesChannelId");
            RequestsChannelId = config.GetValue<ulong>("Discord:RequestsChannelId");
            LeaderboardChannelId = config.GetValue<ulong>("Discord:LeaderboardChannelId");
            NoobiesboardChannelId = config.GetValue<ulong>("Discord:NoobiesboardChannelId");
            FundingRateChannelId = config.GetValue<ulong>("Discord:FundingRateChannelId");
            ButtonExpirationMinutes = config.GetValue<int>("Discord:ButtonExpirationMinutes");
            HandleUserAction = config.GetValue<bool>("Discord:HandleUserAction");
            BotActivity = config.GetValue<string>("Discord:BotActivity");
            BotEnabled = true;
        }

        public int ButtonExpirationMinutes { get; set; }
        public bool HandleUserAction { get; }
        public string BotActivity { get; }
        public string Token { get; }
        public ulong SignalChannelId { get; }
        public ulong CopyTradingChannelId { get; }
        public ulong TradesChannelId { get; }
        public ulong TroublesChannelId { get; }
        public ulong RequestsChannelId { get; }
        public bool BotEnabled { get; set; }
        public ulong LeaderboardChannelId { get; set; }
        public ulong NoobiesboardChannelId { get; set; }
        public ulong FundingRateChannelId { get; set; }
    }
}