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)); }
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)); }