Esempio n. 1
0
        protected override async Task ExecuteAsync(IConsole console)
        {
            if (Name != default && Id != default)
            {
                await ErrorAsync("Please specify either name or id, not both");

                return;
            }

            var miner = Name != default
                ? await ServerAccessor.GetMinerByNameAsync(Name)
                : Id != default
                ? await ServerAccessor.GetMinerByIdAsync(Id.Value)
                : await MinerAccessor.GetCurrentMinerAsync();

            await InfoLineAsync($"[ID]         |   {miner.Id}");
            await InfoLineAsync($"[Name]       |   {miner.Name}");
            await InfoLineAsync($"[Earnigs]    |   {miner.Earnings}");
            await InfoAsync($"[Status]     |   ");

            if (!miner.Online)
            {
                await ErrorLineAsync("Offline");

                return;
            }

            await SuccessLineAsync("Online");
            await InfoLineAsync($"[Plots]      |   {miner.PlotCount}");
            await InfoLineAsync($"[Size]       |   {Math.Round(miner.PlotCount * Constants.PlotSize)} GB");
        }
Esempio n. 2
0
        protected override async Task ExecuteAsync(IConsole console)
        {
            var miner = await ClientAccessor.GetCurrentMinerAsync();

            await InfoLineAsync($"[ID]      |   {miner.Id}");
            await InfoLineAsync($"[Name]    |   {miner.Name}");
            await InfoLineAsync($"[PM]      |   {miner.PlotMinutes}");
        }