Пример #1
0
        public async Task SystemFrontHistory(Context ctx, PKSystem system)
        {
            if (system == null)
            {
                throw Errors.NoSystemError;
            }

            var sws = (await _data.GetSwitches(system, 10)).ToList();

            if (sws.Count == 0)
            {
                throw Errors.NoRegisteredSwitches;
            }

            await ctx.Reply(embed : await _embeds.CreateFrontHistoryEmbed(sws, system.Zone));
        }
Пример #2
0
        public async Task SystemFrontHistory()
        {
            var system = ContextEntity ?? Context.SenderSystem;

            if (system == null)
            {
                throw Errors.NoSystemError;
            }

            var sws = (await Switches.GetSwitches(system, 10)).ToList();

            if (sws.Count == 0)
            {
                throw Errors.NoRegisteredSwitches;
            }

            await Context.Channel.SendMessageAsync(embed : await EmbedService.CreateFrontHistoryEmbed(sws, system.Zone));
        }