예제 #1
0
        public async Task SystemFronter(Context ctx, PKSystem system)
        {
            if (system == null)
            {
                throw Errors.NoSystemError;
            }

            var sw = await _data.GetLatestSwitch(system);

            if (sw == null)
            {
                throw Errors.NoRegisteredSwitches;
            }

            await ctx.Reply(embed : await _embeds.CreateFronterEmbed(sw, system.Zone));
        }
예제 #2
0
        public async Task SystemFronter()
        {
            var system = ContextEntity ?? Context.SenderSystem;

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

            var sw = await Switches.GetLatestSwitch(system);

            if (sw == null)
            {
                throw Errors.NoRegisteredSwitches;
            }

            await Context.Channel.SendMessageAsync(embed : await EmbedService.CreateFronterEmbed(sw, system.Zone));
        }